Met problem connecting my Yun to the Internet

I met problem connecting my Yun to the Internet. Below is the case:
I can connect to the Internet when my Yun is using my phone's 3G network but it fails when using the WIFI either of my house or office.
By using serial monitor - ifconfig, I can see that inet addr under wlan0 section when using different network (3G and Home WIFI ) are different. I can only connect to my Yun with putty via the 3G's inet addr under wlan0.

Anyone knows why? Thank you all in advance!

deedeng:
::::SNIP::::

Anyone knows why? Thank you all in advance!

@deedeng, When you connect your Yun to your home (or office) network can it talk to the internet?

To test your Internet connection from your Yun

  • connect your Yun to your computer with the USB
  • connect the Yun to the Internet
  • start the IDE
  • load the HttpClient tutorial from the menu (File->Examples->Bridge->HttpClient)
  • follow the instructions in the tutorial
    If you get the ASCII text back, then you need to make sure all your devices are on the same network. And retest the programs you are have problems with.

If you DO NOT get the ASCII text back, then the following is a canned answer.

= [Q] After configuring a new Arduino Yun for my (home/office) wifi, I cannot connect to it. What do I do? =

It is possible the new configuration did not take. You can try three things.

  1. Try connecting to "arduino.local", or try 192.168.240.1 - This is the factory seting.

  2. Check your router config and see if Yun is connected to it. If it is, get the IP from it and connect to it that way.

  3. Use the IDE to upload YunSerialTerminal. Open the Serial Monitor, then, run ifconfig to get the IP.

==

If none of this helps, then copy the answer you get back from ifconfig as well as iwconfig.

Jesse

What is the WiFi channel on your home router?