Hello All,
I am working on programming my RV50 to be able to receive a message from a server then do some stuff if the message is ‘s’ , meanwhile, I won’t my RV50 to send back an “Ack” if the message was received accurately. I am able to receive the message but after nearly trying every thing I can, I am not receiving any thing on the website side, here is my code :
CadUDPSocketIN = assert(socket.udp())
assert(CadUDPSocketIN:settimeout())
assert(CadUDPSocketIN:setsockname(“192.168.13.31”, 3033))
while true do
datain = CadUDPSocketIN:receive()
if(datain) then
if (datain == 's') then
--Do something
local ip1, port1 = CadUDPSocketIN:getpeername()
udp_c = assert(socket.udp())
assert(udp_c:setpeername(ip1, port1))
udp_c:send("Ack")
end
end
Thanks for any help.