BlakeFoster / Arduino-Ping

ICMP ping library for the Arduino
59 stars 44 forks source link

Fix of buffer size, else error shows up #1

Closed powtac closed 10 years ago

BlakeFoster commented 10 years ago

Thanks for the patch. What version of the Arduino software and board does this work with? I think there must have been a breaking change to the W5100 library, because I'm seeing the opposite problem. We may need to use some preprocessor magic to deal with it.

powtac commented 10 years ago

Hi Blake,

I use the latest Beta 1.5.5 on Windows 7.

But I manually downloaded the latest versions of ICMPPing.ccp and ICMPPing.h and I used them.

The error occurs also with the "Version 2.0" version which is referenced from the Arduino's website.

I'm aware that this might be related to the Beta 1.5.5 version but I'm very disappointed by the quality of Arduino's libraries so far...

Offtopic: I'm a total C noob. But familiar with a lot of other languages ;-) Currently I try to get https://github.com/powtac/Autarc_LAN_User_Stats/ up and run.

BTW: do you know how to receive the mac address from a device in the network?

Simon

powtac commented 10 years ago

With "disappointed by the quality of Arduino libs" I mean not your lib! Thanks for your work!

But when I look at http://arduino.cc/en/Main/ReleaseNotes I see a lot of problems with "Ethernet".

This bug:

took several hours/days of my live. :-( And they still don't mention it on the official Ethernet.begin() reference page! That is a really bad behavior. There is no real feedback channel. I the forum I pointed to several problems with the documentation but no response. So the problems still exist.

BlakeFoster commented 10 years ago

Hi Simon,

I see the same problem running version 1.5.5 on Linux. Rather than mucking with the preprocessor, I tagged the latest code on master as version 2.1 and left a note in the readme. I'll just merge this as is, but if you'd like you can add yourself to contributors.txt first.

Getting the MAC address for another device on the network would be tricky unless you're connected directly to it. The problem is that MAC addresses are a link-layer thing. When you send a packet over Ethernet, the Ethernet header will have your router's MAC address rather than the destination MAC address. The destination MAC address doesn't get plugged in until the final hop, when the packet is sent to the destination.

If you do happen to be connected directly to the device, you could probably get the MAC address from the W5100.

powtac commented 10 years ago

Thank you for your answer + explanations! For such a small bug report i don't feel to be a contributor... Thanks for the new tag and clarifying the problem in the description.

BlakeFoster commented 10 years ago

No problem. If you want to reopen the PR, I'll merge it.