Shop OBEX P1 Docs P2 Docs Learn Events
Receiving Broadcast Data w/o an additional socket — Parallax Forums

Receiving Broadcast Data w/o an additional socket

DynamoBenDynamoBen Posts: 366
edited 2012-12-09 15:47 in Accessories
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?

Comments

  • DynamoBenDynamoBen Posts: 366
    edited 2011-03-31 14:05
    It seems I've stumped everyone, includeing WizNet. I emailed WizNet US last week with this question and have gotten no reply. I also did a bit of testing and it doesn't seem it is possible, but at the same time it should be...confused. If anyone comes up with anything please let me know.
  • DynamoBenDynamoBen Posts: 366
    edited 2011-04-04 17:03
    Just got a reply from wiznet:

    "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.
  • JohnCJohnC Posts: 64
    edited 2012-10-16 07:44
    DynamoBen wrote: »
    Just got a reply from wiznet:

    "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.
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-16 08:56
    JohnC wrote: »
    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.
  • JohnCJohnC Posts: 64
    edited 2012-10-16 11:10
    Actually, I need to back up a step or two...

    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?
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-16 11:20
    Can you broadcast on 255.255.255.255? If so can you receive those packets?

    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
  • JohnCJohnC Posts: 64
    edited 2012-10-16 12:38
    User error it seems... I opened up the wz's subnet mask from 255.255.255.0 to 255.0.0.0 and it came alive.

    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.
  • DynamoBenDynamoBen Posts: 366
    edited 2012-10-16 13:35
    JohnC wrote: »
    User error it seems... I opened up the wz's subnet mask from 255.255.255.0 to 255.0.0.0 and it came alive.

    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.
  • JohnCJohnC Posts: 64
    edited 2012-12-07 19:37
    There's no code posted yet, but in this post is a picture of the DMX daughtercard I built for the Spinneret system. Ended up with a two universe Art-Net bridge which works so well you forget it's even attached.

    http://response-box.com/rgb/2012/12/christmas-2012/
  • twctwc Posts: 107
    edited 2012-12-08 06:36
    Wow, that's fine work!...Reminds me of that Christmas Vacation movie - turn everything on and we can see you on Google satellite :=)
  • JohnCJohnC Posts: 64
    edited 2012-12-09 15:47
    @twc - That makes me smile.

    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!
Sign In or Register to comment.