How to Recover the DNS-323 from Windows

This document contains my experiences with reflashing my DNS-323 on Windows 7

Big Thanks to Martin Michlmayr and his tutorials at Cyrius.com

Read the footnotes for additional information

Requirements

splitdns323fw is part of the dns323-firmware-tools available at http://theshed.hezmatt.org/dns323-firmware-tools/. The file I have included here is the same splitdns323fw utility provided on the website except it has been run through another utility called dos2unix which properly formats the document to run in Cygwin.

Setup

Serial Adapter

You will need to get one of the serial adapters from the hardware guide Serial Adapters. I used the USB cable out of the available options, but any will work.

Firmware

The next step will be to either use a pre-split firmware (provided below) or use splitdns323fw to split your own into a Kernel and Ramdisk image.

Pre-Split

D-Link Firmware 1.10 (http://www.djtazie.com/)

Split your own

Cygwin

Install Cygwin with the Ruby interpreter and any dependent packages. The remaining setup settings can remain as their defaults.

splitdns323fw

Here is where we'll split either a custom firmware or factory firmware in Cygwin.

  1. Open up Cygwin once everything is finished installing and note the path to your home directory (in my case it was C:\cygwin\home\Wes).
  2. Extract the firmware to your home directory, in my case I used the current factory firmware (1.09) so I extracted the 'dns323_fw_109' file from the 'dns323_fw_109.zip' archive to C:\cygwin\home\Wes.
  3. Extract the 'splitdns323fw' file from the 'splitdns323fw.zip' archive to your home directory. 1)
  4. Back in the Cygwin console type the following commands:
    • chmod 777 ./splitdns323fw
    • ./splitdns323fw -k uKernel -i uRamdisk name_of_firmware_file (Example: ./splitdns323fw -k uKernel -i uRamdisk dns323_fw_109)
  5. Once the splitdns323fw utility is finished you should have two new files in your home directory: uKernel and uRamdisk

Tera Term

Now comes the tricky part of flashing the firmware to the device itself.

  1. Install a Compact Installation of Tera Term, leaving everything as default.
  2. Power off your DNS-323 and connect your serial adapter to the DNS-323 and your computer.
  3. Record which COM port you're serial adapter is on, we'll need that to connect to the device (don't know what it is? check your device manager).
  4. Open Tera Term and select 'Serial' and change 'Port' to the COM port your serial adapter is on and hit 'OK'. Example
  5. Go to the 'Setup' menu and then to 'Serial Port…', match the settings as follows and hit 'OK': Example
    • Baud rate: 115200
    • Data: 8 bit
    • Parity: none
    • Stop: 1 bit
    • Flow control: none
    • Transmit delay: 0 msec/char 0 msec/line
  6. Power on your DNS-323 and immediately (about 2 seconds) press SPACE bar than 1 2).

If the serial cable is correctly wired, uboot will tell you to press a key to stop boot sequence

  1. You should be prompted with a Marvel» command line at this point.
    • Type in and hit enter: loadb k
  2. In Tera Term go to 'File' → 'Transfer' → 'Kermit' → 'Send…' and navigate to your Cygwin home directory where the uKernel and uRamdisk files are. Select the uKernel file first and hit 'Open'. Once it is done you will be prompted with another Marvel» command line. 3)
  3. Type in and hit enter: loadb r
  4. Back in Tera Term go to 'File' → 'Transfer' → 'Kermit' → 'Send…' and navigate to your Cygwin home directory where the uKernel and uRamdisk files are. Select the uRamdisk file next and hit 'Open'. This will take longer than the kernel flash. Once it is done you will be prompted with another Marvel» command line.
  5. Reboot the DNS-323.

Done

At this point - assuming there were no errors - your DNS-323 should boot up with out problems with a default installation of either the Factory or Custom firmware you picked. You can leave the serial adapter connected 4) and check on the installation / boot-up sequence of the device to make sure everything is working OK.

Completion

If your re-flashing was a success you can now disconnect the serial adapter and put your DNS-323 back together!

1) Currently in your home directory there should the firmware you want to flash and the splitdns323fw utility.
2) I stationed my DNS-323 so I could have one hand on the power button and the other hand on the keyboard so when I turned the DNS-323 on I could immediately hit the keys. It requires quick timing. Don't be afraid to unplug the DNS-323 and try again, so long as you keep your serial adapter connected to your computer and leave Tera Term open you can repeat this until you get it. If you unplug your serial adapter or close Tera Term you'll need to start back at step 4. I had to use Spacebar + 1 key to get it to stop, I could hit he space bar and any other keys all day and it didn't break the autoboot. Spacebar + 1 worked form me on the first try.
3) The screen should indicate it's waiting for a binary transfer at this point. Tera Term will now send the kernel to the device which will take some time. Once it's finished sending it will erase the old kernel and flash the new one you just sent it.
4) Repeat the same process as we did in Tera Term to flash the DNS-323, except don't press any keys

Navigation

Personal Tools