Check if connected to Internet.

Good mawnin guys :)

Someone got an idea how I could check if the Yun is connected to the internet?

Cheers Kaul

..you can simply try to ping an external resource (like 8.8.8.8). If it works, you are online.

Look at the end of this page, there's an example script: http://wiki.openwrt.org/doc/recipes/3gdongle

alright! thanks a lot! :)

In the examples you'll find also WiFiStatus under Bridge that could help

mantissa00: In the examples you'll find also WiFiStatus under Bridge that could help

That only checks if you are connected to a WLAN, not if you have beyond that connection to the Internet...

Ralf

Sorry, I just came across this thread again and I still dont get it. I want to implement the check in the arduino code directly.

kaul: Sorry, I just came across this thread again and I still dont get it. I want to implement the check in the arduino code directly.

Which Arduino are you talking about? We are here in the Yun forum, and in an Arduino Yun, only the Linino/AR9331 part has connection to the Internet. So you have to test this from a script/program (using Python, Lua, etc) on the Linino side. If you sketch on the Leonardo side of the Yun (Atmel ATega32u4) needs to have that information, you need to relay that via the bridge...

Ralf