[AR-300M] Change firmware with button (NAND and NOR)

Hi everyone. I’ve just got this travel router and I’m very impressed. I’m going to use it for WireGuard when travelling around.

One issue I have is that I couldn’t get WireGuard working nicely on the 2.7x firmware (NAND) so have booted into the NOR firmware by setting the boot_count to 3.

I’ve upgraded this to the 3.x firmware and it’s connecting nicely. Issue I have is that it will reboot every time into the NAND firmware…

I tried changing that by following the readme here (GL-AR300M Series - GL.iNet Docs) and changing boot_dev to “on” and sliding the switch to the right but it seems to have made no difference?

I also read that the NAND firmware won’t be upgraded as this version is being phased out. Is this true - can I compile my own v3 for NAND?!

We will surely upgrade Nand firmware to v3.

Can you set the boot_count to 3 in both firmware (add this to /etc/rc.local) so the firmware will always boot into nor. No need to use boot_dev. Seems it never works for some people.

I’ve tried this - however when I add:

fw_setenv bootcount 3

To /etc/rc.local it doesn’t seem to run properly on startup (or bootcount gets overwritten later on?). When booted bootcount is always 0. If I run rc.local manually, it sets it correctly to 3…

How about this this will delay the command

( sleep 10; fw_setenv bootcount 3 ) &

That did the trick thank you. Is there a way for me to compile the 3.0 NAND flash myself?

ofc, you can build image via imagebuilder. It is available in our repo.

Where can I find the 3.x firmware for the AR-300M-Lite?

ETA: NVM, I just built it via “imagebuilder”

Testing firmware will be available in next week.

Hi All, I hope I can get some help here.
I have been looking through a number of threads on this forum regarding using the switch to change the firmware used NOR-NAND on my AR300M. I posted here as it appears to be one of the most recent treads on the issue.
Referring to the article on https://docs.gl-inet.com/en/2/hardware/ar300m/ Method 1 has been working but inconvenient so I was working on trying to get method 2 to work. I looked at some post regarding updating u-boot (done this many times on other devices) so I was comfortable in attempting this. I did backup my working version, but something went wrong, maybe picked up the wrong one on pepe2k site.
Until this point the device was working perfectly (except switching firmware as mentioned). I was left with a device not bootable with a corrupted u-boot. I do have an SPI Flash programmer so I immediately copied the flash memory with the corrupted u-boot and attempted to overwrite it with the working u-boot to the flash memory. Restarting it I did have a working u-boot and updating the firmware both NOR and NAND appeared to work looking at the lights on the device flashing during the upgrade but it won’t boot to either. So what I am left with now is just u-boot and an invalid IP address. I am not familiar enough with using hex editor so I figure this is what my problem is. My regret is not making a copy of the flash before I started.
I have attempted trying a serial update but I am not getting any other activity besides u-boot. Like I said I have a copy of my flash and a working u-boot and I am hoping someone can help with a guide that will help, or help me repair my flash.

Thank you in advance. Also if I am missing a method to try please let me know.

A side note and which I might have been able to avoid getting myself in this trouble to start with. This is the only device I can’t seem to access using netconsole. I did see in another thread that someone made a similar comment on this. If anyone can share how many seconds to hold reset to get to netconsole on this device would be also helpful as I still an unclear of the version of u-boot I am running.

The pepe2k site is not the place to get GL-inet uboot. The switch command was something GL put into their version. Please see my post here:

And the next few comments. To get into uboot http server, hold the reset while powering on (or uboot rebooting) it will flash 5 times then release the lights should all flash and uboot will start http.

see:

If you are in uboot console you can just run http and it will start it (ctrl-c to quit)

to get the uboot version run ‘version’ – see the uboot manual:
https://www.denx.de/wiki/view/DULG/UBootCmdGroupMisc#Section_5.9.10.4.

Much appreciated with that information. In fact I have read your post on this and have bookmarked this to come back too after I fix my primary problem.
Maybe my explanation wasn’t quite right. I can access the uboot server on the device and can go through the process of updating both NAND and NOR firmware. I have already reverted to the uboot version that was working before I made this mistake. It just isn’t booting from either NOR or NAND.
My side issue was getting to netconsole. On other devices I can get to this holding the reset while power on between 7-9 seconds. I was looking at accessing this to run httpd from there to monitor the firmware updating as it appears to be working, then I can also access the console tools to see if I can recover to my previous state.
What I am hopeful of is having my copy of the flash memory that has the corrupted uboot and the working uboot to reprogram my flash memory. I have a programmer and familiar enough with the copying and writing. I have attempted to overwrite with the working uboot and it seems that uboot is the only part I can get working.

would be helpful if you posted some output

This is my point I can’t access netconsole to see the output. I can see only as using serial TTL connection and what I can see is not readable data.
You can see that I can access the uboot server and also from the illegible data that it is writing to the flash, but that is it, there is no further progress on booting.
I tested also on other GL devices and can access netconsole. Also to note when the device was working correctly I was also not able to access netconsole.


Ah I see now. I was confused when you were saying netconsole thinking httpd. I don’t believe AR300M uboot has netconsole, you should try to get the uboot serial connection to work. 115200 n81.

My guess is your device is not marked as ‘tested’ like mine in the thread I mentioned and is not booting by default.

Appreciate your further input but this has been my problem. I get garbled illegible output as the screen shot above with serial connection. I can stop the boot but I am not getting the uboot prompt. There is nothing I can do with a serial connection either. It seems all I can get to is the uboot web interface. At this stage I think it needs to be fixed with flash programming.