Does anybody know how to send a ping from the Arduino with an Ethernet shield (with W5100)?
Ethernet ping related post.
Got an entry in the forum with a library: http://forum.arduino.cc/index.php/topic,8701.0.html
Thanks to Blake Foster.
The code from Blake Foster is doing the job.
For running on Due, I only had to modify a few lines (version 1.52 of ide).
In ICMPPing.h comment line 19:
// typedef unsigned long time_t;
In ICMPPing.cpp modify lines 112, 113:
// uint8_t buffer = W5100.readSnRX_RD(socket);
// W5100.read_data(socket, (uint8_t *)buffer, header, sizeof(header));
uint16_t buffer = W5100.readSnRX_RD( socket );
W5100.read_data( socket, buffer, header, sizeof( header ));
and 119:
// W5100.read_data(socket, (uint8_t *)buffer, (uint8_t *)&echoReply, dataLen);
W5100.read_data(socket, buffer, (uint8_t *)&echoReply, dataLen);