Firmware upgrade via command line: Difference between revisions

From Teltonika Networks Wiki
Tags: Visual edit: Switched Mobile edit Mobile web edit
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Introduction==
==Introduction==


This article describes the process of updating an RUTxxx router's firmware via command line. It applies to [[RUT230]], [[RUT240]], [[RUT850]], [[RUT950]] and [[RUT955]] routers.
This article describes the process of updating an RUTxxx router's firmware via command line. It applies to all RUTXxx, RUT2xx, RUT9xx devices, like:[https://wiki.teltonika-networks.com/view/RUT200 RUT200], [https://wiki.teltonika-networks.com/view/RUT241 RUT241], [https://wiki.teltonika-networks.com/view/RUT901 RUT901], [https://wiki.teltonika-networks.com/view/RUT951 RUT951] and [https://wiki.teltonika-networks.com/view/RUTX11 RUTX11] routers.


Upgrading the router's firmware via command line can be beneficial when:
Upgrading the router's firmware via command line can be beneficial when:
Line 12: Line 12:


*You will need a firmware file. You can download firmwares from our wiki, from one of the following links:
*You will need a firmware file. You can download firmwares from our wiki, from one of the following links:
**[[RUT230 Firmware Downloads]]
* [https://wiki.teltonika-networks.com/view/RUT200_Firmware_Downloads For RUT200]
**[[RUT240 Firmware Downloads]]
* [https://wiki.teltonika-networks.com/view/RUT241_Firmware_Downloads For RUT241]
**[[RUT850 Firmware Downloads]]
* [https://wiki.teltonika-networks.com/view/RUT956_Firmware_Downloads For RUT956]
**[[RUT950 Firmware Downloads]]
* [https://wiki.teltonika-networks.com/view/RUTX11_Firmware_Downloads For RUTX11]
**[[RUT955 Firmware Downloads]]
* [https://wiki.teltonika-networks.com/view/RUTX12_Firmware_Downloads For RUTX12]
* [https://wiki.teltonika-networks.com/view/RUTX50_Firmware_Downloads For RUTX50]


*You will need access to the router via some form of command line. Access to command line interfaces (CLIs) supported by RUTxxx routers are described in this article:
*You will need access to the router via some form of command line. Access to command line interfaces (CLIs) supported by RUTxxx routers are described in this article:
Line 37: Line 38:
Use the '''scp''' command to copy the firmware file via SSH. Open up a Terminal in the directory where the file is located (right-click any blank space in the directory and select "Open in Terminal"). Then enter the following command:
Use the '''scp''' command to copy the firmware file via SSH. Open up a Terminal in the directory where the file is located (right-click any blank space in the directory and select "Open in Terminal"). Then enter the following command:
<pre>
<pre>
scp RUT9XX_R_00.05.00.5_WEBUI.bin [email protected]:/tmp/
scp RUTX_R_00.07.08_WEBUI.bin [email protected]:/tmp/
</pre>
</pre>
Where:
Where:
<ul>
<ul>
<li>
<li>
'''RUT9XX_R_00.05.00.5_WEBUI.bin''' is the firmware file's name. Replace it with your firmware's name.
'''RUTX_R_00.07.08_WEBUI.bin''' is the firmware file's name. Replace it with your firmware's name.
</li>
</li>
<li>
<li>
Line 54: Line 55:
<li>
<li>
'''Using wget on CLI''' <br>
'''Using wget on CLI''' <br>
Use the '''wget''' command to download the firmware file directly into the tmp directory of your router with the CLI. Open RMS and login to the CLI interface, or open a SSH sessie to get acces to your router's CLI. And enter the following commands:
Use the '''wget''' command to download the firmware file directly into the tmp directory of your router with the CLI. Open RMS and login to the CLI interface, or open an SSH session to get access to your router's CLI. And enter the following commands, in this case, we are using RUTX11 device:
<pre>
<pre>
cd /tmp/
cd /tmp/
wget -c https://wiki.teltonika-networks.com/wikibase/images/3/35/RUT2XX_R_00.01.10_WEBUI.bin
wget -c https://firmware.teltonika-networks.com/7.8/RUTX/RUTX_R_00.07.08_WEBUI.bin
sysupgrade RUT2XX_R_00.01.10_WEBUI.bin
sysupgrade RUTX_R_00.07.08_WEBUI.bin
</pre>
</pre>
Where:
Where:
<ul>
<ul>
<li>
<li>
'''https://wiki.teltonika-networks.com/wikibase/images/3/35/RUT2XX_R_00.01.10_WEBUI.bin''' is the firmware file's download link, can be found on this wiki.
'''https://firmware.teltonika-networks.com/7.8/RUTX/RUTX_R_00.07.08_WEBUI.bin''' is the firmware file's download link, can be found on this wiki.
</li>
</li>
</ul>
</ul>
Line 74: Line 75:
To upgrade the firmware, login to the router and execute the following command:
To upgrade the firmware, login to the router and execute the following command:


  sysupgrade /tmp/RUT9XX_R_00.05.00.5_WEBUI.bin
  sysupgrade /tmp/RUTX_R_00.07.08_WEBUI.bin


*'''sysupgrade''' is the command used to upgrade the router's firmware.
*'''sysupgrade''' is the command used to upgrade the router's firmware.
*'''RUT9XX_R_00.05.00.5_WEBUI.bin''' is the firmware file's name. Replace the firmware file's name that you are using. If you uploaded the firmware via WebUI, the name will automatically be changed to '''firmware.img''' regardless of what firmware version you use.
*'''RUTX_R_00.07.08_WEBUI.bin''' is the firmware file's name. Replace the firmware file's name that you are using. If you uploaded the firmware via WebUI, the name will automatically be changed to '''firmware.img''' regardless of what firmware version you use.


==See also==
==See also==


*Other guides concerning system upgrades:
*Other guides concerning system upgrades:
**[[RUT2xx Bootloader Upgrade]]
**[https://wiki.teltonika-networks.com/view/RUT2xx_Firmware_via_The_Bootloader_Menu RUT2xx Firmware via The Bootloader Menu]
**[[RUT2xx Firmware via The Bootloader Menu]]
**[https://wiki.teltonika-networks.com/view/RUT9xx_Firmware_via_The_Bootloader_Menu RUT9xx Firmware via The Bootloader Menu]
**[[RUT9xx Bootloader Upgrade]]
**[https://wiki.teltonika-networks.com/view/RUTXxx_Firmware_via_The_Bootloader_Menu RUTXxx Firmware via The Bootloader Menu]
**[[RUT9xx Firmware via The Bootloader Menu]]


==External links==
==External links==


*https://winscp.net/eng/download.php - WinSCP download
*https://winscp.net/eng/download.php - WinSCP download
[[Category:System upgrades]]

Latest revision as of 10:18, 1 August 2024

Main Page > General Information > Configuration Examples > System upgrades > Firmware upgrade via command line

Introduction

This article describes the process of updating an RUTxxx router's firmware via command line. It applies to all RUTXxx, RUT2xx, RUT9xx devices, like:RUT200, RUT241, RUT901, RUT951 and RUTX11 routers.

Upgrading the router's firmware via command line can be beneficial when:

  • Updating from versions older than RUT2XX_R_00.00.348 or RUT9XX_R_00.04.75 to newer versions in order to keep settings
  • You've lost access to the router via HTTP or HTTPS
  • Upgrading firmware remotely

Prerequisites

  • You will need access to the router via some form of command line. Access to command line interfaces (CLIs) supported by RUTxxx routers are described in this article:

Uploading the firmware file to the router

Before you can initiate the upgrade, you must first upload the firmware file into the router's RAM memory, because the flash memory is too small to store it. Files uploaded to the /tmp/ directory are stored in the RAM memory, so that's where you'll need to upload the file. There are three ways to accomplish this:

  1. Via the router's WebUI
    If you have access to the router's WebUI, simply login, navigate to System → Firmware, select "Upgrade from file" and click the "Upgrade" button. This will upload the firmware file to the /tmp/ directory and change its name to firmware.img.
  2. Using WinSCP (Windows)
    If you are using a Windows computer, you can use WinSCP to upload files to the router. Download WinSCP from here, launch it, select SCP as the File protocol and login to the router (the login process is basically the same as when using PuTTY). Then locate the tmp directory and drag the firmware file inside it (just like you copy/move any other file using Windows).
  3. Using scp (Linux)
    Use the scp command to copy the firmware file via SSH. Open up a Terminal in the directory where the file is located (right-click any blank space in the directory and select "Open in Terminal"). Then enter the following command:
    scp RUTX_R_00.07.08_WEBUI.bin [email protected]:/tmp/
    

    Where:

    • RUTX_R_00.07.08_WEBUI.bin is the firmware file's name. Replace it with your firmware's name.
    • 192.168.1.1 is the router's IP address. Replace with your own router's IP.
    • /tmp/ is the directory where the file will be copied to.
  4. Using wget on CLI
    Use the wget command to download the firmware file directly into the tmp directory of your router with the CLI. Open RMS and login to the CLI interface, or open an SSH session to get access to your router's CLI. And enter the following commands, in this case, we are using RUTX11 device:
    cd /tmp/
    wget -c https://firmware.teltonika-networks.com/7.8/RUTX/RUTX_R_00.07.08_WEBUI.bin
    sysupgrade RUTX_R_00.07.08_WEBUI.bin
    

    Where:

NOTE: files are removed from the /tmp/ directory after a reboot. If you rebooted the router, you'll need to upload the firmware file again.

Upgrading the firmware

To upgrade the firmware, login to the router and execute the following command:

sysupgrade /tmp/RUTX_R_00.07.08_WEBUI.bin
  • sysupgrade is the command used to upgrade the router's firmware.
  • RUTX_R_00.07.08_WEBUI.bin is the firmware file's name. Replace the firmware file's name that you are using. If you uploaded the firmware via WebUI, the name will automatically be changed to firmware.img regardless of what firmware version you use.

See also

External links