Posted: Mon Jun 24, 2019 3:47 Post subject: [SOLVED] RT-AC1900 w/kongac 31800M - serial port Linux shell
How to load and flash a firmware file from a USB device? This unit has been balky and frustrating, and I'm desperately trying to insure a good, reliable firmware load. Tried TFTPD on boot, tried Asus Restore, neither worked.
Are there commands available from the command line to load a firmware file? Any and all help greatly appreciated. Thanks!
Update: I have been able to use TFTP to upload the firmware.trx file from my laptop to the /tmp directory on the router. Now all I need is how to get it loaded. _________________ 2x Asus RT-AC68U
Last edited by KeithB on Wed Jun 26, 2019 23:38; edited 1 time in total
AFAIK, all ASUS routers can be updated via tftp (at the command line) by putting the router into restore mode (no need for the ASUS Restoration Utility, which would probably reject third-party firmware anyway). You can usually trigger restore mode by holding the restore button while simultaneously applying power, until the power LED begins to flash very slowly. Finally, w/ your PC/laptop configured w/ 192.168.1.2, you can put the firmware file to the router @ 192.168.1.1.
Over the years, ASUS has made it more difficult to do this, presumably to prevent third-party firmware. Sometimes you need to hold more than just the restore button. In the case of my RT-AC68U, I have to hold the restore, WPS, wifi, buttons, all at the same time, while applying power, and making sure to let go as soon as the LAN LED begins to flash. A major pain. Sometimes takes me 20-30 mins to get the firmware installed.
Thank you, eibgrad. Unfortunately, rescue/restore mode is where this router just won't go. No combination of 30/30/30 reset, reset, WDS, or that other button seem to get it into TFTP rescue mode. That's precisely why I've opened it up and connected a serial console.
I just NVRAM SET WAIT_TIME=5, NVRAM WRITE, and REBOOT and it did NOT wait. This is CFE 1.0.20 from way back in the day, even before AImesh was available. I'm surprised it won't even boot wait.
It appears one of the TFTP wait NVRAM settings is not defined.
Detect CPU turbo button...
CFE version 18.104.22.168 (r456083) based on BBP 1.0.37 for BCM947XX (32bit,SP,)
Build Date: Sun Aug 3 03:15:27 WEST 2014 (root@backbone)
Copyright (C) 2000-2008 Broadcom Corporation.
Boot partition size = 262144(0x40000)
DDR Clock: 666 MHz
Info: DDR frequency set from clkfreq=800,*666*
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 22.214.171.124 (r456083)
CPU type 0x0: 800MHz
Tot mem: 262144 KBytes
The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
unlock unlock the device
resetbc reset bootcounter for WRT1900AC/WRT1200AC/WRT1900ACv2
erase erase all data on device
write <imagefile>|- write <imagefile> (use - for stdin) to device
Following options are available:
-q quiet mode (once: no [w] on writing,
twice: no status messages)
-r reboot after successful command
-f force write without trx checks
-e <device> erase <device> before executing the command
Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
mtd -r write linux.trx linux
and the MTD block devices are:
brw-r--r-- 1 root root 31, 0 Jan 1 01:00 /dev/mtdblock0
brw-r--r-- 1 root root 31, 1 Jan 1 01:00 /dev/mtdblock1
brw-r--r-- 1 root root 31, 2 Jan 1 01:00 /dev/mtdblock2
brw-r--r-- 1 root root 31, 3 Jan 1 01:00 /dev/mtdblock3
brw-r--r-- 1 root root 31, 4 Jan 1 01:00 /dev/mtdblock4
So now I need to determine which of these mtdblock devices is the Linux kernel and which is the userland/application. Sure would be nice if a CFE wizard would help out with a little guidance. _________________ 2x Asus RT-AC68U
@egc: Thank you for confirming what I thought might be the proper mtd write command. Early this morning, I was actually able to use the DD-WRT GUI from the kongac firmware to load the firmware file I could not load, earlier. I strongly suspect it had to do with the flash partition sizes, so I went back to whichever version of the AsusWRT firmware would re-size the partitions. Once that succeeded, I had to scoot out the house and get to work, but I think I'm finally in the clear. _________________ 2x Asus RT-AC68U