Site Tools


firmware_basics_procedures

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
firmware_basics_procedures [2021/12/26 04:09] – [What is Firmware and what do all those Terms Mean?] hogwildfirmware_basics_procedures [2024/03/02 22:27] (current) – [Broadcom CFE miniWebserver Method] -clarify CFE details hogwild
Line 1: Line 1:
-====== Flashing Firmware ======+====== Installing FreshTomato ======
  
 ===== Basic Concepts ===== ===== Basic Concepts =====
Line 5: Line 5:
 ==== What is Firmware and what do all those Terms Mean? ==== ==== What is Firmware and what do all those Terms Mean? ====
  
-=== What's "flashing firmware" anyway? ===+ \\
  
-In short, flashing is installing new firmware. On a device like a router, firmware is most of the basic programming code which runs most of the major functions on the device. This is similar to the installed operating system and programs on a PC. However, with firmware, updates are usually less frequent, and the device can usually run in a reasonably stable way even without them.+{{::semiconductor-icon.svg?281 }}
  
-Firmware is "firm" because we don't apply changes or updates nearly so often and it's a bigger event to flash firmware than it is to to update software. This is because the Flash RAM memory which stores router firmware isn't designed to be written to frequently. It's also because more things can go wrong during firmware flashing.+ \\ \\ **What's "flashing firmware" Anyway?** 
 + 
 +In short, flashing is installing new firmware. On a device like a router, firmware is most of the basic programming code which runs most of the major functions on the device. This is similar to the installed operating system and programs on a PC. Similar to a PC, firmware updates are released to fix bugs, add new features, and increase security. The device can usually run without updates in a fairly stable way. However, you should understand the risks this may involve for your network. 
 + 
 +Firmware is "firm" because we don't apply changes or updates nearly so often. It's a bigger event to flash firmware than it is to to update software. This is because the Flash RAM memory which stores router firmware isn't designed to be written to frequently. As well, more things can go wrong during firmware flashing. 
 + 
 + \\ 
 + 
 + \\
  
-=== Why flash firmware?  What's "stock" firmware? ===+=== Why Flash Firmware? ===
  
 Flashing firmware is usually done to fix bugs, improve stability or add new features to the device. In the case of FreshTomato, the firmware often adds all of the above when compared with the vendor's "stock" (original) firmware. Flashing firmware is usually done to fix bugs, improve stability or add new features to the device. In the case of FreshTomato, the firmware often adds all of the above when compared with the vendor's "stock" (original) firmware.
Line 19: Line 27:
 On routers, firmware is stored in a type of non-volatile memory called Flash RAM. The contents of non-volatile memory such as Flash RAM remain after reboots or when the device is turned off. If they were erased, the device would not function. On routers, firmware is replaced or updated by uploading the entire image of the operating system installation and its programs to an EEPROM (electrically erasable and writable) chip. On routers, firmware is stored in a type of non-volatile memory called Flash RAM. The contents of non-volatile memory such as Flash RAM remain after reboots or when the device is turned off. If they were erased, the device would not function. On routers, firmware is replaced or updated by uploading the entire image of the operating system installation and its programs to an EEPROM (electrically erasable and writable) chip.
  
-Again, this is vaguely similar to reformatting and reinstalling the entire operating system on a PC. However, during the firmware flashing process, files are not copied one at a time onto a filesystem. Instead, one single image file that contains the entire installation is copied to the router'Flash RAM, a small portion at a time. You might consider this similar to using the restore process in a drive imaging program such as Macrium Reflect or Acronis TrueImage for Windows, or Time Machine for the Macintosh.+Again, this is vaguely similar to reformatting and reinstalling the entire operating system on a PC. However, during the firmware flashing process, files are not copied one at a time onto a filesystem. Instead, one single image file of the entire installation is copied to Flash RAM, a small portion at a time. This is similar to using a drive imaging program such as Acronis TrueImage for Windows, or Time Machine for the Macintosh.
  
 === What's an Image? === === What's an Image? ===
  
-We refer to the files used to flash Tomato as "image" files, because they are mirror images of an entire installation of an operating system (Linux) and programs. The flashing simply copies the entire image file to the router's Flash RAM.+We refer to the files used to flash FreshTomato as "image" files, because they are mirror images of the entire installation of the operating system  programs. The flashing simply copies the entire image file to the router's Flash RAM.
  
 === What's a Build? === === What's a Build? ===
Line 39: Line 47:
 === How do I Choose which Firmware Build to Use? === === How do I Choose which Firmware Build to Use? ===
  
-Make sure to carefully choose a FreshTomato build appropriate for your hardware model. Choosing the wrong build/version could brick your router if it's not appropriate for your hardware. (See bricking section below). When choosing a build, you need to make note of:+Make sure to carefully choose a FreshTomato build appropriate for your hardware model. Choosing the wrong build/version could brick your router if it's not appropriate for your hardware. (See bricking section below). 
 + 
 +When choosing a build, you need to make note of:
  
   * The router/AP model   * The router/AP model
Line 50: Line 60:
 For some models, Flash RAM is limited, so it’s also important you choose a build that takes up less storage space than is available. Otherwise, you could run out of Flash RAM and your hardware could be bricked. For help choosing a build that's appropriate for your hardware, see the [[:hardware_compatibility|Hardware compatibility]] wiki page. For more guidance on how to choose a build, see the //How Do I Choose a Build?// section on the [[:faq|FAQ]] page. If you're still unsure after you've read both those pages, we recommend you ask for advice on the Tomato forum. For some models, Flash RAM is limited, so it’s also important you choose a build that takes up less storage space than is available. Otherwise, you could run out of Flash RAM and your hardware could be bricked. For help choosing a build that's appropriate for your hardware, see the [[:hardware_compatibility|Hardware compatibility]] wiki page. For more guidance on how to choose a build, see the //How Do I Choose a Build?// section on the [[:faq|FAQ]] page. If you're still unsure after you've read both those pages, we recommend you ask for advice on the Tomato forum.
  
-=== What's "bricking" the router?   Why is that a bad thing? ===+=== What's "Bricking" the Router?   Why is that a Bad Thing? ===
  
 "Bricking" mean making your router completely non-functional after a failed flash. It's called bricking because the hardware would then only be useful as a brick, but not as a router. In this condition, It often can't be fixed without electronics or soldering knowledge. "Bricking" mean making your router completely non-functional after a failed flash. It's called bricking because the hardware would then only be useful as a brick, but not as a router. In this condition, It often can't be fixed without electronics or soldering knowledge.
  
-Never interrupt a firmware flash until it's completely finished. Never turn off the router/device while the update is being flashed. Never reboot your PC, disconnect the network connection with the router, or cancel/pause/stop the software on the PC you're using to perform the firmware update before the update is complete. Doing any of these can result in a partial update. This may leave the firmware corrupted, which can damage how the device works or even "brick it", making it useless.+Here are some rules for successful firmware flashing:
  
-=== What'NVRAM and why should I erase it before and after flashing? ===+  * Never interrupt a firmware flash until it'completely finished.  Be patient. 
 +  * Never turn off the router/device while the update is being flashed. 
 +  * Never reboot your PC until a flash has completed. 
 +  * Never disconnect the network connection with the router until the flash is completed. 
 +  * Never cancel/pause/stop the software on your PC you're using to do the firmware update.
  
-NVRAM is the form of non-volatile memory in routers where settings and parameters are stored.+ \\ Doing any of the above can result in a partial update. This may leave the firmware corrupted, which can damage how the device works or even "brick it", making it useless.
  
-Tomato can sometimes retain some NVRAM variables (settings) even after you flash a new firmware image to your router. Therefore, it'very important to erase NVRAM before flashing. Doing so ensures that all variables from the existing firmware are erased before flashing begins. Erasing NVRAM before flashing is an important step that should NEVER be skipped.+=== What's NVRAM and Why Should I Erase it Before and After Flashing? ===
  
-=== What's a "Dirty Flash" and why should avoid doing one? ===+NVRAM is the part of non-volatile memory in routers where settings and parameters are stored. 
 + 
 +FreshTomato can sometimes retain some NVRAM variables (settings) even after you flash a new firmware image to your router. Therefore, it's very important to erase NVRAM before flashing. Doing so ensures that all variables from the existing firmware are erased before flashing begins. Erasing NVRAM before flashing is an important step that should NEVER be skipped. 
 + 
 +=== What's a "Dirty Flash"?  Why Should Avoid Doing One? ===
  
 A "dirty flash" is a flash which was performed without thoroughly wiping NVRAM before and after flashing. A dirty flash often leads to strange, unexplained symptoms, like web interface pages that don't display properly, "missing" menu items, and just generally buggy or unstable functioning. No matter how tempted you are to "save time", please don't do a dirty flash. You will likely waste time with strange symptoms and regret your choice. A "dirty flash" is a flash which was performed without thoroughly wiping NVRAM before and after flashing. A dirty flash often leads to strange, unexplained symptoms, like web interface pages that don't display properly, "missing" menu items, and just generally buggy or unstable functioning. No matter how tempted you are to "save time", please don't do a dirty flash. You will likely waste time with strange symptoms and regret your choice.
  
-=== How do I flash FreshTomato to my router/hardware? Which method should use? ===+=== How Do I flash FreshTomato to my Router/hardware? Which Method Should Use? ===
  
 There are several methods used to flash firmware on modern routers. The method you use depends on several things. There are several methods used to flash firmware on modern routers. The method you use depends on several things.
  
-  * Which brand/model/revision of hardware you have +  * The brand/model/revision of your hardware. 
-  * The age of your hardware +  * The age of your hardware. 
-  * Whether or not the vendor allows their hardware to be flashed \\ through the firmware that came with the hardware +  * Whether the vendor allows that hardware to be flashed from the firmware it came with. 
-  * Which firmware you're trying to flash: stock, or FreshTomato firmware+  * Which firmware you're trying to flash: stock (vendor's), or FreshTomato firmware
 + 
 + 
 +===== Flashing Asus Hardware ===== 
 + 
 +For Asus hardware, several methods/tools are available for firmware flashing. 
 + 
 +==== Flashing from Tomato Firmware ==== 
 + 
 +In general, if your (FreshTomato supported) Asus hardware has a version of FreshTomato installed, or another Tomato fork, such as Shibby or Toastman, you can upgrade straight to FreshTomato using the Upgrade menu. 
 + 
 + 
 +==== AsusWRT Web Interface Method ==== 
 + 
 +This flashing method is only possible for builds of release 2022.3 and later.  In this example, we will flash an RT-AC68U model.
  
  \\  \\
  
-Let's start by examining some methods for flashing firmware on Asus routers.+Here are the steps to follow:\\
  
 +  - Login to the router's Web interface \\ \\ 
 +  - Under Advanced Settings, go to LAN. \\ \\ 
 +  - Click on the "DHCP Server" tab. \\ \\ 
 +  - Disable DHCP.  Beside "Enable the DHCP Server" select No, and click Apply. \\ \\ Performing this step may cause your client device to disconnect from the router interface \\ \\ and require you to set a manual IP address to reconnect. Disabling the DHCP server may not be necessary.  \\ \\ {{::asus_rt-ac68u-dhcp_server.jpg?651}} \\ \\ \\ \\ 
 +  - Under Advanced Settings, go to Administration. \\ \\ {{::asuswrt-administration.jpg?651}} \\ \\ \\ \\ 
 +  - Click on the Firmware Upgrade tab. \\ \\ 
 +  - Click Browse... and go select the FreshTomato image file appropriate for your router.\\ \\ {{::asuswrt-administration-firmware_upgrade-browse.jpg?651}} \\ \\ \\ \\ 
 +  - After selecting the appropriate image file to flash, click Upload. \\ \\ 
 +  - You should now see a white progress indicator, with text below saying "Firmware is upgrading..." \\ \\ {{::asus_rt-ac68u-firmware-progress.jpg?660}} \\  \\ Wait until the upgrade process is 100% complete. **Do NOT** interrupt the process. \\ \\ \\ \\  
 +  - When the upgrade process completes, reboot the router by turning it off and on again. \\ \\ 
 +  - Reset the router to defaults by pressing the Reset button on the back of the router for at least 3 seconds. \\ \\ {{::asus_rt-ac68u-rear-reset.jpg?654}} \\ \\ 
 +  - The router will erase NVRAM and reboot again. It should now be ready for you to configure it for use.
  
-===== Flashing Asus Hardware =====+ \\
  
-For Asus hardware, several methods/tools are available for firmware flashing.+=== Notes about Flashing via AsusWRT ===
  
-==== Asus Firmware Restoration Utility Method ====+ \\
  
-Asus provides a Windows program called the Firmware Restoration utility.+  * SDK6 MIPS & ARM Models (like the Asus RT-N18U or RT-AC68U): \\ Since release 2022.3, you can upgrade from AsusWRT to FreshTomato or vice versa via the web interface. 
 +  * SDK7 routers (like RT-AC3200) and SDK714 routers (like the RT-AC5300, RT-AC3100): \\ Since release 2022.6, these models support upgrades via the web interface. 
 +  * Asus RT-AC1900U upgrades may require FreshTomato firmware for the Asus RT-AC68U.
  
-[[https://www.asus.com/support/faq/1000814/]]+ \\
  
-This program is used to flash firmware, and to recover from failed firmware flashes. The program finds the router's IP address and allows you to flash firmware to the router, after you've put the router into //Rescue Mode//. Rescue Mode is a mode of operation into which a router is put, that allows it to do nothing but receive a firmware update. 
  
-For Asus models built in 2014 and older, the Asus Firmware Restoration utility will work fine. However, Firmware Restoration will not allow you to flash third-party firmware like FreshTomato on most Asus models built in 2015 and later. The reasons for this are indirectly related to a 2015 decision made by the US FCC (Federal Communications Commission) about changes to wireless features in third-party firmware. See the section below titled: //FCC Regulation Change Affecting Wireless Routers //for details. If you try to flash using this method on newer hardware, the program will simply give you an error message saying it's not possible.+==== Asus Firmware Restoration utility Method ====
  
-Asus Firmware Restoration Utility method+ \\
  
-//Step 1. Download and install Asus Firmware Restoration from the Asus website//+Asus provides a Windows program called Firmware Restoration. This utility is used to flash firmware or recover from a failed firmware flash. It finds the router's IP address and lets you flash firmware to the router, after you've put the router into Rescue Mode. Rescue Mode is a mode in which the router won't do anything except receive a firmware update.
  
-  *    In the Support section of the websitefind your router/hardware model +For Asus models built in or before 2014, the Firmware Restoration utility will work fine. However, on most Asus models after 2014, Firmware Restoration will not let you flash third-party firmware like FreshTomato. If you try this on newer hardware, the program will simply throw an error saying it's not possible.The reasons indirectly relate to a 2015 decision made by the US FCC (Federal Communications Commission) about changes to wireless features in third-party firmware. For details, see the section below titled: //FCC Regulation Change Affecting Wireless Routers//.
-  *    Click "Software and Utility" and specify your Windows version +
-  *    Find and download the latest version of the Firmware Restoration utility +
-  *    Install the Firmware Restoration utility on your PC+
  
- \\  //Step 2. Download the appropriate FreshTomato image file//+ \\
  
-Download the correct image file for your router. Assuming you've read all the above, see the [[:faq|FAQ]] wiki page for information on the file naming convention for builds. Also see the [[:hardware_compatibility|Hardware Compatibility]] page on the wiki for help choosing the most appropriate build image for your hardware. If you're still not sure after reading those, it’s recommended that you ask for help on the Tomato forum:   \\  [[https://www.linksysinfo.org/index.php?forums/tomato-firmware.33/|https://www.linksysinfo.org/index.php?forums/tomato-firmware.33/]]+To flash using the Firmware Restoration utility:
  
-It's strongly recommended that you also download the latest version of stock firmware for your hardware. That wayin case flashing FreshTomato fails, you can always re-flash the stock firmware. Remember, after failed flash, you might not have a working router. If that happens, you might be unable to download stock firmware on your normal network.+  - Ensure an Ethernet cable is the only connection between your PC and the router. \\ Disconnect all other Ethernet cables from the router. Other connections can cause problems. \\ Some people have flashed firmware via a WiFi connection. However, for maximum stability, flash only via Ethernet. \\ Never attempt to flash firmware via a WAN connection. It involves high risk and advanced skills. \\ \\  
 +  - Download and install Asus Firmware Restoration from the Asus website 
 +    - In the Support section of the Asus website, find your router/hardware model.  
 +    - Click "Software and Utility" and specify your Windows version. 
 +    - Find and download the latest version of the Firmware Restoration utility. 
 +    - Install the Firmware Restoration utility. \\ \\ 
 +  - Download the appropriate FreshTomato image file// // 
 +    - Download an appropriate FreshTomato image file for your router. \\ If you've read the Basic Concepts above, see the [[:faq|FAQ]] for the file naming convention for builds. \\ See the [[:hardware_compatibility|Hardware Compatibility]] wiki page for help choosing an appropriate image file for your hardware. \\ If you're still not sure after reading thoseask for help on the Tomato forum:  [[https://www.linksysinfo.org/index.php?forums/tomato-firmware.33/|Tomato Forum]] 
 +    - Download the latest Asus firmware for your router so that if the FreshTomato flash fails, you can flash back to Asus firmware. \\ Remember, without working router, you might not be able to download firmware on your network until it's working again. \\ \\ 
 +  - Clear the NVRAM 
 +    - Clear NVRAM by restoring factory defaults in the Asus interface. This resets settings to defaults and ensures \\ there's enough memory to perform a flash. The process of clearing NVRAM varies, depending on your model. \\ To wipe NVRAM settings within stock Asus firmware: 
 +      - Click on the “Administration” menu. 
 +      - Click on the “Restore/Save/Upload” Setting tab. 
 +      - Beside “Factory Default”, click the Restore button. \\ \\ {{::asus_rt-ac68u-admin-restore_settings.jpg?614|Clearing NVRAM settings in Asus stock firmware}} \\ \\ \\ This method doesn't always work perfectly. If it fails, try the hardware button method described next. \\ 
 +    - To wipe NVRAM on most current Asus models using the hardware button method: 
 +      - Unplug the AC adapter from the back of the router. 
 +      - Hold down the WPS button and reinsert the power connector. Continue to hold the WPS button for 30 seconds. 
 +      - Release the WPS button. All front LEDs should blink once to signal that NVRAM was cleared. \\ If you have trouble, check the user manual or the manufacturer's FAQ for your model. \\ \\ 
 +  - Configure your PC with static IP address and disable all WiFi interfaces on your PC.\\ In Rescue Mode, the DHCP server is not available, so your client will need a static IP address.  \\ In some cases, DHCP might prevent Firmware Restoration from completing the flash. \\ In some cases, DHCP prevents connection to the router after flashing, when the DHCP server isn't yet available. \\ \\  
 +  - Enable Rescue Mode on the router. Typically, for Asus routers, this is done as follows: 
 +    - Remove the AC adapter plug from the back of the router. 
 +    - Hold down the Reset button while plugging in the power cable again so the power turns on. 
 +    - Continue to hold Reset until the Power LED starts to slowly flash on and off.  
 +    - Release the Reset button. 
 +    - Move quickly to step 7. Firmware Restoration has a timeout period. If flashing doesn't occur \\ you'll have to enable Rescue mode again. \\ \\ 
 +  - Flash FreshTomato 
 +    - Run Firmware Restoration. Click "Browse..." 
 +    - Select the correct .trx firmware file for your router. Click "Open". \\ \\ {{::asus_firmware_restoration-browse.jpg?637}}  \\ \\  
 +    - Click "Upload". Ignore any warnings that the firmware is incompatible. Click "OK" to the prompt. 
 +    - The utility should begin scanning for your router device, then slowly uploading the firmware. \\ \\ 
 +  - Wait until flashing is complete. **The progress bar is not accurate** regarding completion.  \\ Flashing is complete only when the power LED comes back on. \\ Be patient. This portion can take up to 45 minutes. \\ DO NOT PANIC if the program says the upload isn't complete, or if it hangs. Wait another 10 to 15 minutes. \\ When the process is complete, the router should automatically turn on and off. 
 +    - The router should now let clients connect. Open a web browser to 192.168.1.1 and net mask: 255.255.255.0 . \\ You should see a login screen. Enter username: “root”, and password “admin” to log on.\\ \\ 
 +  - From within FreshTomato, clear NVRAM contents again:  
 +    - Under Administration, click Configuration. 
 +    - Under Restore Default Configuration, select //Erase all data in NVRAM memory(thorough)//. Click "OK". \\ \\ {{freshtomato-erase_nvram.jpg?654}}
  
- \\  //Step 3. Clear the NVRAM//+ \\ At this point, the router should function properly.
  
-The next step is to clear the router's NVRAM (non-volatile RAM) where settings and other parameters are stored. This will reset all settings to defaults and will ensure the device has enough memory available to properly perform the flashing process.+Sometimes on the first boot after flashing, FreshTomato may seem buggy or strange things may happen.
  
-The process of clearing NVRAM will vary, depending on the model of your hardware. The simplest way to wipe NVRAM settings from within stock Asus firmware is:+In such cases:
  
-  * Connect to the router's web interface +  - Reboot the router once or twice more.  
-  * Click on the “Administration” menu +  - Clear your browser cache before putting the router into operation. \\ Web browsers may cache data that shouldn't be cached. 
-  * Click on the “Restore/Save/Upload” Setting tab +  - Refresh the page. Any problems caused by cached browser data should be gone.
-  * Beside “Factory Defaults”, check "initialize all the settings, and clear  \\ all the data log for AIProtection, Traffic Analyzer and Web History +
-  * Click "Restore"+
  
  \\  \\
  
-{{:asus-factory-reset.jpg|Clearing NVRAM settings in Asus stock firmware}}+If problems persist, try the following:
  
- \\   \\ This method doesn't always work perfectlyIf you have trouble, you can try the hardware-only methodFor many current Asus model routers, there are two buttons in addition to the power button you'll need to get familiar with. One is the Reset button and the other is the WPS button.+  - Clear your web browser cache again 
 +  Erase NVRAM once more. 
 +  - Reboot the router at least twice more.
  
-To wipe the NVRAM on current Asus models:+If the router is still acting strangely at that point, it is advised that you request help on the Tomato Web forum.
  
-  * Unplug the router's AC adapter from the back of the router + \\
-  * Hold down the WPS button and reinsert the power connector. \\ Continue to hold the WPS button for about 30 seconds +
-  * After you release the WPS button, all LEDs on the front of the router \\ should blink once to signal that NVRAM memory was cleared+
  
-To be sure of the correct procedure for your model, check the user manual, or the instructions on the manufacturer's website. 
  
- \\  //Step 4. Assign a static IP address to your PC and completely disable Wi-Fi on the router//+==== TFTP Method ====
  
-In Rescue Mode, the DHCP server is not available. For this reason, assigning your PC static IP is recommended. Also, there have been cases in which a DHCP appeared to cause the Firmware Restoration utility to stop before flash was complete. It also may make it more difficult to connect to the router after flashing, if the DHCP server isn't available yet.+"Trivial File Transfer Protocol" is a small utility for transferring files between hosts on TCP/IP network. It lets you upload firmware images to router. There are command-line and graphical tftp client programs available. Windows includes a tftp program for the command line.
  
-Disconnect any WAN cable from your hardware. This has been known to occasionally cause problems.+The TFTP method is useful when the manufacturer's firmware blocks other methods of upgrade from the stock (original) firmware.
  
-Many people have had success flashing firmware via a Wi-Fi connection. However, for maximum stability, it's recommended you disable all Wi-Fi on the router and then flash via an Ethernet connection. Never attempt to flash firmware using over a WAN connection. That involves much more risk. The flashing process could be incomplete or corrupt. The potential result is either having to attempt the flash again, or bricking the hardware. Finally, before flashing, make sure the hardware you want to flash is the only router/AP hardware on the network to avoid IP address conflicts.+To prepare to flash via tftp:
  
- \\  //Step 5Enable Rescue Mode on the router//+  * Reset the router's NVRAM to defaults, as described above 
 +  * Put the router into Rescue Mode, as described above. 
 +  * Put the FreshTomato firmware file in the same folder as your tftp program. 
 +  * Open a command prompt, and change directories to the folder containing the firmware. 
 +  * Type ''“tftp –I  PUT filename.trx <IP address of router>"''  but **DO NOT** press Enter. 
 +    * (Replace "filename.trx" with the name of an appropriate image file for your model) 
 +  * Unplug the AC adapter from the router. 
 +  * Hold down the Reset button while reconnecting the AC adapter. 
 +  * When the power light starts slowly blinking, let go of the Reset button. 
 +  * Press enter at the command line above to start the tftp upload process. 
 +  * Wait at least 10 minutes for the upload to complete. 
 +  * If flashing is successful, you will be taken to the FreshTomato logon screen 
 +  * Log on to the FreshTomato web interface and reset NVRAM, as in the screenshot above.
  
-For Asus routersthis usually means:+Note that Rescue Mode has a timeout periodso there is a limit as to how long you have to upload the firmware. If the timeout period expires, you may need to put the hardware into Rescue Mode again and restart the flashing process.
  
-  * Remove the AC adapter plug from the back of the router + \\ \\
-  * Press and hold the Reset button while plugging in the power cable again so the power turns on +
-  * Continue to hold Reset until the Power LED starts to flash on and off. Then, release the Reset button +
-  * Move quickly to step 6. Firmware Restoration has a timeout period and if the flash doesn't take place, you'll need to put the router into rescue mode again.+
  
- \\  //Step 6. Flash FreshTomato// 
  
-Now, run Firmware Restoration. Select the correct firmware .trx file. You can safely ignore any message warning you that the firmware is incompatible. Click OK to agree to the prompt. The utility should begin scanning for your router/hardware device, and then slowly uploading the firmware.+==== Broadcom CFE miniWebserver Method ====
  
- \\  {{:firmware_restoration_utility.jpg}}  \\   \\+{{:broadcom-cfe-miniwebserver.jpg?615}}
  
-Wait until the flashing is complete. The flashing is complete only when the power LED comes back on, not necessarily when the progress bar on the update tool indicates it has finished. BE PATIENT! This can take as long as 45 minutes to complete. Even if the utility says the upload is not completed, or it hangs at a certain point, DO NOT PANIC. Wait for another 10 to 15 minutes before you do anything else. When the process is complete, the router should automatically power cycle. Your router should now be working on IP address 192.168.1.1 with 255.255.255.0 subnet mask. At that point, open a web browser and go to 192.168.1.1 . You should now be able to login with user ““root” and password “admin”.+ \\
  
- \\  Now, from within FreshTomato, erase the NVRAM settings again:  \\+Modern routers use CFE (Common Firmware Environment) for bootstrapping.
  
-  - Under Administrationclick Configuration. +For a subset of Broadcom devicesCFE has been preset to run the convenient miniWeb server interface (shown in the image above). CFE allows you to install any compatible firmware on your device, making the router largely "unbrickable".
-  - Under Restore Default Configuration, click Erase all data in NVRAM memory(thorough).+
  
-{{:asus-factory-reset-freshtomato.jpg}}+When CFE loads, it sets the router's IP address to 192.168.1.1 . As a result, you can connect to the router by setting your client device's Ethernet interface with an address in the same subnet (192.168.1.2) and visiting the above address in a web browser. CFE includes a timeout period, so you'll need to reset your router and access it before it decides to load any custom/stock firmware on the device.
  
- \\  At this point, your hardware should function properly.+If you already have Freshtomato on your device, you can change the CFE timeout setting by adjusting the// Boot Wait Time// parameter in the [[advanced-misc|Miscellaneous]] menu.
  
-However, sometimes on the first boot after flashing, the hardware may seem buggy or unexpected things may happen. If this happens, reboot the hardware once or twice more, and clear your browser cache before installing the router for operation on your network. Web browsers sometimes cache data that shouldn't be cached. Now, refresh the page, and the problems problems should go away.+CFE can also be accessed by using a console/command prompt and connecting via a USB-to-serial interface. However, that is only appropriate for advanced users with special equipment.\\
  
-If problems continue, try the following steps, in order:+ \\
  
-  - Cleared your web browser cache at least twice  
-  - Erased NVRAM at least twice, and 
-  - Rebooted the router at least three times 
  
-If the router is still acting buggy or incorrectly at that point, we recommend that you request help on the Tomato forum.+===== Flashing Linksys Hardware =====
  
  
-==== TFTP Method ====+==== Flashing when Tomato is already installed. ====
  
-"Trivial File Transfer Protocol" is small utility for transferring files between hosts on a TCP/IP network. It lets you upload firmware images to a router. There are command-line and graphical tftp client programs available. Windows includes a tftp program for the command line.+If your hardware has fork of Tomato already installed, you can simply use the //Administration///[[admin-upgrade|Upgrade]] menu in (Fresh)Tomato's web interface to upgrade to FreshTomato.
  
-To prepare to flash via tftp: 
  
-  * Reset the router's NVRAM to defaultsas described above +==== Flashing From Stock (OEM) Firmware ==== 
-  * Put the router into Rescue Mode, as described above + 
-  * Put the FreshTomato firmware file in the same folder as your tftp program +Flashing Linksys hardware canin some cases, be a little more complicated than flashing other brands of hardwareIt is recommended that you first check the Notes section of the [[hardware_compatibility|Hardware compatibility]] list for important details before flashing. This section includes warnings about important issues such as NVRAM sizes/limitationsCFE modifications which might be required, hardware revisions and more. 
-  * Open a command prompt, and change directories to the folder which contains the firmware + 
-  * Type “tftp –I  PUT filename.trx IP address of router"  but **DO NOT** press Enter +Some models might need to be flashed with a special "initial" firmware build first before you can install a regular FreshTomato buildPlease read about this above **before** installing FreshTomato. 
-  * Unplug the AC adapter plug from the router + 
-  * Hold down the Reset button while reconnecting the AC adapter +There are no official wiki HOWTOs for flashing Linksys hardware. Howeverthere are several unofficial HOWTOs on the Tomato forum which have been used successfully many times: 
-  * When the power light starts blinkinglet go of the Reset button + 
-  * Press enter to start the tftp upload process +=== For models: === 
-  * Wait at least 10 minutes for the upload to complete + 
-  * Log on to Tomato's web interface and reset NVRAM, as shown in the screenshot above.+  * ea6200 
 +  * ea6350v1
  
-Note that there is a time limit on how long you have to upload the firmware fileIf the timeout period expires, you may need to put the hardware into Rescue Mode again and restart the flashing processThere is no need to reset the hardware to defaults again.+[[https://www.linksysinfo.org/index.php?threads/linksys-ea6200-ea6350v1-freshtomato-arm-discussion.74916/|Linksys-EA6200/EA6350v1 Freshtomato-ARM & Discussion.]]
  
  \\  \\
  
-==== Broadcom CFE miniWebserver Method ====+=== For models: ===
  
-TBD.+  * ea6300v1 
 +  * ea6400 
 +  * ea6500v2 
 +  * ea6700 
 +  * ea6900v1
  
-{{:broadcom-cfe-miniwebserver.jpg}}+[[https://www.linksysinfo.org/index.php?threads/guide-flash-linksys-ea6300v1-ea6400-ea6500v2-ea6700-ea6900v1-0-1-1-with-tomato.73877/|How to flash Linksys EA6300v1, EA6400, EA6500v2, EA6700, EA6900v1.0/1.1 with Tomato]] 
 + 
 + \\ If you you are still not sure how to proceed, it is recommended that you post an inquiry on the [[https://www.linksysinfo.org/index.php?forums/tomato-firmware.33/|Tomato forum]] to avoid problems. 
 + 
 +You are also advised to read the Notes section at the bottom of this page for more details on general flashing basics. 
 + 
 + 
 +===== Flashing Netgear Hardware ===== 
 + 
 +==== Netgear R-series ====
  
  \\  \\
  
-=== FCC Regulation Change Affecting Wireless Routers ===+=== When Netgear firmware is already installed === 
 + 
 +If you have a Netgear R-series router with Netgear firmware installed, **you must** first flash with one of the "Netgear R-series initial" files. Once you have an R-series initial FreshTomato build installed, you can then upgrade FreshTomato to newer versions using regular build files. The initial .zip file contains a firmware file with a .chk file extension. The original Netgear firmware can use that file to install FreshTomato. 
 + 
 +As an example, the following steps review the process for flashing an R7000 with an initial build, and then a normal build. 
 + 
 + \\ 
 + 
 +First, download the two files you'll need to flash the R7000: 
 + 
 +The "R-series initial file" for R7000: 
 + 
 +[[https://freshtomato.org/downloads/freshtomato-arm/2023/2023.2/Netgear%20initial%20files/freshtomato-R7000-2023.2-initial-64K.zip|https://freshtomato.org/downloads/freshtomato-arm/2023/2023.2/Netgear%20initial%20files/freshtomato-R7000-2023.2-initial-64K.zip]] 
 + 
 +This .zip file has the following MD5SUM value:  e3ef483d088215e9abe4888e0dd36d37 
 + 
 + \\ 
 + 
 +The normal R7000 AIO build file: 
 + 
 +[[https://freshtomato.org/downloads/freshtomato-arm/2023/2023.2/K26ARM/freshtomato-R7000-ARM-2023.2-AIO-64K.zip|https://freshtomato.org/downloads/freshtomato-arm/2023/2023.2/K26ARM/freshtomato-R7000-ARM-2023.2-AIO-64K.zip]] 
 + 
 +This .zip file has the following MD5SUM value: ec63c869fe14f5b46cbb13813c1699bf 
 + 
 + \\ 
 + 
 +Verify integrity of both .zip files by running a hash check program against them. On Windows, HashMyFiles works well. 
 + 
 +If the MD5 has found in the hash check program matches the number listed above, the file is good. If it does not match the value above, the file has been corrupted during download and should be downloaded again. Do not flash using the contents of .zip files that fail a hash check. 
 + 
 + \\ 
 + 
 +Now, unzip the .zip files. The two files inside should look like this (for this particular router model/release of FreshTomato). 
 + 
 +''freshtomato-R7000-2023.2-initial-64K.chk'' 
 + 
 +''freshtomato-R7000-ARM-2023.2-AIO-64K.trx'' 
 + 
 + \\  \\ 
 + 
 +If you're not sure which build file to download, 
 + 
 +  * Check the [[hardware_compatibility|Hardware compatibility]] list for your model 
 +  * Read the "//How Do I Choose a Firmware Build//" section in the [[faq|FAQ]]  
 +    * A table there illustrates the naming scheme of FreshTomato builds. 
 + 
 + \\ 
 + 
 +In the case of the R7000, the data in the table describe these specifications: 
 + 
 +  * CPU: The R7000 contains an ARM chipset 
 +  * NVRAM: The R7000 contains 64KB 
 +  * AIO = All in One build (contains all feature available). 
 +  * Thus, we choose firmware with filename freshtomato-R7000-ARM-[version]-AIO-64K.trx (only after we flash an initial build). 
 + 
 + \\ 
 + 
 +Now, let's perform the flash procedure: 
 + 
 + \\ 
 + 
 +  - Connect an Ethernet cable to a LAN port on your router and your computer's Ethernet port. **Do NOT** use WiFi. \\ \\  
 +  - Disconnect all other Ethernet connections. \\ \\  
 +  - Power on the router. Wait 2-5 minutes for it to finish booting. \\ \\  
 +  - Reset the router to defaults by holding down Reset with a paperclip for 30 seconds. Follow the user guide for specifics.\\ \\ {{::netgear-r7000-reset-button.jpg?639}} \\ \\  
 +  - Wait again 2-5 minutes until the router finishes rebooting. \\ \\ \\ \\  
 +  - Open a Web browser and enter: 192.168.1.1 . Log on with your current Username/Password. \\ \\ {{::netgear-r7000-logon_prompt.jpg?640}} \\ \\ \\ \\  
 +  - Now disable DHCP. Go to Advanced--> LAN Setup and uncheck "Use Router as DHCP Server" and Save. \\ \\ {{::netgear-r70000-lan_settings-disable_dhcp.jpg?635}} \\ \\ \\ \\  
 +  - Go to the Advanced TAB > Administration > Router update. \\ \\ {{::netgear-r7000-router_update-browse-highlight.jpg?635}} 
 +    - Browse to the .CHK file above (freshtomato-R7000-20xx.x-initial-64K.chk) then click UPLOAD. \\ \\ \\ \\ 
 +  - When prompted to continue, click OK. \\ \\ {{::netgear-r7000-router_update-continue_prompt-2023.2.jpg?603}} \\ \\  
 +  - At the Router Update Warning screen, click YES. Then, the screen shows: "The Router is updating its firmware". \\ \\ {{::netgear-r7000-firmware-the_router_is_updating_firmware.jpg?609}} \\ \\ \\ \\  
 +  - The Router Update screen then shows: "Rebooting the router now, please wait" \\ \\ {{::netgear-r7000-rebooting_the_router_please_wait.jpg?608}} \\ \\  
 +  - Wait 2-5 minutes until presented with a login. **Do NOT** log on.  
 +    - If your PC's IP address changes to 169.254.x.x, Windows configured that address, as it can't find a DHCP server.  
 +    - Wait 5 minutes, and proceed with the next step.\\ \\ \\ \\ 
 +  - Press the Reset button once briefly with a paper clip.  \\ \\ {{netgear-r7000-reset-button.jpg?639}} \\ \\ \\ \\  
 +  - While the router reboots, configure your PC with a static IP address of 192.168.1.9 and gateway of 192.168.1.1 .  
 +    - This step may not be necessary, as the router should be running DHCP, and should assign your PC an IP address. \\ \\ \\ \\ 
 +  - Ping the router's IP address to verify that it finished rebooting: "ping -t 192.168.1.1" . \\ \\ {{::netgear-r7000-ping_check_1.png?600}} \\ \\  
 +    - Wait until the ping results show that it rebooted ("Destination Host Unreachable") and reconnected ("64 bytes from...") twice. \\ \\ {{::netgear-r7000-ping_check_2.png?600}} \\ \\  
 +    - Flashing is finished, and with the router rebooted, you can connect to its Web interface. \\ \\ \\ \\ 
 +  - In a web browser, enter: 192.168.1.1 .  Enter Username: "root", Password: "admin". \\ \\ {{::netgear-r7000-freshtomato_logon_prompt.jpg?600}} \\ \\  
 +  - If this fails: 
 +    - Use a private browser (incognito) window. 
 +    - Clear the browser cache. 
 +    - You probably didn't reset the device, or you didn't wait long enough. Please repeat Step 13. \\ \\ \\ \\ 
 +  - You should now be logged in. You should see "System" on the Overview menu.  \\ \\ {{::netgear-r7000-first_logon-overview-2023.2.jpg?648}} \\ \\ \\ \\  
 +  - Under Configuration > Restore Default Configuration > select "Erase all data in NVRAM memory". \\ \\ {{::netgear-r7000-erase_nvram_thorough-2023.2_initial.jpg?584}} \\ \\ \\ \\  
 +  - You should see: "Please wait while the defaults are restored..." \\ \\ {{::netgear_r7000-please_wait_while_the_defaults_are_restored.jpg?600}} \\ \\  
 +  - Eventually, the initial build is installed and NVRAM cleared. Now, upgrade to a normal build. \\ \\  
 +  - Continue (or open) 192.168.1.1 in a browser window. \\ \\ \\  \\  
 +  - Under Administration > Firmware Upgrade, click Browse... and find the .TRX firmware file above.  \\ \\ {{::netgear-r7000-upgrade_firmware-initial-2023.2.jpg?600}} 
 +  - This was the .trx file at the time this was written. Select it. Now, click Upgrade. \\ \\ \\ \\  
 +  - Wait..You will see a timer, and: "Please wait while the firmware is uploaded and flashed." \\ \\ {{::netgear_r7000-please_wait_while_the_firmware_is_flashed.jpg?600}} \\ \\ \\   
 +  - Wait...You'll see "Image successfully flashed. Then you'll see: "Please wait while the router reboots..." and a countdown. \\ \\  {{::freshtomato-please_wait_while_the_router_reboots.jpg?600}} \\ \\  
 +  - Eventually, you'll be asked to Click "continue". Do so, and you'll be returned to FreshTomato's main menu. \\ \\ \\ \\  
 +  - Under Administration > Configuration > select "Erase all data in NVRAM memory", click OK. \\ \\ {{netgear-r7000-erase_nvram_thorough-2023.2_initial.jpg?584}} \\ \\  
 +  - You should see: "Please wait while the defaults are restored..." and a countdown timer. \\ \\ \\ \\  
 +  - Eventually, you should be be prompted to click "Continue". Click "Continue". \\ \\ {{netgear_r7000-please_wait_while_the_defaults_are_restored.jpg?613}} \\ \\ \\  
 +  - You should now be back at the Upgrade Firmware menu. The flashing process is complete. \\ \\ 
 + 
 + \\ 
 + 
 +=== When FreshTomato is already installed === 
 + 
 +If you already have FreshTomato installed on your Netgear, you can upgrade to newer releases using regular build files. These .zip archives contain firmware files ending with the .trx file extension. 
 + 
 + 
 +==== Flashing Netgear Routers back to Original Netgear (Genie) Firmware ==== 
 + 
 +A Netgear router with FreshTomato installed cannot be directly flashed back to original Netgear firmware with normal builds. Some Netgear models can be flashed back to Netgear firmware using special builds called "Netgear back to OFW" builds. You can check if your Netgear model is supported in the "Netgear Back to OFW" folder in the appropriate FreshTomato downloads folder: 
 + 
 +[[https://freshtomato.org/downloads/freshtomato-arm/Netgear%20back%20to%20OFW/|"Netgear back to OFW" firmware]] 
 + 
 + 
 + 
 + 
 + 
 +===== FCC Regulation Change Affecting Wireless Routers =====
  
 Starting in 2015, The US FCC (Federal Communications Commission) passed legislation designed to block people from changing certain Wi-Fi settings, to avoid creating radio interference with other devices. Wi-Fi radio power had to be implemented in hardware so end users could not modify it. For example, the FCC wanted to make sure end users didn't override country settings or power limits. Starting in 2015, The US FCC (Federal Communications Commission) passed legislation designed to block people from changing certain Wi-Fi settings, to avoid creating radio interference with other devices. Wi-Fi radio power had to be implemented in hardware so end users could not modify it. For example, the FCC wanted to make sure end users didn't override country settings or power limits.
Line 219: Line 428:
  
  \\  SLATE: FCC Support for hackable routers is a win for all of us:  \\  [[https://slate.com/technology/2016/08/fcc-support-for-hackable-wireless-routers-is-a-win-for-all-of-us.html]]  \\  SLATE: FCC Support for hackable routers is a win for all of us:  \\  [[https://slate.com/technology/2016/08/fcc-support-for-hackable-wireless-routers-is-a-win-for-all-of-us.html]]
 +
 +===== Installing FreshTomato Notes =====
 +
 +  * Some devices might need to be flashed with a special "initial" firmware build first before you can install a regular FreshTomato build. Please read about this above **before** installing FreshTomato.
 +  * On some models, like the Asus-AC3200, you should first install a specific version of stock firmware to get the full 128K of NVRAM formatted before attempting FreshTomato installation. Failing to do so will limit NVRAM to 64KB. The same applies to other models, to obtain their full 64K instead of only 32K.
 +  * On some models, flashing may take a long time, as much as 10-15 minutes before FreshTomato is ready. Occasionally, you may need to power cycle and even press the physical factory reset button to make FreshTomato boot properly after flashing. This generally only happens once.
 +  * If other methods fail, flashing via TFTP is almost always possible. This requires an Ethernet connection, TFTP server software running on router and a TFTP client program on the client device. Generally, this should be attempted only as a last resort, when all other methods have failed.
  
  
firmware_basics_procedures.1640491757.txt.gz · Last modified: 2021/12/26 04:09 by hogwild