Wednesday, June 23, 2010

Firmware flash and brick recovery through TFTP

Though the whole flashing process can be done via Web interface(dd-wrt to stock and vice versa) without getting your hands dirty, still, there're cases that the Web flashing is not sufficient. One common scenario is a bricked WZR-HP-G300NH, i.e., no web access and no ping response due to bad firmware or wrong operation, or you just want to try other firmware like OpenWrt. Luckily that the WZR-HP-G300NH has a robust bootloader and the router can be recovered by using TFTP, either in Windows, Linux or OSX.

It's a little tricky comparing to traditional Broadcom routers, as the WZR-HP-G300NH will not broadcast its MAC during initial bootup process, as a result, we must tell the computer how to communicate with the router by manipulating its arp table.

TFTP recovery in Windows
*Untested, credit goes to ermax at D-WRT forum
  1. Get your router's MAC, its the 12 digit default SSID printed on the sticker at the back of the router, starting with 00. Then you'll need to break it down every two digit by inserting : or - between them.
  2. Download the latest official firmware(in case of recovery) from Buffalo's official website. Extract to get the firmware, in my case, its 1.74 and the firmware name is wzrhpg300nh-174, ~20MB.

    Also download the
    Linksys TFTP utility.
  3. (May not necessary) Do a hard reset or 30/30/30 on the router.
  4. Unplug all the ethernet cable and the power cable and connect the computer directly to the router(still leave it off)
  5. Set the computer's static IP to 192.168.11.2, netmask 255.255.255.0, gateway/DNS 192.168.11.1.
  6. Open a Windows command prompt as Administrator. This is default on Windows XP, under Windows Vista/7, type cmd in the search box from Start menu, then press Ctrl+Shift+Enter. You will be prompted with the User Account Control dialog.
  7. Type route print to get a list of your NIC(s). Write down the interface number for the LAN card, in my case, it's 12.
    interface
  8. Now type the command below to get the ARP binding(thanks ermax at DD-WRT forum):

    netsh interface ipv4 add neighbors 12 192.168.11.1 00-1d-12-34-56-78

    Replacing the number 12 with the interface number and 00-1d-12-34-56-78 with the router's MAC address.
  9. Run Linksys TFTP utility. Put 192.168.11.1 as Server address, Password empty, File is wzrhpg300nh-174 just extracted, set retry time to 30.
  10. Click "Upgrade" in the TFTP utility and quickly plug the power back to turn on the router. There might be few failed attempts but the flash process should start later. Wait patiently the router will reboot itself when the upgrade is done. Navigate to http://192.168.11.1(for stock firmware) to configure your router.

TFTP recovery in Linux
*Most of this part is from DD-WRT wiki with some tweak. TEST WORKING

Will use Ubuntu Live CD as an example but other distro should also work. The Ubuntu LiveCD can be booted from a USB flash drive. See here.

  1. Do Step 1-4 in "TFTP recovery in Windows" except we don't need Linksys TFTP utility here. So we have MAC address ready, router unpowered and the computer is directly connected to the router.
  2. After booting into Ubuntu, open a terminal and type:

    sudo apt-get update
    sudo apt-get install tftp-hpa
    sudo /etc/init.d/networking stop
    sudo ifconfig eth0 192.168.11.2
    sudo ifconfig eth0 netmask 255.255.255.0
    sudo arp -s 192.168.11.1 00:1D:12:34:56:78
    #change to the folder where you put the firmware image, if it's on desktop then it's
    #"/home/ubuntu/Desktop".
    cd /home/ubuntu/Desktop
    tftp 192.168.11.1
    *from this point, you're under tftp command prompt, the "tftp>" is the prompt tftp gives you, you just need to type the command AFTER that.
    tftp> verbose
    tftp> binary
    tftp> trace
    tftp> rexmt 1
    tftp> timeout 60
    tftp> put wzrg300nh-firmware.tftp

    Replace the fictional MAC in red with the router's. All command you need to input is in italic. Also replace wzrg300nh-firmware.tftp with the firmware you need, in case of stock firmware, its wzrhpg300nh-174.

    Also, at this point, the router is still unpowered and that's OK. Tftp will keep trying to send the firmware to the router and when it fails (because the router isn't yet on or hasn't yet brought up it's tftp interface) it will wait 1 second and retry, up to 60 times as that's how we set up the tftp client.
  3. Now quickly plug the power cord back to the router. The router will start up and you will see some lights blinking (possibly). About 10-20 seconds in, you should notice that tftp is sending the file. instead of the retry message over and over you will see some progress scrolling down the screen and at the end it will tell you how many blocks or bytes were transferred in how many second.
  4. After the transfer is complete, wait about 5-10 minutes the router will reboot itself. When the wireless LED is on you're good to go.
  5. Bring the network back in Linux by typing

    sudo service networking start
TFTP recovery in OSX
*Untested, credit goes to BDawg at DD-WRT forum
  1. Do Step 1-4 in "TFTP recovery in Windows" except we don't need Linksys TFTP utility here. So we have MAC address ready, router unpowered and the computer is directly connected to the router.
  2. Set the computer's static IP to 192.168.11.2, netmask 255.255.255.0, gateway/DNS 192.168.11.1.
  3. Open a terminal and type

    sudo arp -s 192.168.11.1 00:1D:12:34:56:78 ifscope en0

    Replace with your own router's MAC.
  4. Type

    tftp 192.168.11.1

    tftp> put wzrhpg300nh-174

    Don't press Enter
  5. Now plug the power cord back and hit Enter to start tftp transfer.

835 comments:

«Oldest   ‹Older   801 – 835 of 835
GPS Contact Number said...

Garmin GPS not working, could be the most frustrating thing especially when you are driving to a new place and are totally dependent on your GPS. To Solve any problem you can reset garmin GPS with the help of experts. Or feel free to call our experts to know more. You can also Visit our website to fix this issue!

Amanda Vuitton said...
This comment has been removed by the author.
Geeks For Tech said...

Are you unable to connect your computer with Bluetooth speakers? Getting frustrated? If yes, then you have reached the right place. Geeks for Tech is a group of expert technicians who can fix your computer related issues in a short span of time. Geek Helpline

Lov Dsouza said...
This comment has been removed by the author.
Lov Dsouza said...
This comment has been removed by the author.
Amanda Vuitton said...
This comment has been removed by the author.
HP Printer Assistant said...

Thanks for Sharing with us. Fix HP printer long delay before Printing error and follow the directed guidelines and the instructions as directed by the professional experts. Fix HP printer long delay before printing.Make sure that your cartridges are not running out of ink and the paper tray is not empty.

Emiley Brown said...
This comment has been removed by the author.
Fix Printer Brother said...

Thanks for Sharing with Us.If you have any problem with Epson printer and you are worried then.Learn the quick and essential instructions to Epson Printer print low ink using Epson Printers. Make sure you follow the steps in order to avoid interruptions in the process.

Anna Frank Yahoo said...
This comment has been removed by the author.
Emiley Brown said...
This comment has been removed by the author.
Lov Dsouza said...
This comment has been removed by the author.
Caroline said...

Nice Information , Thanks For The Great Content

Get started to Install, Setup, Connect, Print from your 123 hp setup printers. Easy to Download driver & Printer software from HP Envy,HP Officejet,HP Officejet Pro,HP Deskjet Printer Setup Driver Installation

For More Support

123.hp.com/Setup|123.hp.com/oj8049|123.hp.com/oj3830|123.hp.com/oj4650 | 123.hp.com/Setup ojpro|ojpro6968|
ojpro6970|123.hp.com/ojpro6968|123.hp.com/ojpro6970|123.hp.com/ojpro6978|123.hp.com/ojpro8600|123.hp.com/ojpro8710|123.hp.com/ojpro8720

Michael Anderson said...

Want to setup and install your HP Printer? Call us and get www.123.hp.com/​setup instructions. HP Printer Setup, Software and Driver support.

123.hp.com/setup
www.123.hp.com/setup
HP Printer Setup
How to set up HP Printer
hp printer setup for windows
123.hp.com/setup windows
hp printer setup mac
connect hp printer to mac
123.hp.com/setup mac
hp printer wireless setup
hp printer wifi setup
connect hp printer to wifi
hp scanner setup
123 hp setup scanner
hp scanjet scanner setup

HP OfficeJet 3830 Printer Support:
123.hp.com/oj3830
www.123.hp.com/oj3830setup
HP OfficeJet 3830 Printer Setup
hp oj3830 setup
HP OfficeJet 3830 Mac Setup
HP OfficeJet 3830 Windows Setup
HP OfficeJet 3830 Wireless Setup

HP OfficeJet 4650 Printer Support:
123.hp.com/oj4650
www.123.hp.com/oj4650
HP OfficeJet 4650 Printer Setup
HP OfficeJet 4650 Wireless Printer Setup

HP Color Laserjet Pro m255dw Setup:
HP Color Laserjet Pro m255dw Setup
HP Color Laserjet Pro m255dw Printer Setup
Setup HP Color Laserjet Pro m255dw Printer

HP Color Laserjet Pro mfp m181fdw Setup:
HP Color Laserjet Pro mfp m181fdw Setup
HP Color Laserjet Pro mfp m181fdw Wireless Setup

Michael Anderson said...

HP Laserjet Pro m15w Setup:
123.hp.com/laserjet pro m15w
123.hp.com/laserjet pro m15w setup
hp laserjet pro m15w wifi setup
hp laserjet pro m15w setup mac

Hp Laserjet Pro mfp m281fdw Setup:
123.hp.com/laserjet pro mfp m281fdw
123.hp.com/laserjet pro mfp m281fdw wifi setup
Hp Laserjet Pro mfp m281fdw Setup
Hp Laserjet Pro mfp m281fdw Printer Driver Download

Hp Envy 6055 Printer Support:
123.hp.com/envy6055
www.123.hp.com/envy6055
HP Envy 6055 Printer Setup
HP Envy 6055 Wireless Printer Setup
Connect HP Envy 6055 Printer to Wifi

Hp Envy Pro 6455 Printer Support:
123.hp.com/envy6455
www.123.hp.com/envy6455
www.123.hp.com/envypro6455
HP Envy 6455 Printer Setup
HP Envy 6455 Wireless Printer Setup
HP Envy 6455 Printer Setup Windows
HP Envy 6455 Printer Setup Mac

HP Envy Pro 6400 Printer Support:
123.hp.com/envy6400
www.123.hp.com/envy6400
hp envy pro 6400 setup
hp envy pro 6400 connect to wifi

Bella Wilson said...

Kgberlin Pointofperfection Howtoanimate Zdrowyportal Hdbseller Khedmeh Woohim Roopikarisam Lsbclan

Bella Wilson said...

Silviabelli Mycaddie Ontheroad Emiogp Stitchpvp Shearnhrlegal Fondazion Sewalori Cubica

Bella Wilson said...

Et2fun Psychedelicplus Exoltech Doctorumelu Sayandxclub Myforsky Alljobs Unswap Redeemedpeople

Amelia Sampson said...

Get the best-suited solutions to fix the HP printer problem with the ink system for the Officejet Pro 8600 series.

Emails Crunch said...

GoDaddy email problems with outlook
Godaddy email down
Xfinity email
Logged into your Xfinity email account
godaddy login
Verizon email not working
Verizon Email not working today
Verizon webmail problem
Aol Verizon email

seamoss Bronx said...

You are heard about sea moss gel flavors in The Bronx who is a supplement. You may wonder how you could use sea moss gel flavor. And whether there are other ways to consume their sea moss gel in the Bronx.

seamoss Bronx said...

sea moss gel flavors tastes great, not only for the interesting. It does wonders for your skin. It has been nicknamed "sea moss". Of course, you can test the sea moss gel taste and shine from the inside out. But you can also apply sea moss gel directly to your face for even more glow.

seamoss Bronx said...

3. sea moss gel flavors is an alga that has been scientifically proven to promote healthy weight loss. And help build your lean muscle, improve energy. One serving of Sea Moss Gel Flavor provides most of the vitamins and nutrients your body's system needs in a day to keep it healthy.

4Greenhouses said...

Want to Rent My Home Alberta? 4GreenHouses is your place to visit.  We provide you with easy platforms to get your homes rented like a pro.  Just you need to schedule your appointment with us, sign up for an agreement, and get paid your rents. Refer to our website for more details!

Unicom Solutions said...

Murphyz Lawz Creative is an award-winning SEO Services Company Edmonton providing high-quality SEO services. We strive to help your business secure valuable organic rankings, attract relevant traffic, and generate more leads. Our premium link-building services are the perfect place to start. Stay connected with us! Refer to our website.

cheapbestfares said...

Thanks for showing that kind of knowledge on your portal.
You have done all good.
I love to see you again with some new content.

cheapbestfares
Air Flight Tickets

Health Care said...

Great post. I was checking constantly this blog and I'm
impressed!
Looking for best way Regulatory T-Cell Therapies

Dream Home Makers said...

This is a great inspirational article. I am very happy with your good work. You have really given very useful information. Thanks for sharing the best article post. Plot for Sale in Najafgarh

simone lopeze said...

crunchyroll watch party netflix party block site free ad blocker worlds of wonder oysters atlantic water park

speaktohuman said...

Are you playing an EA game on Xbox, PlayStation®, Nintendo Switch, or Google Stadia right now? Here’s how you can connect your accounts. Find here if you need to link your Xbox profile to your EA account. Play Games

Online Store said...

Nice Post!! I really appreciated with you, Thank you for sharing your views with us.

Anonymous said...

marketing
marketing
marketing

namp ibikes said...

Today there are many websites including sales for the best Nampi bike Droom where used Nampi electric bikes can be sold in Santa Teresa Costa Rica. For this, you have to register on the website and sell your bike at the best price.. After registration, you can advertise your Bike rental service Costa Rica. While advertising, keep in mind that the photo of the Nampi electric Bikes should be of good quality so that the impression on the buyer is good. Along with this, while selling a used bike rental, one should avoid bargaining too much in Costa Rica. If you are getting a fair price of nampibikes then there is no need to show much greed in Costa Rica and other countries carefully. Apart from this, take the ID of whoever you sell the Nampi electric bikes to and get an affidavit or document signed for your bike rental. Nampi bikes will not cause you any problems in future.

Alfie said...

Firmware flash and brick recovery are critical aspects of device maintenance. Ways Business Benefit Properly flashing firmware ensures optimal performance and security, while knowing how to recover from a bricked state safeguards against potential disasters.

Anonymous said...

thank you for this guide! after 2 days of failure trying to revert dd-wrt to openwrt following different tutorials and experimenting this is what got it working for me.

«Oldest ‹Older   801 – 835 of 835   Newer› Newest»

Post a Comment