Shop OBEX P1 Docs P2 Docs Learn Events
Pinging a IP Address — Parallax Forums

Pinging a IP Address

bsnutbsnut Posts: 521
edited 2015-05-07 19:40 in Accessories
I am working on project that needs to ping a IP address and receive the echo back from the ping.

The reason for this is, we have DSL Modem dosen't stay active to stay connected and sometimes drops off and dosen't let us get out to the internet and we end up powering the medom down to fix the issue. This is due where we are at on the DSL line that we been given. We are at the end of this line. For those wondering why we are using DSL, since it is cheaper for us and we don't use the internet that often. The current fix is a timer that turns off the modem and back on, but we want to use the Spinneret to control a relay that will power the modem down when it dosen't see a ping back from a IP address.

Right now I am using the Echo Demo by Timothy Swieter for testing the network and trying to echo back this IP address 8.8.8.8 port 80. But, the problem is that the demo isn't echoing it back. I tried different port numbers and no luck.

Does anybody have a good IP to ping or suggestions?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-04-29 20:40
    You can ping parallax.com (67.104.29.61), and it will return with stats.

    -Phil
  • bsnutbsnut Posts: 521
    edited 2015-04-30 19:41
    You can ping parallax.com (67.104.29.61), and it will return with stats.

    -Phil
    Ok, I will give that a try with our network router. What port number should I try? Or, does matter which port I use.

    The first try was using my laptop for debuging and the Spinneret was connected to our router. I may test with my laptop as well.
  • xanaduxanadu Posts: 3,347
    edited 2015-04-30 20:15
    Most DSL modems have a keep alive option in the firmware. Are you able to access the modem's settings? Look for it, there is usually connect on demand, or keep alive and a redial period.

    If it doesn't have that I wouldn't continuously ping a single public IP often. Leaving an email client open should do the trick.
  • homosapienhomosapien Posts: 147
    edited 2015-05-01 07:23
    Something that may save you hours of frustration:

    I found that for some reason my router blocks ping attempts that go beyond the LAN (ie, out onto the Internet). To make ping work, I needed to set the security setting on the router to basically 'off'. It was a while ago, but I think the router was blocking the ping 'answer', cannot quite remember how I came to that conclusion. I spent a lot of time working with port forwarding, DMZ host and static NAT with little progress. Finally just ended up doing a DIY ping that consisted of doing a http GET to the Google page and seeing if it got a response.



    Nate
  • bsnutbsnut Posts: 521
    edited 2015-05-01 10:45
    homosapien wrote: »
    Something that may save you hours of frustration:

    I found that for some reason my router blocks ping attempts that go beyond the LAN (ie, out onto the Internet). To make ping work, I needed to set the security setting on the router to basically 'off'. It was a while ago, but I think the router was blocking the ping 'answer', cannot quite remember how I came to that conclusion. I spent a lot of time working with port forwarding, DMZ host and static NAT with little progress. Finally just ended up doing a DIY ping that consisted of doing a http GET to the Google page and seeing if it got a response.



    Nate
    That's a great suggestion. I was thinking that as well. Would passwords on the router also cause me problems as well?
  • bsnutbsnut Posts: 521
    edited 2015-05-01 11:04
    xanadu wrote: »
    Most DSL modems have a keep alive option in the firmware. Are you able to access the modem's settings? Look for it, there is usually connect on demand, or keep alive and a redial period.

    If it doesn't have that I wouldn't continuously ping a single public IP often. Leaving an email client open should do the trick.
    We will be pinging once or twice a hour.
  • homosapienhomosapien Posts: 147
    edited 2015-05-01 13:06
    Would passwords on the router also cause me problems as well?.

    The only password I have seen on a router is the password that protects the router settings, so, no, I do not see how that would directly apply here.

    All I am saying is that if the ping utility is not working with the Spinneret, try it on a PC on the same network (using Windows, use a command prompt and enter 'ping www.google.com', for example). The result of that test should allow you to determine if the problem is with your Spinneret code/hardware or your network/modem. I spent a lot of time fiddling with my Spinneret before I realized it was my modem that was actually causing issues with the ping utility.
  • xanaduxanadu Posts: 3,347
    edited 2015-05-01 16:46
  • bsnutbsnut Posts: 521
    edited 2015-05-06 22:02
    Right now, we are still having problems with the network and I know that the Echo Demo works and as well the Easy Web Server Demo 1 --- What am I doing wrong on the network side? Tips would help greatly. Or, is their a way to test the Echo Demo or the Easy Web Server Demo 1 using my PC, since I don't have WiFi and I use my smart phone as my internet connection at home?
    xanadu wrote: »
    I like this idea and would great since it's design to be pinged all the time. Also what method or methods should I try?
  • xanaduxanadu Posts: 3,347
    edited 2015-05-07 19:40
    For time the "SNTP Simple Network Time Protocol v2.01.spin"

    http://en.wikipedia.org/wiki/Network_Time_Protocol#SNTP
  • I know that the Echo Demo works and as well the Easy Web Server Demo 1

    I was able to get the Easy Web Server Demo 1 working, but if you don't access every few minutes the Spinneret connection closes. When I ping it IP that the Spinneret is on and get good reply back from it saying it connected.
    Now, my question is. Is there a method or methods in DHCP_GBSbuild_01_28_2011.spin by Roy ELtham that I can use to keep the Spinneret connection open all the time while to the switch. 
Sign In or Register to comment.