You should type command in such form:
You can use this function for sending with feedback:
Code:
cmd = string.char(0x31,0x00,0x00,0x08,0x04,0x02,0x00,0x00,0x00
Code:
function send(cmd)
-- edit ip address and port
ip = '192.168.1.32'
port = 5987
local sock = require('socket').udp()
if sock then
sock:sendto(cmd, ip, port)
data = sock:receive()
sock:close()
end
return data
end