Web FailSafe Uboot

From Wiki for Dragino Project
Revision as of 19:48, 15 August 2015 by Edwin1123 (Talk | contribs) (Introduction)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The MS14 and HE is pre-load with Web FailSafe u-boot from https://github.com/pepe2k/u-boot_mod/. This U-boot provide Web Interface and Netconsole feature, it eliminates the need of UART while user have to upgrade firmware in U-Boot, User can access to u-boot via its LAN interface.

Check if device has Web FailSafe U-Boot

To check if MS14 is loaded with the Web Failsafe U-Boot, user can press the toggle button and power on the device. The left four LEDs will blink together every second if the MS14 has the Web Failsafe U-boot. If the device doesn't have the Web FailSafe u-boot. User can upgrade it to support Web FailSafe according to this Intruction.

Working Modes

Boot to different Mode

There is a counter in the Web Failsafe U-Boot, keep pressing the toggle button and power on the device, all LEDs will blink and the counter will start from 0 and it increase one on every blinking of the four LEDs. The system will be in four different working modes depends on the status of the counter:

  • < 3 sec: System will boot into OpenWrt Linux
  • 3 ~ 5 sec: Web FailSafe U-Boot
  • 5 ~ 7 sec: u-boot UART Console
  • > 7 sec: u-boot netconsole

Web FailSafe Mode

User should connect a RJ45 cable from the PC to MS14 or HE before power on the device, once boot into this mode, ms14 or HE will have a default IP full operation is:

  • Use a RJ45 cable to connect the PC to device's ethernet port directly.
  • Set the PC to ip 192.168.255.x, netmask
  • Pressing the toggle button and power on the device
  • All LEDs of the device will blink four times then release the toggle button
  • All LEDs will then blink very fast once, this means device detect a network connection and enter into the web-failsafe mode.Your PC should be able to ping after device enter this mode.
  • Open in web broswer
  • Select a squashfs-sysupgrade type firmware and update firmware.
Upgrade Firmware in Web Failsafe Mode

Notice: If the previous firmware used in Dragino is Yun Firmware, and user want to upgrade the firmware in web failsafe mode, user should set the bootaddress to 0x9f040000 in u-boot netconsole use below commands:

dr_boot>setenv bootcmd bootm 0x9f040000

U-Boot UART Console Mode

In U-boot Console mode, user can use access the u-boot enviroment via rs232 connection. Intruction is here

Upgrade u-boot

Warning: Upgrade to an inproper u_boot may make the device inaccessible. Be careful to choose the u-boot before upgrade. here is the tested u-boot: DOWNLOAD

  • std: Version with Dragino Logo
  • oem: None Logo Version
  • none-web-failsafe: u-boot doesn't support Web FailSafe

User can upgrade U-Boot in u-Boot console mode, procedure is:

  • Set up a TFTP server with address
  • Place the new U-Boot file under the TFTP root and rename it to uboot.bin
  • Run run uboot_upg. Device will auto get the uboot file from tftp file and upgrade. Device will use the new u-boot after reset.


Environment size: 934/32764 bytes

dr_boot> run uboot_upg
Link down: eth0
Ethernet mode (duplex/speed): 1/1000 Mbps
Using eth1 device

Ping OK, host is alive!

TFTP from IP:
     Our IP:
   Filename: 'uboot.bin'
Load address: 0x80800000
      Using: eth1

    Loading: #######################################

TFTP transfer complete!

Bytes transferred: 196608 (0x30000)
Erase FLASH from 0x9F000000 to 0x9F02FFFF in bank #1
Erasing: ###

Erased sectors: 3

Copying to FLASH...
Writting at address: 0x9F000000


dr_boot> reset

U-Boot NetConsole Mode

In this mode, user is able to access the u-boot by netconsole tool. The Netconsole mode support same commands as UART Console mode and without the need of UART converter.

In Windows OS we can use the hercules utility for netconsole. The using of this tool is easy. Steps are:

  1. Download hercules and run it with correct paramters as shown below.
  2. Connect PC to MS14 LAN port.
  3. Configure PC with IP
  4. Disable Windows firewall
  5. Boot MS14 to Netconsole mode.

Then Hercules should be able to get response from MS14 and able to interactive with the U-Boot.

Hercules Configure

In Linux OS we can use nc command (NetConsole Tool) to access the u-boot netconsole. process:

  1. Connect PC to MS14 LAN port.
  2. Configure PC with IP
  3. Run nc -kul 6666
  4. Boot MS14 to Netconsole mode.

U-Boot info will be shown in Linux console once the MS14 has entered the netconsole mode.

Ubuntu to access netconsole

Upgrade to Web FailSafe U-boot

Upgrade in OpenWrt Mesh Firmware version

If you have the OpenWrt Mesh version Firmware loaded in the MS14, you can upgrade the firmware to the Web Failsafe version from THIS LINK.

After upgrade, ssh access to the MS14 and run below command:

root@Arduino:~# mtd write /etc/uboot_for_dragino_v2_ms14.bin u-boot
Unlocking u-boot ...

Writing from /etc/uboot_for_dragino_v2_ms14.bin to u-boot ...     
root@Arduino:~# reboot

This command will write the Web-FailSafe u-boot to MS14.

Trouble Shooting

Can't type strings in Netconsole mode

Some customers feedback that the Hercules can see the string from device but fail to send strings to device via Hercules. This issue is found that the device has a ipaddress different from such as / or To solve this issue, user can use windows to ping above ip and see which is the exactly ip. then configure the Hercules to use that ip to connect to the device.