Pinging a IP Address
bsnut
Posts: 521
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?
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
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.
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.
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
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.
http://en.wikipedia.org/wiki/Network_Time_Protocol#SNTP
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.