TCP/IP 3 way handshake

Hi everybody!

I like to use Node-RED to power on my home cinema projector over TCP/IP.
A so-called 3-way handshake is used to establish a connection and then a hex command must be sent.
When I open the connection with a "tcp in" node I get the first answer for the connection (PJ_OK, as a string) ... now I need to send PJREQ as a string and wait for PJACK as a reply to finally send the real comand (HEX: 21 89 01 50 57 30 0A)

Any ideas to get this solved in Node-RED? It looks so simple, but I just can't get it to work!

BR

1 Like

Could this be of help: https://github.com/dermotduffy/jvc_proxy? I don't have such a projector but I did a quick search with your description of the protocol and found this.

failing that... for this sort of handshaking I would use the tcp-request node rather than the in and out nodes.

Thanks for your reply! Can I use a single tcp-request node to send each command after the other? This is somehow not working ... or do I have to use multiple tcp-request nodes for my task?

you should be able to use just the one. You would need to marshal the correct messages into it in the correct sequence of course. You may need to send blank or null character to start to make it connect in the first place.

Do you know if the connection remains open after a return from the projector? To me it looks like this isn't because the next command brings the first answer (PJ_OK) again ...

Depends if you set it to remain open

GOT IT!!! THX for your help! :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.