Announcement

Collapse
No announcement yet.

UDP setup for XpicoWIFI

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • UDP setup for XpicoWIFI

    I have a laptop communicating over Ethernet to a number of xpico wifi modules. I need to send out a packet to ALL the xpico on the LAN (the xpico are connected to a serial controlled board that deciphers the packets to see if it is the correct target). I need all the xpico to accept the data so the target itself can respond if it is the correct one so data needs to be able to be sent back. The laptop ip is the only one that will be constant.

    How do I setup the xpicowifi to accept this data. I figure it would have to be UDP unless there is another way. Thanks for the help. I am using the WI232+ modules.

  • #2
    What you're looking to do is a UDP Broadcast. Let me make some assumptions:

    All the xPico Wi-Fis are connected as Wi-Fi clients to the same subnet as the laptop, let's say 192.168.10.XXX
    You want to query the devices via UDP port 5000
    Your device will respond to the same IP address and port number that it received the broadcast from

    To set this configuration:
    Set the Line to protocol Tunnel (then click Submit)

    In Tunnel configuration:
    Click Accept
    Set Mode to Disable (then click Submit)

    Click Connect
    Set Mode to Always
    Local Port 5000
    Open Host 1
    Address is wlan0
    Port leave as <None>
    Protocol is UDP
    Reception is Unrestricted
    Click Submit

    Click Disconnect
    Set Timeout to a value that gives your serial device time to respond. Let's say 3000
    Click Submit

    Now you're ready. From your laptop send a UDP broadcast to 192.168.10.255 port 5000 and you'll see the data on the serial ports. Your serial device has 3 seconds to send a response.

    Mariano

    Comment


    • #3
      What configuration would another wi232+ be if I wanted it to be the one to send the broadcast data?

      Comment


      • #4
        I'm not sure if GridConnect makes any modifications on the wi232+, you'd have to contact them for that. But on a standard xPico Wi-Fi, you would do it like this:

        In Tunnel configuration:
        Click Accept
        Set Mode to Disable (then click Submit)

        Click Connect
        Set Mode to Always
        Local Port blank
        Open Host 1
        Address is 255.255.255.255
        Port set to 5000
        Protocol is UDP
        Reception is Unrestricted
        Click Submit

        Click Disconnect
        If Timeout is not <Disabled>, then blank whatever value is there
        Click Submit

        Now whatever the xPico Wi-Fi receives on the serial port, it'll broadcast over the network to port 5000.

        Mariano

        Comment


        • #5
          so in both of the above, I can send over port 5000 on the one that sends the data but can the others send back response on port 5001?

          Comment


          • #6
            In the first example, it will respond to whatever port the data comes from.

            In the second example, if you want to send the data from port 5001 (so the response comes into that port), then you should set the Local Port to 5001.

            Mariano

            Comment


            • #7
              so from the same unit, it is not possible to send from one port and receive on another?

              Comment


              • #8
                Not with the standard firmware Tunnel application, but it can be done with a custom application using the SDK. My suggestion is to contact GridConnect since it's their hardware product prior to modifying any firmware.

                Comment

                Working...
                X