Receiving Broadcast Data w/o an additional socket
DynamoBen
Posts: 366
I've read through the W5100 datasheet and tested a few different methods and I can't seem to be able to receive broadcast messages w/o setting up another socket specifically for that purpose.
Basically I don't want to burn up another socket to consume UDP broadcast data when I already have a socket open receiving non-broadcast data via UDP. Am I asking too much or missing something obvious?
Basically I don't want to burn up another socket to consume UDP broadcast data when I already have a socket open receiving non-broadcast data via UDP. Am I asking too much or missing something obvious?
Comments
"Yes, W5100 fully supports broadcast packets as designed."
I'm trying to get their test setup and configuration since I can't seem to get it to work and they did.
Hey Ben - I'm working on probably the same problem using the 5100 chip and the current indirect drivers. Did you ever sort out a way to receive broadcast and directed packets through the same socket?
Specifically, (for anyone else reading) I'd like to received packets directed to 10.1.1.3 and 10.255.255.255 through the same socket.
I didn't figure this out, I will try to pick this back up and do some quick tests.
If I set my spinnernet to IP address 10.255.255.255, it properly receives all the broadcast messages which are being sent. But if I set it to something different such as 10.1.2.3, I only get direct traffic.
The blue RX light on the spinnernet flashes when the broadcast traffic is received (and I can confirm this using wireshark) in every case.
But using the spin code I can only retrieve direct packets.
I've currently got socket0 set up to receive UDP with the destination address 10.1.2.3
and
socket1 set up to receive UDP with destination 10.255.255.255
and
socket2 receiving TCP for a rudimentary web page display. The TCP part always works fine, and the web page is visible on the local network at http://10.1.2.3
All routines have pst.str("got data",13)) flags when they're triggered, but only the first and third ever run.
Ideas?
This seems to be an issue others are seeing with the W5200 but you are using the W5100: http://www.wiznet.co.kr/Sub_Modules/en/technical/Q_A_View.asp?boardcd=101&PK_NUM=27901
Now I'm able to receive the unicast and broadcast UDP packets through socket #1, as well as TCP for a small web page through socket #2.
Will post some code later if it's useful to anyone. It's an Art-Net to 2 universe DMX bridge. No RDM, just straight ethernet to DMX conversion.
Excellent, I like it when it is something simple. Please do post, I'm sure people can benefit from your code.
http://response-box.com/rgb/2012/12/christmas-2012/
Crazy thing is that total peak current draw is probably less than 1,200 watts - and that's for everything including a pair of computers. My toaster needs more power at full speed than a whole house of lights!