Accton Software Flashing
From DD-WRT Wiki
Accton MR3201A from http://open-mesh.com/
dd-wrt v24-sp1 from http://www.dd-wrt.com/dd-wrtv2/downloads/v24-sp1/Consumer/Fon/Fonera
- SSH client
- For windows, Putty is a free and popular choice
- For Mac OS X, SSH is built in. Open Terminal.app and use "ssh".
- Telnet client
- For Windows, Putty again will work.
- For Mac OS X, telnet is built in. Open Terminal.app and use "telnet".
- The following files:
- One of the following methods to serve the above files to the Accton:
- Connecting the Accton to the Internet.
- Windows: Run HTTP file server on your Windows machine (it's a simple no-installer-needed HTTP server). If the link does not work, try this one.
- Mac OS X: Start up "Personal Web Sharing" in the "Sharing" pane of System Preferences. Use the "Sites" folder in your home directory to serve files.
- Linux: Install Apache from your distribution's package manager. You might want to have a look at webfs as well. [Simple alternatives welcome]
- Fetching the file to another computer and copying them into Accton using scp.
- TFTP server software.
(TFTP is not FTP; these are different protocols. TFTP, unlike FTP, is used primarily for transferring files to and from network equipment (e.g. your router, switch, hub, whatnot firmware upgrade or backup, or configuration backup and restore))
Here are some options:
- Simple TFTP server for Windows: http://www.jounin.net/tftpd32.html Download this and run it, click the Browse button and select the folder containing the rootfs and vmlinux files from above, and use the given server interface as your redboot remote server ip.
- If you're running Linux, here's the simplest cross-distribution way to setup a TFTP server:
- Download http://mirror.usu.edu/mirrors/gentoo/distfiles/tftp-hpa-0.48.tar.bz2 and unpack into a temporary directory. Make sure you have gcc, make, etc. installed on your system.
- Build tftp-hpa by running ./configure and then make.
- Become root (or use sudo) and run ./tftpd/tftpd -s -L [tftpdir] where [tftpdir] is the directory containing vmlinux.bin.l7 and root.fs. Note that this directory and its content must be readable by the nobody user.
- Test with a command-line TFTP client, such as the one that was built with tftp-hpa.
- If you're running Ubuntu, type "sudo apt-get install tftpd-hpa" and put files into /var/lib/tftpboot/ directory.
- If you're running Mac OS X, you can use the integrated tftp server:
- Create the TFTP server root by typing sudo mkdir /private/tftpboot
- Start the server by typing sudo /sbin/service tftp start
- Test it by typing tftp localhost then get (filename) where (filename) is the name of a file you have put in /private/tftpboot
- Note: the above instructions only seem to work on older OS X installations. If you're having trouble with the built-in TFTP on the command line, you can use this very useful freeware to manage it with a GUI: http://www.macupdate.com/info.php/id/11116
- An Ethernet cable to connect Accton to your computer and/or router. (Accton's Ethernet port is auto-sensing.)
- If you have a serial connection skip to Step 2
 Step 1 - Access the RedBoot command prompt
Connect to the RedBoot prompt. To connect to RedBoot you need to:
- a) Configure your PC so you have an address like 192.168.1.166
- b) Connect your PC and the Accton through a crossover ethernet cable or a switch and 2 normal cables (note: you can connect to Accton with either a normal cat5 ethernet cable, or with a crossover cable, as the Accton's NIC is auto-sensing). Note: It may be necessary to install a switch between the Accton router and the PC
- c) Disconnect and reconnect the power to your Accton. In the first 10 secs you can access to RedBoot via a plain Telnet connection (most likely to IP 192.168.1.254) on port 9000.
- Open a command prompt or terminal window and type in the following:
telnet 192.168.1.254 9000
- Note the 9000 after the IP. This specifies port 9000, which is the port RedBoot is listening on.
- If the RedBoot> prompt is not immediately visible, try pressing enter once you've connected.
- [You can use a IP/port scan program like Angry IP Scanner, and as soon as it can ping to your Accton you can Telnet to it for 10 seconds and you can also check if port 9000 is available]
- [Sometimes you may have to use another telnet client such as Putty. Windows' built-in Telnet client may fail to show the prompt after rebooting the Accton]
- If everything goes well you should have a "RedBoot>" prompt in telnet.
If this method fails you will need to connect using a serial connection. see LaFonera Hardware Serial-Cable-Port
 Step 2 - Get the DD-WRT binaries
from: here [v24 Final]
 Step 3 - Setup local TFTP server
For v24 RC7 and later:
Copy linux.bin to your TFTP server directory.
No matter what you use for a TFTP server, RedBoot will try to fetch the files from the root directory, e.g., /root.fs. Make sure your TFTP server is configured to do this as some are not by default.
Windows users can use Tftpd32
Alternatively, if you have a web server, you can copy the files to it instead.
 Step 4 - Configure Redboot
Configure RedBoot for local IP address and TFTP server in telnet.
ip_address -l [local ip address/24] -h [remote server address]
- Replace "[local ip address/24]" with "192.168.1.254/24" and "[remote server address]" with whatever you entered as the IP address of your TFTP server, 192.168.1.166 in this case.
ip_address -l 192.168.1.254/24 -h 192.168.1.166
If the local IP address changes from 192.168.1.254 your Telnet session will die and you will need to reconnect to the newly entered IP address.
 Step 5 - Flashing the Accton
About to initialize [format] FLASH image system - continue (y/n)? y *** Initialize FLASH Image System ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
RedBoot> load -r -b 0x80041000 linux.bin
Using default protocol (TFTP) Raw file loaded 0x80041000-0x80662fff, assumed entry at 0x80041000
RedBoot> fis create linux
Note you must use the file "linux.bin" from the DD-WRT FON downloads section. Do not use fonera-firmware.bin.
The fis create linux command takes a long time to run, sometimes up to an hour. If you manage to stay connected (most unix telnet clients will not time out, so long as you don't type anything after the last command), you will see the flashing output when it done:
... Erase from 0xa8030000-0xa8652000: ................................................................................................... ... Program from 0x80041000-0x80663000 at 0xa8030000:................................................................................................... ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: .
This is also the recommended way to upgrade the firmware from a v24 RC version to v24 SP1. Upgrading the firmware via the web interface does not work (at least, it didn't work for me using v24 RC6).
Your telnet session may terminate during the "fis create linux" process - just try to re-establish a connection (at IP 192.168.1.254:9000) from time to time. You will be ready for the next step, when you get the redboot prompt again: RedBoot>
Do not reboot yet because boot script needs to be modified:
Run script at boot: true
Enter script, terminate with empty line
>> fis load -l linux >> exec >>
Boot script timeout (1000ms resolution): 10 Use BOOTP for network configuration: false Gateway IP address: Local IP address: 192.168.1.254 Local IP address mask: 255.255.255.0 Default server IP address: <blank> Console baud rate: 9600 GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Update RedBoot non-volatile configuration - continue (y/n)? y ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot>reset
That's it. Your Accton should reboot and start DD-WRT. It by default will DHCP an external IP address, start an open wireless network called "dd-wrt" and have management at http://192.168.1.1 (on port 80). The default username is "root" and the default password is "admin".
 Resetting NVRAM
If the configuration is corrupted/incorrect, try resetting of the NVRAM. Power up the unit, and wait about 2 minutes, then hold down the reset button for several seconds. You must do this while the firmware is loaded, hence waiting for a minute or two after powering it up.
If that fails, try these steps:
1. Reset the Accton and telnet into the Redboot prompt (see Step 5 above).
2. Enter the following command to erase the NVRAM partition.
fis erase -f 0xA83D0000 -l 0x00010000
3. Load DD-WRT by typing and executing these commands:
fis load -l vmlinux.bin.l7 exec
You're all done. DD-WRT will rebuild the NVRAM and it will be fresh as spring!
 Reflashing Accton original firmware
Run script at boot: true
Enter script, terminate with empty line
>> fis load -l vmlinux.bin.17 >> exec >>
Boot script timeout (1000ms resolution): 3 Use BOOTP for network configuration: false Gateway IP address: <blank> Local IP address: 192.168.0.1 Local IP address mask: 255.255.255.0 Default server IP address: <blank> Console baud rate: 9600 GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Update RedBoot non-volatile configuration - continue (y/n)? y ... Erase from 0xa87e0000-0xa87f0000: . ... Program from 0x80ff0000-0x81000000 at 0xa87e0000: . RedBoot>reset
 Recovery of a non-responsive Accton
If you've managed to get partway through this guild and find the Accton doesn't seem to respond anymore, here are a few recovery tricks.
- Set your computer's network card IP address to 169.254.255.2 and the subnet mask to 255.255.0.0. You may need to disconnect/disable all other network cards on that PC to ensure the proper route is used.
- Connect your Accton to the network card via a network cable.
- In a browser, try to connect to http://169.254.255.1:8080
- If that fails, try to establish an SSH connection to 169.254.255.1
- If that fails, try to establish a Telnet connection to 169.254.255.1 on the standard port (23), or port 9000.
- Power on the Accton, and after 2 to 4 seconds, try to start the Telnet connection to catch the RedBoot prompt.
- When Using RedBoot, make sure you are using line mode for Telnet. In Mac OS X and Linux, enable this by creating a file named ".telnetrc" in your home folder. Add the following lines:
192.168.1.254 mode line
If all steps above fails you can try this:
1. Change your:
IP adress to: 192.168.1.166 Subnet mask to: 255.255.255.0 Standard gateway to: 169.254.255.1 DNS: 169.254.255.1 (maybe is an optional setting)
2. Open Putty and enter:
Host name: 192.168.1.254 Protocol: Telnet Port 9000
3. DON'T press "Open"!
4. Power on your Accton
5. When your computer gets an IP adress press the "Open" button in Putty
6. Hopefully you will see someting like this now:
== Executing boot script in 9.160 seconds - enter ^C to abort ^C RedBoot>
7. If Putty timeout or can't connect to your Accton try to restart the Accton and try to catch the RedBoot prompt (you only have a few seconds to do that!)
If that fails, you may have to resort to a serial connection
Serial connect devices are listed in the #External_links section of this guide.
See also Accton_Software_Debricking.
 External Links
- Complete tutorial with screenshots of hacking Accton without a wireless card.
- Here is another complete tutorial on debricking/flashing Accton using different methods.
- Hardware layout of the Accton router.
- "Looking inside the FON Accton firmware" Useful info about the FON original firmware package.
- "How to make a dual-supply RS-232 to TTL level converter"
- Alternative serial port cable mod using cell-phone serial-to-USB cables. Requires no soldering, just the cable and two wires.
- Detailed Tutorials and Guides on flashing and hacking the Fonera with a growing community.
- http://www.dd-wrt.com/phpBB2/viewtopic.php?t=9011&postdays=0&postorder=asc&start=0 Camicia's forum post
--Ispyisail 07:32, 11 December 2008 (CET)