EM9191 disabled after firmware download attempt

After an update attempt, my EM9191 seems to stuck in an inconsistent firmware state with parts of old and parts of new firmware. The modem remains disabled. It also denies further download attempts. What can I do?

The log of the latest attempt is attached. The previous attempts I did not log and it showed some similar but different error.

$ sudo ./download -f fw -n SWIX55C_02.08.01.00_GENERIC_020.007_001.nvu -w SWIX55C_02.08.01.00_002.cwe -d /dev/ttyUSB0                                                                                            
Application version: 1.0.2109.0
INFO: QDL Port  :  /dev/ttyUSB0
INFO: Device Path: 
INFO: FW  Path  :  fw
Target image Info:
Carrier    :GENERIC
FW Version :02.08.01.00
Model ID   :SWIX55C
Package ID :001
PRI Version:020.007
SKU        :9999999
Modem is in QDL mode. Continuing FW download
Waiting for modem to come up in BOOT and HOLD mode ...
BOOT and HOLD Mode. Downloading firmware ...
FW download failed: eSDP_FWDWL_ERR_OUT_OF_SYNC(117)
Device not responsive in download mode.  Please power cycle device.
Exiting Application!!!

The fwdl.log:

[217][1]System date/time: 26/10/2021 16:20:48
[217][1]1.0.2109.0
[217][1]Kernel: Linux rme-appPC6 5.4.0-89-generic #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

[217][1]qcserial version:        1.9.2108.3

[217][1]usb_wwan version:        1.0.2101.1

[217][1]cdc_mbim srcversion:     E78127BCABE41799AC5303D

[217][1]qmi_wwan version:        1.3.2108.2

[217][1]Unable to log mhictrl version info. Drivers from MBPL R17 or newer are required.
[217][1]Unable to log mhinet version info. Drivers from MBPL R17 or newer are required.
[217][1]Unable to log mhitty version info. Drivers from MBPL R17 or newer are required.
[217][1]./download
[217][1]-f
[217][1]fw
[217][1]-n
[217][1]SWIX55C_02.08.01.00_GENERIC_020.007_001.nvu
[217][1]-w
[217][1]SWIX55C_02.08.01.00_002.cwe
[217][1]-d
[217][1]/dev/ttyUSB1
[217][1]-m
[217][1]4
[217][7]User specified read block size: 0 bytes
[217][7]**************************************************
[217][7]Copyright: © 2015-2017 Sierra Wireless, Inc. all rights reserved
[217][7]lite-fw is only permitted to be used with Sierra Wireless Modems
[217][7]lite-fw version lite-fwMBPL_SDK_R23_ENG4
[217][7]**************************************************
[217][6]Images list:
[217][6]Image[0]: fw/SWIX55C_02.08.01.00_GENERIC_020.007_001.nvu
[217][6]Image[1]: fw/SWIX55C_02.08.01.00_002.cwe
[217][6]Device is in BOOT&HOLD mode.
[217][7]Waiting for modem to come up in B&H mode ...
[218][7]Modem is in B&H mode. Downloading firmware ...
[218][7]find_dev_ss_loc: Found device SS path '/sys/bus/usb/devices/1-8.2/power/control'
[218][7]disable_ss: SS is not enabled, no need to disable SS.
[218][7]QDL Port :/dev/ttyUSB1
[223][7]read timeout
[223][7]Read payload [0]
[223][7]Read 0 bytes
[223][7]
[223][7]Sahara HELLO message might be missed. Resending Sahara HELLO response.
[223][7]Current mode: 0, previous max_reads_allowed: 29
[223][7]Send 48 bytes
[223][7]02 00 00 00 30 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 03 00 00 00 01 00 00 00 02 00 00 00 
[223][7]03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00 
[223][7]Sahara Hello Rsp sent successfully, max_reads_allowed reset to 30
[224][7]read timeout
[224][7]Read payload [0]
[224][7]Read 0 bytes
[224][7]
[224][3]Device not responsive to SAHARA HELLO RESPONSE, need a power cycle.

Power cycling did not help. The AT port still works though:

at!gstatus?
!GSTATUS: 
Current Time:  436              Temperature: 38
Modem Mitigate Level: 0         ModemProc Mitigate Level: 0
Reset Counter: 1                Mode:        LOW POWER MODE 


OK
ati
Manufacturer: Sierra Wireless, Incorporated
Model: EM9191
Revision: SWIX55C_01.07.08.00 000000 jenkins 2020/11/16 10:11:33
IMEI: 355890340153001
IMEI SV:  4
FSN: 8W1042009502A1
+GCAP: +CGSM


OK
at!priid?
PRI Part Number: 9909738
Revision: 001.007
Customer: Generic

Carrier PRI: None

OK
at+cgmr
SWIX55C_01.07.08.00 000000 jenkins 2020/11/16 10:11:33

OK
At!impref?
!IMPREF: 
 preferred fw version:    02.08.01.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_020.007_001
 preferred subpri index:  000
 current fw version:      01.07.08.00
 current carrier name:    GENERIC
 current config name:     GENERIC_016.003_000
 current subpri index:    000

 fw version mismatch
 config name mismatch

OK
AT!PCINFO?
State: Low Power Mode
LPM voters - Temp:0, Volt:0, User:0, W_DISABLE:0, IMSWITCH:1, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, RFCAL:0
LPM persistence - None

OK

Hi ginzler,

You put 2 files SWIX55C_02.08.01.00_GENERIC_020.007_001.nvu and SWIX55C_02.08.01.00_002.cwe into the folder SWIX55C_02.08.01.00. Restart the module (AT!RESET).

App lite-fw-download usage:
<appName> -f <FW path> -c <QMI/MBIM mode> -d <QDL Port> -p <QMI/MBIM device path> -P <USB device location path> -t <Download type> -w <FW image preference> -n <PRI image preference> -m <device family> -l <Log file path> -b <block size> -h -F -i -a

Here is example command to update module firmware:
sudo ./fwdwl-litehostx86_64 -m 4 -t 1 -d /dev/ttyUSB0 -c QMI -f /home/user/Documents/FW/SWIX55C_02.08.01.00/ -p /dev/cdc-wdm0 -l fwdwl.txt

You can try it.

Then please provide the output of some commands as below, the output of the command “dmesg” and the file fwdwl.txt.

ATI3
AT!ENTERCND="A710"
AT!IMPREF?
AT!IMAGE?
AT!USBCOMP?
AT!USBPID?

Thank you Donald for your response. I issued

sudo ./fwdwl-litehostx86_64 -m 4 -t 1 -d /dev/ttyUSB0 -c QMI -f fw -p /dev/cdc-wdm0 -l fwdwl.log

[...]
Failed to connect to device. Please ensure QMI device path is correct and device is functional.
SendImagePreferenceToModem failed: 112
Exiting Application!!!

The log is attached: Processing: fwdwl.log…
fwdwl.log.txt (33.6 KB)

ATI3
Manufacturer: Sierra Wireless, Incorporated
Model: EM9191
Revision: SWIX55C_01.07.08.00 000000 jenkins 2020/11/16 10:11:33
IMEI: 355890340153001
IMEI SV:  4
FSN: 8W1042009502A1                                                                                      
+GCAP: +CGSM                                                                                             
                                                                                                         
                                                                                                         
OK    
AT!IMAGE?                                                                                                
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID   BUILD_ID                                                       
FW   1    EMPTY  0   0 0                                                                                 
Max FW images: 1                                                                                         
Active FW image is at slot 1                                                                             
                                                                                                         
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID   BUILD_ID                                                       
Max PRI images: 50                                                                                       
                                                                                                         
                                                                                                         
OK                                                                                                       
AT!USBCOMP?                                                                                              
Config Index: 1                                                                                          
Config Type:  4 (USBIF-MBIM-V2)                                                                          
Interface bitmask: 00001009 (diag,modem,mbim)                                                            
                                                                                                         
OK                                                                                                       
AT!USBPID?                                                                                               
!USBPID:                                                                                                 
APP : 90D3                                                                                               
BOOT: 90D2                                                                                               
                                                                                                         
OK

I supplied all the requested information. What can I do now?

Hi ginzler,

From your log file, your module is in MBIM mode. Please try to use MBIM mode (-c MBIM) and absolute firmware path.

Example:
sudo ./fwdwl-litehostx86_64 -c MBIM -d /dev/ttyUSB0 -p /dev/cdc-wdm0 -m 4 -l usbmbim.log -f /home/user/Documents/FW/FW.02.08.01/

Awesome, with these parameters it downloaded the new firmware and came online again. Thank you.