I am having this issue, the following code works on the simulator and not on the device. I am using a network sniffer to view the network traffic in real time, I can see the packets when I use the simulator but when using the device I am unable to. I have reported a bug but I would like to know if anyone else has run into this issue, or can verify this is indeed happening.
local socket = require "socket" local broadcast local UDPBroadcaster = socket.udp() UDPBroadcaster:setoption("broadcast", true) UDPBroadcaster:setsockname("\*", 0) UDPBroadcaster:settimeout(0) function UDPBroadcast() UDPBroadcaster:sendto("SOME MESSAGE OR DATA", "255.255.255.255", 8080) print("broadcast") end broadcast = timer.performWithDelay(1000,UDPBroadcast,-1)