It's normal that yun change in AP mode when It can't connect to a router ?

My problem is using 3G mobile router, sometime happen that the router is off and when Arduino try to connect to it or send some data to internet it start blinking a blu wifi light and then change status starting to work like an access point.

Thank you whether you can help me. Cristiano (Sorry for my English !)

Yes, this is normal. It's a "feature" to help you out in case you make a mistake configuring the WiFi settings - if it can't connect, it resets back to AP mode so that you can connect to it and try again. But once you have it connecting properly, this can be more of a hindrance than a help.

Once you have the networking set up the way you want, you can disable this behavior fairly easily. If you know the Linux command line tools, start an SSH session, and edit /etc/rc.local and comment out the line wifi-live-or-reset. That is the script that runs after booting up, checking for a WiFi connection, and reseting back to SP mode there isn't a connection.

You can also do it through the web configuration pages: Load the Yun's configuration web site, log in, and choose the Configure button, then the Advanced Configuration Panel (luci) link. Select the System tab, then the Startup tab, and at the bottom of the page there is a large edit box titled Local Startup. Look for the wifi-live-or-reset line, and place a # character at the beginning of the line to comment it out. Click the Submit button, and your Yun should never revert back to AP mode when it can't connect (it should keep trying to connect as long as necessary.)

Thanks a lot I will try asap :) But this also mean that if the router is off for two days, arduino try to connect to it continuously ?

Cristiano_Russo: But this also mean that if the router is off for two days, arduino try to connect to it continuously ?

Of course. Isn't that what you would want?

It's just like a phone, tablet, or laptop - always looking for a WiFi hotspot.