How to: Update the Cellular firmware of the EG25 modem via CLI and Local firmware file

The  "modem firmware check" CLI command  is not implemented for the  EG25G modem, but a customer can manually specify the directory with the following CLI command:

"modem firmware update version /opt/EG25_G/Custom_Firmware"

User need to create a folder on the Digi router:

/opt/EG25_G/Custom_Firmware

Please be sure the rights of this folder look like in the output below:

# ls -la /opt/EG25_G/Custom_Firmware/

drwxr-x---    3 root     root           504 Mar 25 12:52 .

drwxr-x---    3 root     root           232 Mar 25 12:48 ..

 

After downloading a modem firmware from the Digi website, use tar or a similar unzipping tool to extract the firmware and upload it via sftp or scp protocol to the created folder.

Then run the command and wait for the end of the update process:

IX20W> modem firmware update version /opt/EG25_G/Custom_Firmware

Updating modem firmware ...

Not found

Validate modem firmware ...

Updating please wait...

-----------------------------

Successfully updated firmware

Modem firmware update complete

 

Wait until the modem reboots and check the status with the command:

IX20W> modem firmware ota check

Checking for latest  firmware ...

Retrieving modem firmware list ...

Newest firmware version available to download is 'EG25GGBR07A08M2G_30.201.30.201'

Modem firmware up to date

EG25GGBR07A08M2G_30.201.30.201

 

The other option is using a custom script that download a firmware to the appropriate directory so a user can manually update the modem firmware later.

The customer just needs to adjust the link to the latest firmware for the modem that he is using in the third line of the script.

https://hub.digi.com/dp/path=/support/asset-directory/eg25-g-1002-cmg4/EG25GGBR07A08M2G_30.201.30.201.tar.gz

The customer should place the (modified) script in System -> Scheduled tasks -> Custom scripts, specifically in the Commands field.

 

The script is designed such that it only downloads the firmware one time (so it's not chewing up data by re-downloading it).

Setting it to run once an hour is probably a good starting point (Run mode = Interval, Inverval = 1h).

'Sandbox' should be disabled, 'Run single' should be enabled, and the 'Once' setting just below should be disabled.

Related documentation:

 

https://www.digi.com/resources/documentation/digidocs/90002381/os/applications-run-automatically-t.htm

 

Once the script runs, you could setup an Automation in Digi RM to actually kick off the modem firmware update by simply running the 'modem firmware update' Admin CLI command.

 

Script body:

 

# download a firmware file to the appropriate /opt/ directory so a user can manually update modem firmware later

# replace the following with the appropriate firmware link

firmware_link='https://hub.digi.com/dp/path=/support/asset-directory/eg25-g-1002-cmg4/EG25GGBR07A08M2G_30.201.30.201.tar.gz'

firmware_basedir="$(modem firmware_base_path)"

# if there's already contents inside the modem Custom_Firmware directory, do nothing

[ -d "$firmware_basedir/Custom_Firmware" ] && [ -z "$(ls -A $firmware_basedir/Custom_Firmware/)" ] && exit

# remove old modem firmware files to ensure there's enough space in /opt/

rm -rf /opt/sierra-wireless*

rm -rf /opt/telit*

rm -rf /opt/EG25*

rm -rf /opt/EC25*

rm -rf /opt/LM*

# setup the Custom_Folder directory just in case it's missing

mkdir -p $firmware_basedir/Custom_Firmware/

cd $firmware_basedir/Custom_Firmware/

# Download the firmware

curl -sfkL "$firmware_link" | tar zx

if [ "$?" -eq 0 ]; then

  echo "Successfully downloaded modem firmware from into $firmware_basedir/Custom_Firmware/"

else

  echo "Error downloading modem firmware from into $firmware_basedir/Custom_Firmware/"

fi

Last updated: May 12, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?