Thursday 23 January 2014

Mini USB Portable 3G/4G router - rt5350f - 32M version


Short description how to upgrade router with 32 MB on board.

Source: http://www.ebay.de/itm/400572464175?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

Body:


PCB is exactly the same, only resistor to set mem size to 32m has been added.

Bootloader

Default u-boot bootloader is not fully functional, and it seems that it is protected against starting other firmware than oryginal one.
Do not try to upgrade this bootloader from bootloader menu - you will brick your device  !

To load openwrt firmware new bootloader is needed - I am using - uboot256.img taken from JiapengLi

Openwrt firmware

Default firmware cannot accept openwrt images so at the beggining (after u-boot upgrade) we will load minimal openwrt firmware mini.bin .
Upgrade procedure

Verification
Check twice if it is router we are talking about:

  • Take a look on photos of PCB
  • Check MDT structure by call "cat /proc/mtd", has to be like below:
cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 003b0000 00010000 "Kernel"
          Think twice :)

First step

  • Reset router to default settings
  • Connect to router via telnet and login with default user name (admin) and password (admin)
  • Now  you can upgrade router via FTP or USB

Upgrade via FTP 

  • Cceck free memory

  • Verify free memory by calling free, check if you have more than  3500 free memory 
     
# free     total   used   free  shared buffersMem: 28584  17128  11456     0      0Swap: 0 0 0Total: 28584 17128 11456
  •  Resize TMP, and start proftp server
mount -o remount,size=4M tmpfs /tmp
proftpd.sh server 192.168.100.1 192.168.100.1 21 10
proftpd
  • Connect to router via ftp and copy uboot256.img and mini.bin to /tmp directory on router
  • ! Upgrade uboot - be careful, do not reset router during and after this operation !
mtd_write write  /tmp/uboot256.img Bootloader
  • You should see on console 
#Unlocking Bootloader ...
#Writing from /tmp/uboot
256.img to Bootloader ...  [w]
  • ! Upgrade firmware - do not reset router during this operation!
mtd_write write /tmp/firmware.img Kernel
  • You should see on console  
#Unlocking Kernel ...
#Writing from /tmp/mini.bin to Kernel ...  [w]
  • Reboot router :), enjoy new u-boot with working ethernet and openwrt firmware. Now you can use standard openwrt upgrade procedure. 
reboot 
  • Router will set IP address to 192.168.100.1 , you can login via telnet

Upgrade via USB

  • Prepare usb stick, format it with fat filesystem, and copy  uboot256.img and firmware.img 
  • Conect usb stick to router and mount it by:
mount /dev/sda1 /mnt
  • Wait a few seconds and verify  if you see files
ls /mnt 
  • You should see content, do not go further if you do not see files ! 
uboot256.img mini.bin
  • ! Upgrade uboot - be careful, do not reset router during and after this operation !
mtd_write write  /mnt/uboot256.img Bootloader
  • You should see on console 
#Unlocking Bootloader ...
#Writing from /mnt/uboot256.img to Bootloader ...  [w]
  • ! Upgrade firmware - do not reset router during this operation!
mtd_write write /mnt/mini.bin Kernel
  • You should see on console  
#Unlocking Kernel ...
#Writing from /mnt/mini.bin to Kernel ...  [w]
  • Reboot router :), enjoy new u-boot with working ethernet and openwrt firmware. Now you can use standard openwrt upgrade procedure. 
reboot
  • Router will set IP address to 192.168.100.1 , you can login via telnet 



Many Thanks for martin4android for support and materials.