Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
3-way handshake with TCP connection
This thread has 3 replies. Displaying all posts.
Post 1 made on Tuesday May 19, 2020 at 04:37
Fbrighi
Long Time Member
Joined:
Posts:
September 2010
48
Hello, i was trying to make pronto script works with a client that needs 3-way handshake to react to commands. With standard tcpsocket procedure i'm not able to connect and/or control the device.

Is it existing some special syntax/command to allow pronto script for a 3-way handshake connection over TCP?

Thanks!

FKB
FKB
Post 2 made on Wednesday May 20, 2020 at 11:19
sebastian
Long Time Member
Joined:
Posts:
September 2003
64
Can you be more specific?
The term "3-way-handshake" usually refers to TCP's method of establishing a connection using SYN/SYN+ACK/ACK flags.
This behavior is hardcoded into the IP-stack of the device and there is no way you could establish a TCP connection without following that standard.

Sebastian
OP | Post 3 made on Wednesday May 20, 2020 at 14:57
Fbrighi
Long Time Member
Joined:
Posts:
September 2010
48
Hello, thanks for your reply. Yes, sure.

JVC projectors can be controlled by lan, with TCP/IP protocol, but ask for a specific 3-way handshaking. In particular, the sequence as for JVC instructions must be:

Contoller -> connection request
JVC -> PJ_OK
Controller -> PJREQ
JVC -> PJACK
Controller -> Command you need to be executed

Here more detail (see from page 22) : [Link: support.jvc.com]

They call this as "3-way handshake" but it seems they require also the data sent as Syn and as Ack is customized (PJREQ). I tried to use normal TCP socket to send JVC command i need to execute, but projector is not executing them.

I'm not able to receive the PJ_OK from JVC after trying a TCP socket, it reports always "socket error". JVC is working correctly, because if try connection by Telnet, i obtain the PJ_OK answer.

Is there any way to enter in this 3-way handshaking somehow?

Thanks!

FKB

Last edited by Fbrighi on May 20, 2020 15:04.
FKB
Post 4 made on Thursday May 21, 2020 at 19:14
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,423
3 way handshake means wait for ready from the projector, send an intent to send a request and wait for controller to acknowledge, then send the command.

This is just a standard TCP/IP socket with the projector listening for new connections on port Port 20554.


Create the TCP-IP connect from Pronto on port 20554. Wait until you get PJ_OK. Then send the PJ_REQ. Wait for receipt of the PJ_ACK. Finally, send the command you want to send and according to the documentation, projector will close the socket after 5 seconds.

To quote you...

"I'm not able to receive the PJ_OK from JVC after trying a TCP socket, it reports always "socket error". JVC is working correctly, because if try connection by Telnet, i obtain the PJ_OK answer."


If you send PJ_REQ from telnet, do you get back a PJ_ACK? If you can make this work (ensuring you don't breach the 5 second rule) via telnet(might get stuck sending hex chars below), you should be able to make this work from ProntoScript

Sounds like your issue is with your script. A picture, or in this case, the code you are trying to test with, is worth 1000 words.


Note that the commands you send are NOT strings of numbers.
The are hex values. So when you want to send them to the socket, you'll need to use string concatenation.

var cmdString = "";
cmdString += String.fromCharCode(0x06);
cmdString += String.fromCharCode([next hex digit pair]);
cmdString += String.fromCharCode([next hex digit pair]);
cmdString += String.fromCharCode([next hex digit pair]);
// 0x0A is an ASCII LineFeed character
cmdString += String.fromCharCode(0x0A);

sock.write(cmdString);


Lyndel

Last edited by Lyndel McGee on May 21, 2020 20:02.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse