Nuelectronics ethernet shield and UDP

Does anyone know how to send UDP Datagrams from the Nuelectronics ethernet shield (ethershield) as the example code included with the library only includes TCP based examples.

The plan is to have the arduino fire off datagrams to the IP address of a (virtual) machine. Building an app that accepts the datagrams (on the VM) seems to be the easy part as I have already cobbled something together in java that listens for datagrams on the specified port.

Alternatively, is this possible with the official ethernet library/shield? (Ideally I'd like to run it with my current device but the official shield is based on a Wiznet controller and the nuelectronics one is based on a Microchip ENC28J60 so libraries will not be compatible)

Any assistance would be greatly appreciated.

Another side question, I saw a demonstration of a Wiznet powered ethernet device responding to ping requests without any code for ICMP replies included in the arduino code. Does this mean that the Wiznet hardware in the official controller is capable of responding to ping requests "out of the box" with no code required? (considering switching but wanting to avoid too many extra costs)

Hi,

I have an example of sending UDP broadcast messages using the nuelectronics ethernet shield, along with updated library. Have a look at http://blog.thiseldo.co.uk/?p=422

The broadcast example takes a payload from my currentcost and sends it out, there isnt any reply required or received. The udp packets are received by a perl script running on a linux box.

Hope this helps. :slight_smile:

Andy

Hello,

I make a comment at your site but i think is better you forget what i wrote...

I try your library and and get an error:

In function 'void broadcastData()':
error: 'class EtherShield' has no member named 'ES_fill_buf_p

Can you please help me?

Thanks

Only digging up a 3 month old thread. ;D

Andy, is there a way to go the other way and receive UDP packets on the arduino side?

Even if it is just sitting there polling the enc chip on the nuelectronics shield, that is fine (would act like a safety disable watchdog :slight_smile: )