24.04.2016, 17:09
Try this example, just change ip variable to your projector IP address:
Code:
require('socket')
ip = '192.168.1.23'
port = 53484
cmd = string.char(0x01, 0x00, 0xA9, 0x17, 0x2F, 0x00, 0x00, 0x00, 0x3F, 0x9A)
sock = socket.tcp()
sock:settimeout(3)
res, err = sock:connect(ip, port)
if res then
res, err = sock:send(cmd)
if res then
alert('send OK')
else
alert('send failed: ' .. tostring(err))
end
else
alert('connect failed: ' .. tostring(err))
end
sock:close()