Shop OBEX P1 Docs P2 Docs Learn Events
Can the W5200 ping an IP address? — Parallax Forums

Can the W5200 ping an IP address?

Does anyone know how to program the W5200 to ping an IP address? I want to ping a known server when my W5200 boots up so I can get verification it is connected to the internet and all systems are functioning properly. I was using an SNTP request but this occasionally fails when the selected server is busy so the code is left with a false negative for internet connectivity. I figure a ping command would be more likely to get a fast response but I cannot find how one does this using TCP or UDP.

Comments

  • @Peter J. has a nice trick on his Tachion Thread.
    He is simply requesting the start page from www.google.com.
    Then he parses the date and time out of the html response and uses it to set/correct the onboard RTC or uses a soft-RTC if no hardware one is there.
    If you can not reach google you might have no internet connection...

    Enjoy!

    Mike
Sign In or Register to comment.