Arduino WiFi Shield UDP Support

Hello and thanks for reading my first post,

Just starting out in the world of physical computing and have brought myself an Arduino Uno R3 and the WiFiShield (http://arduino.cc/en/Main/ArduinoWiFiShield). One of the projects I'm working on requires the use of UDP packets, the WiFi Shield mentions its capable of both TCP and UDP in the description but where as the EthernetShield has its own EthernetUDP class I don't see the same for the Wifi Shield. My question is how do I code the Wifi shield to listen for UDP packets from within the Arduino IDE?

Regards,

jfrmilner

It says in the documentation that the WiFi library is much like the Ethernet library but UDP doesn't seem te be part of it... :~
I've search for this alot but haven't found a solution yet...
Anyone who found a solution?

Hello

i have the same problem and want to use UDP for OSC communication.
so i bought a mega 2560 and the Arduino Wifi Shield cause the description says

...
An Atmega 32UC3 provides a network (IP) stack capable of both TCP and UDP.
Use the WiFI library to write sketches which connect to the internet using the shield.
...

i searched al lot and tried to rewrite the EthernetUDP Class. no success
but my skills are not good enough. :frowning:

would be really great if someone can help ?!?

here i found out that the last update is about 4 month ago...
perhaps the admin can show some beta code in the branch.

best regards
mamaretti

The Arduino library has no UDP support yet but the recently (I last checked about 2 weeks ago, must have happened since) published source code of the shield firmware seems to support it. The SPI communication layer which interfaces with the main Arduino doesn't have any UDP calls yet, so with the current firmware you won't get UDP running, unfortunately.

At least the souce of the firmware is available now so there is hope that someone will fill up that whole in the not so far away future.

@mamaretti

What OSC library are you going to use, or are you going to write one yourself ?
If you intend to use ArdOSC currently no WiFi shield supports this library out-of-the-box.

ArdOSC uses some low level functions of the Ethernet library that "talk" directly to teh Wiznet W5100c chip on the Arduino Ethernet card. You'd have to rewrite that portion and adaptit to the specific hardware your WiFi shield uses.

If you are interested in an alternative solution I'll PM you so we don't hijack this thread :wink:

hi headroom

yes i tried ardOSC and Z_OSC with no success

my skills are not so good to rewrite the W5100 part of the libary.
(i thought some socket-methods are not equal to the WiFi libary)

if some can help i would be very happy
so im am really interestet in you alternate solution

Does anyone know if any progress is being made on this? Are there any experimental projects out there on github or anything. I totally expected my brand new wifi shield to have this support as it was claimed in the docs. I'd love to help out and rewrite the ethernetUDP library, but if someone has started something I don't want to duplicate any efforts, etc...

hi themadcanudist

i just tried to rewrite the ethernetUDP library.
but then i found out that not to easy to rewrite the W5100 part.
(my skills are not good enough)

so it would be great if you have more skills to do that :slight_smile:

I can take my best shot at it. I've been reading through the firmware and Wifi libraries and may be able to hack something together. I'll have to give it a shot. One caveat is if there's anything that needs to be modified or is missing from the firmware (which I'm not sure of yet) we won't really be able to move forward.
At this moment, I've been unsuccessful in importing the firmware project in to eclipse, to compile it. I'm waiting on a response from the arduino devs on providing the community with some documentation and resources to do this on our own.

mamaretti,

I took some time to take a crack at this. I'm 99% sure at this point we need the instruction for compiling the firmware (via Eclipse or otherwise). I traced back the code and although there is some support in the firmware for UDP, there is a stack of functionality that needs to be added in to the firmware for the WiFi libraries to even begin implementing UDP. If it were just WiFi libs, we could get started right now.

There are missing functions to create/send/end UDP packets and communicate these requests through SPI interface to the wifi chipset, etc... They're all there for TCP, but not for UDP.

I'll continue to harass the devs :wink: Perhaps you should use your network and resources to see if you can get more people interested in this and make some additional requests. The more the merrier.

Would LOVE to see UDP support fully available for the Arduino WiFi shield. I just got it and now that I find out there are no UDP libraries for it like there are for the Ethernet shield, I'm disappointed. I don't have an Ethernet connection in the room where the arduino is going to live for this project. Wifi and Ardumote were the perfect solution till I found out that I can't send UDP messages from Ardumote to the Wifi shield.

I did use the example web server code to write a quick web page that has s couple of links for turning on and off lights, etc. but the shield seems to fall asleep / disconnect from the network after some period of time and it won't wake up when a new HTTP request comes in. So that hasn't proven terribly useful either.

Hello all,

I too have bought a wifi shield and would like to communicate with my arduino via ardumote or similiar for a door unlocker project. I would love to help move this along, but am quite the newbie and dont have the skills to start reprogramming.

kdecker, I would love to see you code if you would be so inclined, i might be able to get that up and running to tide me over untill UDP support is all figured out.

L

kdecker:
Would LOVE to see UDP support fully available for the Arduino WiFi shield. I just got it and now that I find out there are no UDP libraries for it like there are for the Ethernet shield, I'm disappointed. I don't have an Ethernet connection in the room where the arduino is going to live for this project. Wifi and Ardumote were the perfect solution till I found out that I can't send UDP messages from Ardumote to the Wifi shield.

I did use the example web server code to write a quick web page that has s couple of links for turning on and off lights, etc. but the shield seems to fall asleep / disconnect from the network after some period of time and it won't wake up when a new HTTP request comes in. So that hasn't proven terribly useful either.

I've posted this quite a few times over the last several months. In order to connect to an Adruino Board per WiFi does not per se require a WiFi shield. A "normal" Ethernet Shield can be connected with a short ethernet cable to a little pocket router e.g. a TP-Link TL WR-702n etc. I've got this working with a TL WR-702n and TL WR-703n using OSC and TouchOSC. Ardumote should not be a problem.

Count me as one more person who bought the Arduino WiFi shield thinking it would have a simple UDP example like the Ethernet shield did and then found out it didn't. Whoops. Hopefully someone figures this out soon.

The W5100 ethernet shield have the library and it can support 4 udp 'connection', but my project also need to use a wifi shield, really hope someone can give a solution.

Hi

Would also love to see proper UDP support for this official WiFi shield.
I also have a Linksprite WiShield 2.0 (Asynclabs compatible), UDP works fine there, but the library is a complete mess and not fun to work with.

I'm also sitting with a project where this would be immensely useful. I hope someone pieces it together soon!

Hi All,

Answering my own questions here in the hope to help others that read this thread.

I noticed that there is a dev_udp branch over at GitHub - arduino/wifishield: Arduino Wifi Shield which I can confirm works very well with UDP. It will require that you update the firmware on your wifi shield and replace the library ( this includes a new example WifiUdpSendReceiveString ) in your arduino ide installation but nothing overly difficult.

Hope this helps,

Hi Jfrmilner,

I'm glad someone is able to get this to work.
I have been trying like mad to get this to work with the udp_dev branch but had no luck. I'm fairly experienced with UDP on OSX and iOS and win but for some reason I can't get the bloody arduino to play nice...

could you please document your steps our take a look at the issue I posted here: UDP problem · Issue #28 · arduino/wifishield · GitHub

I have no idea where I'm going wrong :frowning:

best,
tim.

I would also like to see this working, could be veeeery useful.