AR-300m LEDE and booting from NOR using switch

New owner of the AR-300M and really liking it so far. I plan to use it whilst travelling Europe to repeat free wifi hotspots in combination with an external USB antenna booster which has roughly a 2 mile radius with a clear line of sight. This is all working correctly with the only problem being the stock firmware the router comes with only detects it as 20dbi when it infact has a max transmit power of 32dbi. I’m not sure if its possible to fix this, if its any relevance its a Ralink USB 28xx.

The inlcuded OpenWRT reports the power correctly but of course lacks the functionality to save hotspots and connect to them automatically. One solution i have found around this is to use LEDE with the travelmate package but i had to use the NOR flash because i couldnt find a working NAND version of LEDE.

The test LEDE version found at Glinet wouldnt load any of the packages so i gave up on that. I’m not sure if there are any plans to fix this?

As a result of using NOR i have to first boot up into NAND and enter a terminal where i issue the bootcount 3 command to boot into NOR at next reboot which is a bit tedious and takes time to do. I did try enabling boot_dev to on but it just continues to boot to NAND regardless of the switch position.

Is there anything further i can do to boot in NOR easier atleast until proper LEDE support comes along.


>>>> external USB antenna booster which has roughly a 2 mile radius

Can you provide a link/more details/some pictures, please!

Sure i use one of these link

Some pics of my settings attached, note the increased output power in openwrt.

Using the switch to control which firmware you want to boot to is documented here: Overview - GL.iNet Docs

Our stock has repeater manager which can store hotspot info and connect to them automatically, doesn’t it?

>>>> Using the switch to control which firmware you want to boot to is documented here: Overview - GL.iNet Docs

Unfortunately this doesnt work. As above it will just boot to NAND regardless of switch position with boot_dev set to on. The only way i have been able to boot to NOR is by issuing the bootcount 3 command and rebooting.

>>>> Our stock has repeater manager which can store hotspot info and connect to them automatically, doesn’t it?

It does indeed but as above only allows a maximum transmit power of 20 where OpenWRT and LEDE allow 30. This is preventing me from connecting to extreme distance hotspots in the stock firmware but the same hotspots connect fine in OpenWRT and LEDE which i can only assume is due to the extra power output.


Thanks but I was interested to see your external USB booster, not your settings!


The link posted above will take you to the external USB booster i’m using. Its nothing fantastic in terms of speed, you can do a lot better with a SMA type antenna connecting directly to the router but that would cost a lot more. The USB antenna is just a cheap alternative for what would otherwise cost me £80+ in the UK.

Also the settings i attached above are for anyone that might be able to help and not directly aimed at anyone.

Thanks! I missed the link first time!


You can just set the bootcount to 3 in your firmware everytime it boot. Then this solves the problem.

Do this in /etc/rc.local

@markb @alzhao

Setting bootcount 3 in rc.local does not work either as LEDE, presumably kernel, sets it back to bootcount=0 as soon as the init.d process has finished ie as rc.local completes.

A workaround for this is to add the following to /etc/rc.local of the NOR image:

echo sleep 1 > /tmp/bootnor
echo fw_setenv bootcount 3 >> /tmp/bootnor
chmod +x /tmp/bootnor
/tmp/./bootnor &

This created a script file and sets it to run in the background.

Now if you want to boot NAND again all you have to do is manually set bootcount=0

Possibly if power is removed in the short interval between init.d completing and the one second sleep ending then you might still have bootcount=0, defeating this workaround, so just add the extra lines to rc.local in the NAND image as well.

This will effectively swap the default from NAND to NOR

All I need now is a method of using the now redundant NAND as storage to be used when booted from NOR :wink:


1 Like


I can confirm that trying to use the switch to control which firmware to boot does NOT work.

@bluewavenet, well, the function may be broken by a recent update. We will check again. But we have whole week of holiday and have to work on this later.


Enjoy your holiday :slight_smile:

My fix works reliably so no rush for me anyway. Should work for you too @markb

Thanks @bluewavenet

Used your fix for the first time today and its working wonders.

Would be great if the switch function works in a future update but this will suffice for now.

Cheers :slight_smile:

After flashing both the ‘clean NAND Open WRT’ and the LEDE NOR firmware 17, and activating via SSH the switch by the procedure of fw_setenv boot_dev on, followed by reboot, the AR300M only boots in NAND. Until… I dismantle the circuit board and put the 3 way switch in the most right position (towards the antenna). This position can’t be used when the circuit board is put in the housing.

Second strange thing: the Failsafe boot option (holding reset during boot) ends in ‘Page not found’. Port 80 at is active and open.


Any ideas?

@alzhao the switch button issue seems still not resolved after 1 year

####Method 2: using the switch

This is only valid in the new uboot.

First ssh to the router and set uboot env boot_dev

$ fw_printenv
$ fw_setenv boot_dev on
$ reboot

anyway to have switch button functionality resolved without having to SSH each time?
I have recently purchased the device 2 weeks ago, so I assume I have the latest uboot ?

@elRadix Sorry for the inconvenience. You can try the latest u-boot download.

I don’t want to brick my device just for the sake of testing.
Have you tested this for yourself
Anyone that can confirm it works? @alzhao

@elRadix Ofc they have tested the latest uboot. It’s compiled by them.