Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:troubleshooting:generic.debrick [2018/03/31 23:23] – ↷ Links adapted because of a move operation bobafetthotmaildocs:guide-user:troubleshooting:generic.debrick [2018/12/19 12:54] – old revision restored (2018/09/14 19:51) per @tmomas' view jw0914
Line 1: Line 1:
 ====== OpenWrt Debricking Guide ====== ====== OpenWrt Debricking Guide ======
-When people say a router is //bricked//, this very generally means, that it does not function properly any longer and the reasons can be various. First of all, you should calm down, relax and read [[docs:techref:flash.layout]], [[docs:techref:filesystems#implementation.in.openwrt|file systems in OpenWrt]] and [[docs:techref:bootloader#Additional Functions|bootloader CLI]]. Now depending on what exactly is broken, you have several possibilities:+When people say a router is //bricked//, this very generally means, that it does not function properly any longer and the reasons can be various. First of all, you should calm down, relax and read [[docs:techref:flash.layout]], [[docs:techref:filesystems#implementation_in_openwrt|file systems in OpenWrt]] and [[docs:techref:bootloader#Additional Functions|bootloader CLI]]. Now depending on what exactly is broken, you have several possibilities:
  
   - if only something on the **[[docs:techref:filesystems#JFFS2]]** partition is broken, you are still able to -> **[[docs:guide-user:troubleshooting:failsafe_and_factory_reset|boot into OpenWrt failsafe mode]]**   - if only something on the **[[docs:techref:filesystems#JFFS2]]** partition is broken, you are still able to -> **[[docs:guide-user:troubleshooting:failsafe_and_factory_reset|boot into OpenWrt failsafe mode]]**
-  - if the **[[docs:techref:filesystems#SquashFS]]** partition or the **Kernel** is broken, you cannot boot into failsafe mode any longer. But you still have a functioning bootloader and so you should follow the same procedures as when you first -> **[[docs:guide-user:installation:generic.flashing#via.bootloader.and.ethernet.port|installed OpenWrt via bootloader]]**.+  - if the **[[docs:techref:filesystems#SquashFS]]** partition or the **Kernel** is broken, you cannot boot into failsafe mode any longer. But you still have a functioning bootloader and so you should follow the same procedures as when you first -> **[[docs:guide-user:installation:generic.flashing#method_2via_bootloader_and_an_ethernet_port|installed OpenWrt via bootloader]]**.
   - if the **[[docs:techref:bootloader]] is broken**, there are only two options left:   - if the **[[docs:techref:bootloader]] is broken**, there are only two options left:
     - access your hardware through the -> **[[docs:techref:hardware:port.jtag|JTAG Port]]**, this //should// allow you to write to the flash. Restore the bootloader.     - access your hardware through the -> **[[docs:techref:hardware:port.jtag|JTAG Port]]**, this //should// allow you to write to the flash. Restore the bootloader.
Line 13: Line 13:
 ---- ----
  
-  * https://forum.openwrt.org/viewtopic.php?id=35462+  * [[https://forum.openwrt.org/viewtopic.php?id=35462]]
  
 ==== As for the proper ways to recover a "bricked" router ==== ==== As for the proper ways to recover a "bricked" router ====
Line 27: Line 27:
 Second mistake - embedded within CFE is a set of NVRAM defaults to be used if the NVRAM partition is missing. This means that in most cases you can just wipe everything but CFE and it'll happily boot, recreate NVRAM and start waiting for a firmware via TFTP. In some cases however, the defaults embedded defaults (in the CFE shipped with the device) don't match the actual hardware and CFE will fail to boot. This is why we have the warnings not to wipe NVRAM. To recover from this situation you need either the original NVRAM contents, or a version of CFE with the correct defaults. Second mistake - embedded within CFE is a set of NVRAM defaults to be used if the NVRAM partition is missing. This means that in most cases you can just wipe everything but CFE and it'll happily boot, recreate NVRAM and start waiting for a firmware via TFTP. In some cases however, the defaults embedded defaults (in the CFE shipped with the device) don't match the actual hardware and CFE will fail to boot. This is why we have the warnings not to wipe NVRAM. To recover from this situation you need either the original NVRAM contents, or a version of CFE with the correct defaults.
  
-FIXME: OK, you have told us what NOT TO DO, now please tell us what TO DO! Let us take the most usual case where someone has installed a bad image on their router. The usual recovery methods have failed, forceing the user to to go to JTAG. The user has used to good OPENWRT Documentation to set up the cables and hardware and software. The user is now sitting at an OPENOCD, URJTAG, or Hairydairymaid prompt. The user has never used a JTAG tool before. What should he do now? What backup commands should he issue, before trying his fix? Some say that by erasing some partitions it will cause the system to start working, well enough to use the other recovery methods. OK, but what exactly is the correct procedure? If this does not work, is there a way to install a good openwrt image directly using JTAG?+FIXME: OK, you have told us what NOT TO DO, now please tell us what TO DO! Let us take the most usual case where someone has installed a bad image on their router. The usual recovery methods have failed, forceing the user to to go to JTAG. The user has used to good OpenWrt Documentation to set up the cables and hardware and software. The user is now sitting at an OPENOCD, URJTAG, or Hairydairymaid prompt. The user has never used a JTAG tool before. What should he do now? What backup commands should he issue, before trying his fix? Some say that by erasing some partitions it will cause the system to start working, well enough to use the other recovery methods. OK, but what exactly is the correct procedure? If this does not work, is there a way to install a good openwrt image directly using JTAG?
  
 === Serial === === Serial ===
Line 41: Line 41:
  
 If you have an Arduino board you can upload a sketch that will send the debrick commands via serial. An example that works for the TP-WR703N is available here: https://forum.openwrt.org/viewtopic.php?pid=191463. Note that the commands for your router could be different! If you have an Arduino board you can upload a sketch that will send the debrick commands via serial. An example that works for the TP-WR703N is available here: https://forum.openwrt.org/viewtopic.php?pid=191463. Note that the commands for your router could be different!
 +
 +=== Raspberry Pi ===
 +
 +If you don't have a USB serial ttl but have a Raspberry Pi, you can use it to connect to the router's serial pins. The Raspberry Pi's uart works at 3.3V which is the correct voltage for most routers. Connect the GND to GND, the RX to TX, and the TX to RX. Leave VCC (or 3.3V) unconnected (that is, in the end you will only be connecting 3 pins out of 4).
  
 === WIFI === === WIFI ===
Line 222: Line 226:
 The example shows burning of a MX25L6406 for the [[toh/alfa.network/ap121|Alfa AP121]]. (No, I didn't brick it. ;-) I just wanted to replace a 4MB Flash with 8 MB flash.) The example shows burning of a MX25L6406 for the [[toh/alfa.network/ap121|Alfa AP121]]. (No, I didn't brick it. ;-) I just wanted to replace a 4MB Flash with 8 MB flash.)
  
-Warning: If you use a FTDI cable for [[docs:techref:hardware:port.serial#prebuilt.cables|serial console]] then you probably must disable the FTDI serial port driver or exclude the product ID 0x6014 for the FT232H chip in the serial driver. Patch for MacOS:+Warning: If you use a FTDI cable for [[docs:techref:hardware:port.serial.cables#prebuilt_cables|serial console]] then you probably must disable the FTDI serial port driver or exclude the product ID 0x6014 for the FT232H chip in the serial driver. Patch for MacOS:
  
 <code> <code>
  • Last modified: 2023/03/18 23:40
  • by ryanc