[PJLink] TCP connect issue

Hi all,

I am facing a (half) problem using TCP/IP connection to a video projector.

I am adding buttons to my interface to drive a video projector connected to a network. I am using the PJLink protocol which is a TCP/IP protocol to send commands to the projector.

My issue is the following :

  • at first, everything is ok. When i send a command the projector is responding. For example i click an ON button and the projector powers ON.

  • I am waiting like 2 minutes then click the OFF button… nothing happens.

  • in the TCP/IP DAT i change the projector IP, then change it back to the previous IP

  • I click the OFF button, and the projector turns OFF

Seems like it needs to reset the connection each time i send a command.

Is this a TCP/IP DAT issue ?
Do i need to disconnect and reconnect each time i send a command ?
How can i proceed with OPs or python ?

the script is as follow :

pjSocket1 = op('tcpip1') pjSocket1.send('%1POWR 1' + '\r')

I am running TD 099 2018.27300 mac under Mojave

thanks a lot

Probably the projector or the protocol defines timeout, if you cannot change that check if the protocol defines ping command if not just read the power status or lamp hours periodically.
This will keep the stream open.

hi,

ok i will have a look as soon as i can.

is there a mean to “reconnect” before sending the command ? i can’t find an op or python way to force the TCP/IP DAT to reconnect unless i change the IP address

thanks

hi,

Seems like it depends on the projector, with some it works, other they don’t.
So maybe this is a Keep Alive feature i need to pass through.

Is there any way to force reconnection to a socket with python ?

thanks

Toggle the Active Flag, while cooking it in between.
This will re-establish an entirely new connection.

hi,

yes this is how i deal with it right now but it seems a bit of a hack to me. I wondered if there was a cleaner version like op(‘tcpip1’).connect() ?

anyway, it seems something is wrong because when i try with other software like Chataigne or Projector Manager or Modulo Pi video server everything is fine.

With touch i always need to deactivate/activate or change IP address or even toggle ‘active connection’ after sending the first command : like the first command succeed but every command afterward fails