This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Epson projector tcp / ip control help
#1
hi,

i having trouble connecting to an epson tw9400 projector via tcp /ip,  i've been able get to PJ Link working (turning the projector on/ off), but i require extra commands that the PJ link doesn't support (lens control, key functions.etc) 

the projector requires a handshake to enable ESC/VP.net before it will accept commands, i've been able to verify connection to the projector via the Hercules setup utility below,

this is the instructions on how to connect to the projector via ESC/VP.net, i've also attached the ESC/VP command list below

But i haven't been able to make a connection via the logicmachine 

the handshake is -  [i]ESC/VP.net<DLE><ETX><NUL><NUL><NUL><NUL>[/i]  or HEX = 45 53 43 2F 56 50 2E 6E 65 74 10 03 00 00 00 00

and this where i'm at the moment, i've modified the Pj Link script,  changing the port to 3629, but i'm not sure how to implement the handshake into the script?

any help would be much appreciated


Code:
require('socket')

value = event.getvalue()

ip = '192.168.1.64'
port = 3629

if value == 255 then
  cmd = 'PWR ON<CR>' --Power On

end

if value == 250 then
  cmd = 'PWR OFF<CR>'  --Power Off
end

sock = socket.tcp()
sock:settimeout(1)

res, err = sock:connect(ip, port)

if res then
  res, err = sock:send(cmd)

  if res then
    alert('Send OK')
  else
    alert('Send failed: %s', tostring(err))
  end
else
  alert('Connect failed: %s', tostring(err))
end

Attached Files
.xlsx   ESCVP21 command .xlsx (Size: 215.57 KB / Downloads: 8)
Reply
#2
You can convert hex char codes to a string like this:
Code:
hs = string.char(0x45, 0x53, 0x43, 0x2F, 0x56, 0x50, 0x2E, 0x6E, 0x65, 0x74, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00)

Then you need to send it before the actual command:
Code:
res, err = sock:send(hs)
res, err = sock:send(cmd)

Note that anything between <> is not a string value but an ASCII character name, so 'PWR OFF<CR>' should actually be 'PWR OFF\r'
Reply
#3
(02.09.2020, 11:43)admin Wrote: You can convert hex char codes to a string like this:
Code:
hs = string.char(0x45, 0x53, 0x43, 0x2F, 0x56, 0x50, 0x2E, 0x6E, 0x65, 0x74, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00)

Then you need to send it before the actual command:
Code:
res, err = sock:send(hs)
res, err = sock:send(cmd)

Note that anything between <> is not a string value but an ASCII character name, so 'PWR OFF<CR>' should actually be 'PWR OFF\r'


Awesome - thank you very much for you help! Big Grin Big Grin
Reply


Forum Jump: