Huawei HG532s/Serial info

Bootloader
We can break into the Bootloader command line by pressing
 * any key while starting up the device.

There are some commands available for unbricking the device RT63365 at Wed Dec 17 16:09:06 CST 2014 version 0.8

Memory size 32MB

Found SPI Flash 8MiB S25FL064A at 0xb0000000

Press any key in 3 secs to enter boot command mode. Search PHY addr and found PHY addr=0

bldr> bldr> help ?                                  Print out help messages. help                               Print out help messages. go                                 Booting the linux kernel. decomp                             Decompress kernel image to ram. memrl                       Read a word from addr. memwl                Write a word to addr. dump                   Dump memory content. jump                        Jump to addr. flash              Write to flash from src to dst. erase_write        Write to flash from src to dst. imageflash                         Write bin/w image to flash. xmdm                   Xmodem receive to addr. miir                Read ethernet phy reg. miiw         Write ethernet phy reg. webser                             webser cpufreq /         Set CPU Freq <156~450>(freq has to be multiple of 6) ipaddr                   Change modem's IP. bldr>

CPU Bootloader
The SoC has an embedded bootloader that can be used when there is no bootloader
 * at the flash chip. Press the reset button while powering up the device:

RT63365 at Tue May 8 19:47:16 CST 2012 version 0.8

Memory size 32MB

HWCONF=02007d00 DRAM Mode=00000000 MCC1=00000000

Search PHY addr and found PHY addr=0 done Pres the X key at the serial console. Then send via XMODEM your recovery bootloader: recovery.img
 * Now you cand send via XMODEM a full backup, and flash it.

Flash Backup
Using this phython script we can make a full backup without desoldering the flash chip: https://github.com/danitool/bootloader-dump-tools/blob/master/rt63365tool.py


 * 1) Power off the device.
 * 2) Conect the USB UART adapter in your computer to the serial port at the router (only TX, RX and GND).
 * 3) Execute this command (tested on ARCHLinux OS):
 * 4) Power up the device, the backup should start automatically.

Flash backup (Orange ISP): hg532s-flash_backup.zip

Restore the flash backup

 * 1) Power off the device.
 * 2) Conect the USB UART adapter in your computer to the serial port at the router (only TX, RX and GND). Open the serial software console.
 * 3) Conect the ethernet cable from your computer to the device. Set a static IP on your computer compatible with 192.168.1.1, i.e: 192.168.1.33.
 * 4) Power up the device and inmediatelly press a key on the serial console. It should stop at the bootloader CLI with the symbol:
 * 5) Send the image via TFTP: on your computer execute
 * 6) Flash the image (the received image should be stored at 0x80020000):
 * 7) Power cycle the device