UDP on WiFly Shield

Hi patient and skilled forum members!

I have an Arduino Uno with a (new) WiFly Shield that I would like to use to continuously send data to a laptop over WiFi. The data is small, it is just the values of 3 of the analog inputs on the Arduino.

I originally wanted to do it with OSC but I am now thinking that a straight UDP-connection without OSC-formatting would be just as fine as each message is the same, just 3 integers.

However, I can not get it to send anything at all to the laptop. All the test projects that come with the WiFly-library work so the shield, the Arduino and the WiFi work fine. (The Arduino can connect to google.com over the WiFi for example).

In my code I try to set the Shield in UDP mode and then send data with the SpiSerial.print-command but nothing I have tried makes anything show up on the laptop or on wireshark. UDP from other computers on the network get through just fine and show up on wireshark.

I have read on these boards that people have succeded in sending UDP/OSC from a WiFly-shield to a PC. Does anyone have any links to where such a project is documented or any other relevant experience, please let me know. I have been at this for a week now and I am really not getting anywhere.

Thank you.

Update: I modified the WebClient example so that it tries to connect to the computer I want to send UDP to and the GET-request shows up on wireshark. This reinforces my feeling that there is just something about how I set the WiFly shield up to send UDP that I do wrong. I tried to set all the commands listed in the manual but obviously I am doing something wrong.

The program netcat can read anything that comes over a connection, or send anything to another computer using UDP or TCP. It is extremely useful. Google “netcat examples” for some ideas.

Why do you need Arduino at all? The wifly can do all this work if it’s just sensor data. The module can constantly read its sensors and upload the data to URL or UDP if you want to use netcat to capture the stream or write your own little server to accept the connections and then write the stream somewhere… like MySQL or text file

I personally love “nc” or NetCat in TCP mode with a timeout value that automatically closes the connection even if the wifly times out and then I write the data into text file just by piping it “|” to the file :slight_smile:

But bottom line is that the module itself can act as a pretty cool sensor controller with no need for arduino or any other gear - plenty of GPIOs on the module and 3 analog sensors if I am not mistaken.