I am having great difficulty receiving a UDP broadcast in Python. A device connected to PC via ethernet broadcasts messages on a specific address and port. I have tried numerous multicast python examples found online but I can never receive the data. Using wireshark I can see the UDP broadcasts are reaching the PC.
I have tried on OSX and Linux and neither work. I can only assume the messages are not being received because the device uses a non standard UDP structure, i.e. no checksum validation etc
Any ideas on how to receive these UDP broadcasts?
Thanks!
Edit: In the simplest form the current code would be:
from socket import *
s=socket(AF_INET, SOCK_DGRAM)
s.bind(('239.255.60.60',4876))
m=s.recvfrom(1024)
print (m[0])
However I have tried additional multicast examples such as Multicast in Python and am yet to be able to receive ANYTHING!