GL.iNet: AR300M and BTFon

Configure the ar300m by connecting to the devices http server (192.168.8.1). The easiest way to connect is using the ethernet cable as the Wifi interface may not be running (red light on or flashing indicates Wifi interface is running). If you don't have an ethernet port then see below.

I have set the following:
  • Latest firmware 2.27
  • Wireless settings:
    • 300M (11ng)
    • WPA/WPA2 Mixed (not the most secure)
    • Channel auto
  • Internet settings
    • WISP connection to BtWifi-with-FON
Turn DNS forwarder on (advanced login).

Login to the ar300m by ssh:

ssh root@192.168.8.1

Install `wget`:

opkg update
opkg install wget


Add the `bt_login.sh` script from github. Thanks Tony Corbett for the script and most of the instructions...

Update the username and password to match your BT Fon username and password.

Change the permissions on the script:

chmod +x bt_login.sh

Run the script from crontab:

crontab -e

Add the following line (runs the script every 2 minutes):

*/2 * * * * /root/bt_login.sh >/dev/null 2>&1

on my system this starts `vi` so to write the changes out use the key sequence `Esc` `:wq!`.

Start crontab as by default it is not enabled:

/etc/init.d/cron start
/etc/init.d/cron enable


To check the script is being run:                                                          
```                                                                                        
logread                                                                                    
```                                                                                        
and look for the script name.                                                              
                                                                                          

Wifi On/Off

On initial boot the Wifi may not be on. Press the `reset` button for one to two seconds. This toggles the Wifi on and off.                                                               
                                                                                           
Do not press for too long as it will reset the device settings.                            
                                                                                           
The `bt_login.sh` script will stop the Wifi from being automatically turned off by continually using the wifi.                                                                              
                                                                                             
Potentially renaming `gl-health` can stop the wifi from being turned off (not tried this).   

Update

Changed crontab entry to run every minute rather than two minutes. Fon connection sometimes logs out.

Comments