|Model||Version||Current Release||Firmware OpenWrt Install||Firmware OpenWrt Upgrade||Firmware OEM Stock|
|Serial connection parameters||3.3V, 115200 Baud|
This chapter is based on Doozan Forum
Carefully choose the correct U-Boot for your hardware version otherwise you brick the hardware!
|NSA310||uboot.2017.07-tld-1.nsa310.bodhi.tar||OpenWrt Image NSA310b working|
|NSA310b|| u-boot-nsa310/u-boot.kwb |
(Link above in the OpenWrt binaries)
|OpenWrt Image NSA310b working|
|NSA310s||uboot.2017.07-tld-1.nsa310s.bodhi.tar||OpenWrt Image NSA325 working (without buttons & LEDs)|
|NSA320||uboot.2017.07-tld-1.nsa320.bodhi.tar||Not supported by OpenWrt|
|NSA325||uboot.2017.07-tld-1.nsa325.bodhi.tar||OpenWrt Image NSA325 working|
-factory.bin files to a FAT32 formatted USB stick with msdos partition table (single partition).
-factory.bin to something simple like
This chapter is based on a post in the Doozan Forum.
Tx → Rx; Rx ← Tx; GND → GND).
fw_printenv > current_envs.txt or blparam > current_envs.txt
Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M (8 blocks), don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).
dmesg | grep -i 'bad' [ 2.413231] Scanning device for bad blocks [ 2.417731] Bad eraseblock 3 at 0x000000060000
This bad block is the 4th block which resides within mtd0 (block 0 to block 7). So u-boot should not be flashed.
Basically we command the device through a terminal (using the serial interface) to load and flash our files to NAND.
Please note that to write to NAND you have to erase the NAND first, which means all data on the NAND will be deleted! Meaning stock firmware, bootloader, settings and everything will be gone! So make sure you got the proper files ready before you start as it's vital that you flash the new bootloader before you restart your device as it would otherwise get soft-bricked.
You need u-Boot 2020.04 from snapshot repository. U-Boot from 19.07 have broken usb and ethernet.
Plug in the USB stick into the NAS (front USB) with the correct files and booting into u-boot (press any key on the serial communication to interrupt the boot progress).
The first step is to install OpenWrt's u-boot. Therefor send those commands in the U-Boot command line:
NSA310>>usb reset (Re)start USB... USB: scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 1 Storage Device(s) found NSA310>>fatload usb 0 0x1000000 u-boot.kwb reading u-boot.kwb ............................................ 524288 bytes read NSA310>>nand erase 0x0 0x100000 Erasing at 0xe0000 -- 100% complete. OK NSA310>>nand write 0x1000000 0x00000 0x100000 1048576 bytes written: OK NSA310>>reset
In case you get below error message please use Setting up a TFTP server for TFTP Recovery/Install to load the files. IP configuration described serial-install-problems-on-nsa310. However this has not been tested successfully yet
NSA310>>usb reset USB: scanning bus for devices... 1 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found NSA310>> fatload usb 1 0x1000000 u-boot.kwb ** Can't read from device 1 ** ** Unable to use usb 1:1 for fatload ** NSA310>> fatload usb 0 0x1000000 u-boot.kwb ** Can't read from device 0 ** ** Unable to use usb 0:1 for fatload **
After the device reboots into the OpenWrt u-boot we adjust the device's MAC address (adjust the values, see the sticker under the NAS case):
NSA310>>setenv ethaddr AB:CD:EF:00:00:00 Address in SROM is AB:CD:EF:00:00:00 Address in environment is AB:CD:EF:00:11:11 NSA310>>saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0xc0000 -- 100% complete. Writing to NAND... OK
Now we set the correct environment variables
NSA310>>setenv mtdparts 'mtdparts=orion_nand:0x00c0000(uboot),0x80000(uboot_env),0x7ec0000(ubi)' NSA310>>setenv bootcmd 'run setenv bootargs; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000' NSA310>>saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0xc0000 -- 100% complete. Writing to NAND... OK NSA310>>reset resetting ...
Then we proceed to flashing OpenWrt itself (which we called nsa310.bin for less typing):
NSA310>>usb reset USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... Use USB retry period from the environment: 15 second(s) 1 Storage Device(s) found NSA310>>fatload usb 0 0x2000000 nsa310.bin reading openwrt.bin 4063232 bytes read in 210 ms (18.5 MiB/s) NSA310>>nand erase.part ubi NAND erase.part: device 0 offset 0x140000, size 0x7ec0000 Skipping bad block at 0x00540000 Skipping bad block at 0x05580000 Skipping bad block at 0x06120000 Skipping bad block at 0x06aa0000 Erasing at 0x7fe0000 -- 100% complete. OK NSA310>>nand write 0x2000000 ubi 0x600000 NAND write: device 0 offset 0x140000, size 0x600000 Skip bad block 0x00540000 6291456 bytes written: OK
Note that the number at the end indicates the size to write in hex. In this case up to 6 MiB. Increasing this number should work but has not been tested.
And now we reboot to OpenWrt:
→ hardware.button on howto use and configure the hardware button(s). Here, we merely name the buttons, so we can use them in the above Howto.
The device has the following buttons: