I´m sorry but my LUA knowledge is very limited. I want to send a sequence of bytes from an ESP8266-12 board, to a PLC (Programmable Logic Controller), using UDP protocol.
The simple code I have writte is the following, but I cannot receive the UDP bytes on my PLC (however, if I send them using a UDP tool on my PC, I can receive them correctly). Perhaps I have a syntax mistake ??
Is the "send" line correctly written to send an array of bytes ??
function SendDatosUDP()
cudp=net.createConnection(net.UDP, 0)
cudp:connect(4950,"192.168.1.81")
cudp:send(0x00,0x00,0x00,0x00,0x02,0xFA,0x03,0x00,0x06,0x02,0x11,0x12)
end
Thank you for any help !
JJ