I can receive UDP messages directed at a specific IP address like 192.168.1.100, but I can't seem to receive broadcast messages either configured as an access point or connected to the local network.
Here's a sample based on the example code:
wifi.setmode(wifi.STATION)
wifi.sta.config("myssid","mypassword")
wifi.sta.connect()
wifi.sta.setip({ip="192.168.1.255",netmask="255.255.255.0",gateway="192.168.1.1"})
srv=net.createServer(net.UDP)
srv:on("receive",function(s,c) print(c) end)
srv:listen(10000)
This works if I set the IP to 192.168.1.100, but not if the IP is 192.168.1.255 or 255.255.255.255.
I'm sure I'm making a simple mistake, but I can't see it. Any suggestions?