Arduino Yún, managing wifi reset and timeouts

Arduino Yún is a great prototype hardware platform.
It has integrated Ethernet and Wifi modules and it runs a distribution of Linux for embedded systems, named OpenWrt-Yun.

When you first power your Arduino Yún or you reset its network configuration, it has the ability to act as an Access Point; thus, it will create a WiFi network called ArduinoYun-<THE BOARD MAC ADDRESS>.
In this way you can connect your computer to that network.



Then, entering http://arduino.local or 192.168.240.1 in your browser you will able to configure the WiFi network (in addition to Ethernet and a lot of other things...) in order to connect the board to your WiFi network.


The network configuration is persistent, so if you power off the Arduino, next time you power on it again it will try to connect to the configured WiFi network.


But, if something goes wrong and the Yún is not able to connect to the configured Wifi network within 60 seconds, by default it resets the network configuration (loosing your configuration) and it enters again in the Access Point mode.


If, for any reason, you need to override this behaviour you can

  • login to your Yún via ssh as root (default password is arduino)
ssh root@192.168.240.1 

  • edit the /usr/bin/wifi_live_or_reset file:
vi /usr/bin/wifi_live_or_reset
  • edit the timeout as you prefer changing the MAX_SLEEP value. For example, for 3 minutes:

MAX_SLEEP=180


Save the file.
Power off and then on again the board.


In case you need to disable the wifi reset at all, then:

  • edit the /etc/rc.local file commenting the following row, as:
#wifi_live_or_reset


Save the file.
Power off and then on again the board.

That's all.

Leave a Reply

© 2014-2015 Paraimpu Srl . Powered by Blogger.