How to Install Sierra firmware within OpenWRT CLI?


#1

I understand typically the firmware upgrades are done via having the module attached to a windows PC using a USB mini-pcie adapter, and sierra drivers are installed and then the firmware is flashed to the module via a simple executable install.

Are there procedures to do something similar while the module is installed in an openwrt router…so without having to take out the module and use a usb-minipcie adapter?


#2

You can update via Linux, but may need to compile SW software, and then install into OpenWRT. There is also firmware update functionality (specifically for MC74XX I believe) built into QMI on Linux (dl can probably speak to the minimum kernel version required). But this then assumes you are using QMI and not MBIM on OpenWRT.

Also, depending on your device, there may be size issues as the firmware packages are quite large (relative to a router’s memory).

To quote SW: "For Linux use the Binaries download packages. This is a zip file containing a CWE and NVU files that should be used in conjunction with the ‘Firmware_Download’ application (or equivalent API’s in an application) contained in the Linux SDK SampleApps "


#3

Much appreciated for the reply.


#4

The updater in libqmi does not really depend on a specific kernel version, and it supports older modems as well (both MC73xx and MC77xx). It supports both QMI and MBIM mode, using the QMI-in-MBIM service.

Aleksander provides OpenWrt packages for libqmi and libmbim, as well as ModemManager:
bitbucket.org/aleksander0m/modemmanager-openwrt

I don’t know the exact hardware requirements, but as you said: You’ll probably need a some free flash and RAM to use it.

And the usual disclaimer: This is community software provided on a best effort basis. If you want official SWI support for your embedded platform, then you should use the GobiSerial and GobiNet drivers along with the SWI QMI SDK. It includes firmware update tools and should run just fine on many OpenWrt platforms.


#5

And a real example upgrading a EM7455 running in MBIM mode (with QMI over MBIM) in an OpenWRT based system:

# qmicli -d /dev/cdc-wdm0 -p --dms-set-firmware-preference="02.24.03.00,002.023_000,ATT"
# qmicli -d /dev/cdc-wdm0 -p --dms-set-operating-mode=offline
# qmicli -d /dev/cdc-wdm0 -p --dms-set-operating-mode=reset
    (wait for single ttyUSB0 to appear)
# qmi-firmware-update -t /dev/ttyUSB0 --update-qdl \
    /tmp/firmware-EM7455/SWI9X30C_02.24.03.00.cwe \
    /tmp/firmware-EM7455/SWI9X30C_02.24.03.00_ATT_002.023_000.nvu
  downloading cwe image: SWI9X30C_02.24.03.00.cwe (64.4 MB)...
  finalizing download... (may take more than one minute, be patient)
  successfully downloaded in 73.46s (877.1 kB/s)
  downloading cwe image: SWI9X30C_02.24.03.00_ATT_002.023_000.nvu (11.1 kB)...
  finalizing download... (may take more than one minute, be patient)
  successfully downloaded in 0.06s (200.2 kB/s)
  rebooting in normal mode...
  firmware update operation finished successfully

# qmicli -d /dev/cdc-wdm0 -p --dms-swi-get-current-firmware
[/dev/cdc-wdm0] Successfully retrieved current firmware:
  Model: EM7455
  Boot version: SWI9X30C_02.24.03.00
  AMSS version: SWI9X30C_02.24.03.00
  SKU ID: 1102527
  Package ID: unknown
  Carrier ID: 4
  Config version: 002.023_000

#6

Alexsander…I don’t see these options on x86_64 on debian strech. I have libqmi-utils 1.16.2-1.

dms-set-firmware-preference
qmi-firmware-update

EDIT: Nevermind, I am getting 1.18 from testing repo (buster).


#7

I am getting this error:

qmi-firmware-update -t /dev/ttyUSB0 --update-qdl /tmp/SWI9X30C_02.24.05.06_Generic_002.026_000_1/SWI9X30C_02.24.05.06.cwe /tmp/SWI9X30C_02.24.05.06_Generic_002.026_000_1/SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu 

error: error creating device: unexpected response received in dload sdp: 0x70

UPDATE: Nevermind, ran the steps a few times and the modem was at the right “window” to accept the update command:

Package from here: https://source.sierrawireless.com/resources/airprime/minicard/74xx/fw/swi9x30c_02,-d-,24,-d-,05,-d-,06_generic_002,-d-,026_000

qmicli -d /dev/cdc-wdm0 -p --dms-set-firmware-preference="02.24.05.06,002.026_000,GENERIC"
qmicli -d /dev/cdc-wdm0 -p  --dms-set-operating-mode=offline
qmicli -d /dev/cdc-wdm0 -p  --dms-set-operating-mode=reset

qmi-firmware-update -t /dev/ttyUSB0 --update-qdl /tmp/SWI9X30C_02.24.05.06_Generic_002.026_000_1/SWI9X30C_02.24.05.06.cwe /tmp/SWI9X30C_02.24.05.06_Generic_002.026_000_1/SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu 
downloading cwe image: SWI9X30C_02.24.05.06.cwe (64.4 MB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 73.73s (873.9 kB/s)
downloading cwe image: SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu (3.9 kB)...
finalizing download... (may take more than one minute, be patient)
successfully downloaded in 0.05s (74.1 kB/s)
rebooting in normal mode...
firmware update operation finished successfully


qmicli -d /dev/cdc-wdm0 -p --dms-swi-get-current-firmware
[/dev/cdc-wdm0] Successfully retrieved current firmware:
	Model: EM7455
	Boot version: SWI9X30C_02.24.05.06
	AMSS version: SWI9X30C_02.24.05.06
	SKU ID: 1102717
	Package ID: unknown
	Carrier ID: 1
	Config version: 002.026_000

at!image?
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID   BUILD_ID
FW   1    GOOD   1   0 0      ?_?         02.05.07.00_?
FW   2    GOOD   2   0 0      ?_?         02.08.02.00_?
FW   3    GOOD   3   0 0      ?_?         02.24.05.06_?
FW   4    EMPTY  0   0 0                  
Max FW images: 4
Active FW image is at slot 3

TYPE SLOT STATUS LRU FAILURES UNIQUE_ID   BUILD_ID
PRI  FF   GOOD   0   0 0      002.026_000 02.24.05.06_GENERIC
Max PRI images: 50

ati
Manufacturer: Sierra Wireless, Incorporated
Model: EM7455
Revision: SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09
MEID: XXXXXXXXXXX
IMEI: XXXXXXXXXXXXX
IMEI SV: 12
FSN: XXXXXXXXXXXX
+GCAP: +CGSM

Also, I did change the USBPID and PRIID using some info from here: https://forum.pfsense.org/index.php?topic=123828.0. Mine was a Lenovo branded card with USBPID 9079 and PRIID 9905228 which was for a “Lenovo-Tablet”.

AT!ENTERCND="A710"
AT!USBPID=9071,9070
AT!USBVID=1199
AT!PRIID="9904609","002.026","GENERIC"

at!priid?
PRI Part Number: 9904609
Revision: 002.026
Customer: GENERIC

Carrier PRI: 9999999_9904609_SWI9X30C_02.24.05.06_00_GENERIC_002.026_000

Thank you very much Alexsander. I beat myself up with the Firmware_Download program in Sample_Apps as per Sierra Wireless instructions but even though it said it was successful, the image never went to the modem (none of the slots show it) as slot 3 now shows it with you update program


#8

Hi,

I follow the same procedure as shown by the experts here, but after I finished the firmware upgrade, I could no longer access LTE or send qmicli command to MC7455.
Whenever I sent qmicli command to MC7455, I received this weild error: “couldn’t create client for the ‘dms’ service: CID allocation failed in the CTL client: Transaction timed out”.
Then I have to reload the firmware by windows exe method. And the module is back to normally working.
Only after I upgrade the firmware by qmi-firmware-update, the module stopped working.

Please anyone can give me a hint.
Thank you.
Tony.