Ping & port forwarding

Hi, I have an Arduino & a WiShield setup connected to my home network which uses an Airlink 101 router connected to Comcast. The Wishield is used to send out emails via a PHP page. What I want to do is ping the WiShield from my blog using a PHP page. I have the PHP page setup where I just type in a url and it pings it. Once it is working correctly I will automate it. My 2 questions are: 1. How do I know the address of my home network and WiShield ? 2. If I am using a PHP page, do I want the HTTP option for port 80 when setting up port forwarding?

Thanks.

You can start by activating the DDNS-feature from your router. Go to http://www.dyndns.com/ and create yourself an account, choose suitable name for your router, and then use that information in your router.

Then, I expect you have NAT in your router, go to "port forwarding" section in your router, and point your arduinos IP-address for forwarding, don't forget to use correct port. Now you can try from internet to ping directly with the name you have chosen earlier.

I hope this messy blaablaa helps a bit, at least for the next question. XD

Cheers, Kari

Hi, I'm not sure why I need a third party service to do this. Can't I just enter an address and ping it?

Here are my choices for port forwarding on my router. What should I select?

Pauly: Hi, I'm not sure why I need a third party service to do this. Can't I just enter an address and ping it?

You can. The problem is that unless you're paying your provided for a static ip address your address will change every time your router reconnects. With DDNS, your router sends information to a DNS server on the internet so that the world always knows your current IP address.

In order for your router to forward PING packets to a device on your internal network one of the choices under "Protocol" has to be ICMP.

Exactly.

If you are sure that your public IP stays static, you can use it, why not. Maybe it is a good idea to start as it is, at least you can test your system. If you later need to use name instead of IP-address, you can activate DDNS feature.

Just go ahead and have some fun!

Cheers, Kari

Also before attempting this, check if the WiShield has support for the ICMP protocol, that handles Ping.

Often some of protocols are not available because of low memory on the devices that implement the TCP/IP stack.

This is the reason you can’t make a HTTPS connection from an Arduino ethernet shield.

Thanks for the help guys.

In order for your router to forward PING packets to a device on your internal network one of the choices under "Protocol" has to be ICMP.

My only choices under Protocol are TCP, UDP or both. If I am unable to Ping the WiShield, what is another way to check it is on and running from an outside server?

Pauly: If I am unable to Ping the WiShield, what is another way to check it is on and running from an outside server?

Ping isn't a good application for that anyway, it could be hung and still responding to ping packets.

On your server set up a page that logs the last time it was retrieved. Have the arduino retrieve that page once a minute.

On your server set up a page that logs the last time it was retrieved. Have the arduino retrieve that page once a minute.

Not a bad idea, but once a minute seems like a waste of resources. I'll give it a try, just less frequently. Now on learn more PHP like writing to a text file and append.

It won't be possible to forward ICMP traffic to a device connected to the AP/Router. The ping will end up being returned from your Airlink 101 instead. If you decide to go with a ping check, look into TCPPing in Linux, or tcping under Windows. These apps allow a ping over TCP to a specific port which has been forwarded on your router, and should be sufficient to determine that your Arduino is powered on and (mostly) functional.