EM7565 stuck at downloading cwe when trying to upgrade FW

I want to upgrade the firmware of my EM7565 to 01.14.02.00. However, when trying to update, the process keeps getting stuck at
I have referred to this article but still can’t solve it.
https://forum.sierrawireless.com/t/em7565-stuck-at-downloading-nvu-when-trying-to-upgrade-firmware/23268

jerry@jerry-virtual-machine:~/Desktop/SampleApps/lite-fw-download/bin$ sudo ./fwdwl-litehostx86_64 -f /home/jerry/Desktop/SampleApps/lite-fw-download/bin -c MBIM -d /dev/ttyUSB0 -p /dev/cdc-wdm0 -t 2 -w SWI9X50C_01.14.02.00.cwe -n SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu -m 4 -l ./log_test.log -F -R 20
[sudo] password for jerry:
Application version: 1.0.2111.0
INFO: QDL Port : /dev/ttyUSB0
INFO: Device Path: /dev/cdc-wdm0
INFO: FW Path : /home/jerry/Desktop/SampleApps/lite-fw-download/bin
Target image Info:
Carrier :GENERIC
FW Version :01.14.02.00
Model ID :SWI9X50C
Package ID :003
PRI Version:002.035
SKU :9999999
Switching device into download mode …
Modem Needs FW
Modem Needs PRI
Waiting for modem to disconnect from the host …
Modem disconnected from host.
Waiting for modem to come up in BOOT and HOLD mode …
BOOT and HOLD Mode. Downloading firmware …
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686

I tried Windows upgrade FW with no problem. May I ask why the linux firmware application might get stuck in the download process?
MBPL is the latest version of R25 on Sierra source

You can see here for upgrade of EM7411:

@jyijyi

The EM7565 has been specified with tty and cdc devices (-d and -p flags) and download mode set to 1 (-t 1 flags). But still stuck there

jerry@jerry-virtual-machine:~/Desktop/src/USB$ ls /dev
agpgart loop13 random tty26 tty59 ttyS4
autofs loop14 rfkill tty27 tty6 ttyS5
block loop15 rtc tty28 tty60 ttyS6
bsg loop16 rtc0 tty29 tty61 ttyS7
btrfs-control loop17 sda tty3 tty62 ttyS8
bus loop18 sda1 tty30 tty63 ttyS9
cdrom loop19 serial tty31 tty7 ttyUSB0
cdrw loop2 sg0 tty32 tty8 uhid
char loop20 sg1 tty33 tty9 uinput
console loop21 shm tty34 ttyprintk urandom
core loop22 snapshot tty35 ttyS0 userio
cpu_dma_latency loop23 snd tty36 ttyS1 vcs
cuse loop24 sr0 tty37 ttyS10 vcs1
disk loop3 stderr tty38 ttyS11 vcs2
dmmidi loop4 stdin tty39 ttyS12 vcs3
dri loop5 stdout tty4 ttyS13 vcs4
dvd loop6 tty tty40 ttyS14 vcs5
ecryptfs loop7 tty0 tty41 ttyS15 vcs6
fb0 loop8 tty1 tty42 ttyS16 vcsa
fd loop9 tty10 tty43 ttyS17 vcsa1
full loop-control tty11 tty44 ttyS18 vcsa2
fuse mapper tty12 tty45 ttyS19 vcsa3
hidraw0 mcelog tty13 tty46 ttyS2 vcsa4
hpet mem tty14 tty47 ttyS20 vcsa5
hugepages memory_bandwidth tty15 tty48 ttyS21 vcsa6
hwrng midi tty16 tty49 ttyS22 vfio
initctl mqueue tty17 tty5 ttyS23 vga_arbiter
input net tty18 tty50 ttyS24 vhci
kmsg network_latency tty19 tty51 ttyS25 vhost-net
lightnvm network_throughput tty2 tty52 ttyS26 vhost-vsock
log null tty20 tty53 ttyS27 vmci
loop0 port tty21 tty54 ttyS28 vsock
loop1 ppp tty22 tty55 ttyS29 zero
loop10 psaux tty23 tty56 ttyS3
loop11 ptmx tty24 tty57 ttyS30
loop12 pts tty25 tty58 ttyS31

sudo ./fwdwl-litehostx86_64 -f /home/jerry/Desktop/SampleApps/lite-fw-download/bin -c MBIM -d /dev/ttyUSB0 -p /dev/cdc-wdm0 -t 1 -w SWI9X50C_01.14.02.00.cwe -n SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu -m 4 -l ./log_test.log -F -R 20
[sudo] password for jerry:
Application version: 1.0.2111.0
INFO: QDL Port : /dev/ttyUSB0
INFO: Device Path: /dev/cdc-wdm0
INFO: FW Path : /home/jerry/Desktop/SampleApps/lite-fw-download/bin
Target image Info:
Carrier :GENERIC
FW Version :01.14.02.00
Model ID :SWI9X50C
Package ID :003
PRI Version:002.035
SKU :9999999
Switching device into download mode …
Modem Needs FW
Modem Needs PRI
Waiting for modem to disconnect from the host …
Modem disconnected from host.
Waiting for modem to come up in BOOT and HOLD mode …
BOOT and HOLD Mode. Downloading firmware …
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686
/

how about using the same command as this one?

@jyijyi

Still stuck.

jerry@jerry-virtual-machine:~/Desktop/SampleApps/lite-fw-download/bin$ sudo ./fwdwl-litehostx86_64 -f /home/jerry/Desktop/SampleApps/lite-fw-download/bin -d /dev/ttyUSB0 -p /dev/cdc-wdm0 -t 1 -w SWI9X50C_01.14.02.00.cwe -n SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu -m 4
Application version: 1.0.2111.0
INFO: QDL Port : /dev/ttyUSB0
INFO: Device Path: /dev/cdc-wdm0
INFO: FW Path : /home/jerry/Desktop/SampleApps/lite-fw-download/bin
Target image Info:
Carrier :GENERIC
FW Version :01.14.02.00
Model ID :SWI9X50C
Package ID :003
PRI Version:002.035
SKU :9999999
Switching device into download mode …
Modem Needs FW
Waiting for modem to disconnect from the host …
Modem disconnected from host.
Waiting for modem to come up in BOOT and HOLD mode …
BOOT and HOLD Mode. Downloading firmware …
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/SWI9X50C_01.14.02.00_GENERIC_002.035_003.nvu
Downloading: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686

I saw in the readme file of USB driver:

Enable zero length packet in usb_wwan
=====================================
To support FW download on 9x50 based products, driver must support USB
zero length packets (ZLP). This feature is not enabled in the open source usb_wwan driver
(for some kernel version). 
The attached usb_wwan.c shows how to enable ZLP.

In usb_wwan_setup_urb function, the following two lines of code:

	if (intfdata->use_zlp && dir == USB_DIR_OUT)
		urb->transfer_flags |= URB_ZERO_PACKET;

This indicates the ZLP feature is enabled.

You can double check your USB driver.

Confirm that in the usb_wwan_setup_urb function, the following two lines of code:

if (intfdata->use_zlp && dir == USB_DIR_OUT)
urb->transfer_flags |= URB_ZERO_PACKET;

how about using real Linux PC?
In the past, sometimes I saw problem in virtual machine.

@jyijyi
I tried it and the result is the same as on the virtual machine.
Can’t find where is the problem.

how about shutting down MBIM mode in AT!USBCOMP?
Just leave the RMNET mode there and retry.

@jyijyi

Tried just leaving the RMNET mode there, same result.
I have also tried using GobiNet and it is stuck there.

how many modules have you tested?

@jyijyi

I have tried two EM7565 modules, the SKU number is 1104276.
The log content is as follows.

[76258][1]System date/time: 23/02/2022 15:06:48
[76258][1]1.0.2105.0
[76258][1]Kernel: Linux jerry-virtual-machine 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

[76258][1]qcserial version: 1.9.2108.3

[76258][1]usb_wwan version: 1.0.2101.1

[76258][1]cdc_mbim srcversion: 38E9FABC0B5F38EBB589D7C

[76258][1]qmi_wwan srcversion: DCA573B7EB0B9A4EC41736A

[76258][1]./fwdwl-litehostx86_64
[76258][1]-f
[76258][1]/home/jerry/Desktop/SampleApps/lite-fw-download/bin
[76258][1]-d
[76258][1]/dev/ttyUSB0
[76258][1]-p
[76258][1]/dev/cdc-wdm0
[76258][1]-t
[76258][1]1
[76258][1]-w
[76258][1]SWI9X50C_01.14.02.00.cwe
[76258][1]-n
[76258][1]SWI9X50C_01.14.02.00_GENERIC_002.035_000.nvu
[76258][1]-m
[76258][1]4
[76258][1]-l
[76258][1]log.txt
[76258][1]Found SWI USB device 1199:9091 at bus 1
[76258][1]Found SWI USB device at location 1-1
[76258][1]Found adapter at Bus:1, Port:1, Dev:1, If:12
[76258][1]Found specified adapter device.
[76258][6]locate_adapter_path: Found adapter: /dev/cdc-wdm0
[76258][1]Found matching USB device as user specified
[76258][7]User specified read block size: 0 bytes
[76258][6]Images list:
[76258][6]Image[0]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686
[76258][6]Image[1]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litemipseb
[76258][6]Image[2]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehostx86_64
[76258][6]Image[3]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-literpi
[76258][6]Image[4]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litearm64
[76258][6]Image[5]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/SWI9X50C_01.14.02.00.cwe
[76258][6]Image[6]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litearm
[76258][6]Image[7]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litearm64linaro
[76258][6]Image[8]: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/SWI9X50C_01.14.02.00_GENERIC_002.035_000.nvu
[76258][6]Device is in online mode.
[76258][7]Image switching scenario
[76258][1]-> MBIM MessageType=MBIM_OPEN MessageLength=16 TransactionId=1 MaxControlTransfer=4096
[76259][1]<- MBIM MessageType=MBIM_OPEN_DONE MessageLength=16 TransactionId=1 Status=0
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=84 TransactionId=2
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=a289cc33bcbb8b4fb6b0133ec2aae6df CID=19 CommandType=set InformationBufferLength=36
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=84 TransactionId=2
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=a289cc33bcbb8b4fb6b0133ec2aae6df CID=19 Status=0 InformationBufferLength=36
[76259][1]MBIM transport error callback is enabled
[76259][1]CtlService_Sync

[76259][1]-> QMUX Length=11 QMIType=0 ClientId=0 Payload:
[76259][7]**************************************************
[76259][7]Copyright: © 2015-2021 Sierra Wireless, Inc. all rights reserved
[76259][7]lite-SLQS/liteqmi is only permitted to be use with Sierra Wireless Modems
[76259][7]liteqmi version
[76259][7]SLQSLITEMBPL_SDK_R19_ENG5
[76259][7]**************************************************
[76259][1]Send 6 bytes
[76259][1]00 01 27 00 00 00
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=60 TransactionId=3
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=12
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=67 TransactionId=3
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=19
[76259][1]<- QMUX Length=18 QMIType=0 ClientId=0 Payload:
[76259][1]Read 13 bytes
[76259][1]01 01 27 00 07 00 02 04 00 00 00 00 00
[76259][1]CtlService_Sync: succeeded

[76259][1]CtlService_GetClientId: serviceType=2

[76259][1]-> QMUX Length=15 QMIType=0 ClientId=0 Payload:
[76259][1]Send 10 bytes
[76259][1]00 02 22 00 04 00 01 01 00 02
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=64 TransactionId=4
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=16
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=72 TransactionId=4
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=24
[76259][1]<- QMUX Length=23 QMIType=0 ClientId=0 Payload:
[76259][1]Read 18 bytes
[76259][1]01 02 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 01
[76259][1]CtlService_GetClientId: succeeded, serviceType=2, clientId=1

[76259][1][ pack] FMS_SET_IMAGE_PREF index:0, Image Type: 0

[76259][1][ pack] FMS_SET_IMAGE_PREF index:0, Image Id:0x3f5f3f00000000000000000000000000
[76259][1][ pack] FMS_SET_IMAGE_PREF index:0, Build Id Length:13

[76259][1][ pack] FMS_SET_IMAGE_PREF index:0, Build Id :01.14.02.00_?
[76259][1]

[76259][1][ pack] FMS_SET_IMAGE_PREF index:1, Image Type: 1

[76259][1][ pack] FMS_SET_IMAGE_PREF index:1, Image Id:0x3030322e3033355f3030300000000000
[76259][1][ pack] FMS_SET_IMAGE_PREF index:1, Build Id Length:19

[76259][1][ pack] FMS_SET_IMAGE_PREF index:1, Build Id :01.14.02.00_GENERIC
[76259][1]

[76259][1][ pack] FMS_SET_IMAGE_PREF xid 0x0001 returned 0x0

[76259][1]-> QMUX Length=88 QMIType=2 ClientId=1 Payload:
[76259][1]Send 83 bytes
[76259][1]00 01 00 48 00 4c 00 01 45 00 02 00 3f 5f 3f 00 00 00 00 00 00 00 00 00 00 00 00 00 0d 30 31 2e
[76259][1]31 34 2e 30 32 2e 30 30 5f 3f 01 30 30 32 2e 30 33 35 5f 30 30 30 00 00 00 00 00 13 30 31 2e 31
[76259][1]34 2e 30 32 2e 30 30 5f 47 45 4e 45 52 49 43 10 01 00 00
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=137 TransactionId=5
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=89
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=74 TransactionId=5
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=26
[76259][1]<- QMUX Length=25 QMIType=2 ClientId=1 Payload:
[76259][1]Read 20 bytes
[76259][1]02 01 00 48 00 0d 00 02 04 00 00 00 00 00 01 03 00 02 00 01
[76259][1][unpack] FMS_SET_IMAGE_PREF xid 0x0001 returned 0x0

[76259][1]CtlService_ReleaseClientId: serviceType=2 clientId=1

[76259][1]-> QMUX Length=16 QMIType=0 ClientId=0 Payload:
[76259][1]Send 11 bytes
[76259][1]00 03 23 00 05 00 01 02 00 02 01
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=65 TransactionId=6
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=17
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=72 TransactionId=6
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=24
[76259][1]<- QMUX Length=23 QMIType=0 ClientId=0 Payload:
[76259][1]Read 18 bytes
[76259][1]01 03 23 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 01
[76259][1]CtlService_ReleaseClientId: succeeded, serviceType=2

[76259][1]-> MBIM MessageType=MBIM_CLOSE MessageLength=12 TransactionId=7
[76259][1]<- MBIM MessageType=MBIM_CLOSE_DONE MessageLength=16 TransactionId=7 Status=0
[76259][7]Modem Needs FW

[76259][7]Modem Needs PRI

[76259][7]litefw_CalculateImageMask: imgMask :3
[76259][1]-> MBIM MessageType=MBIM_OPEN MessageLength=16 TransactionId=1 MaxControlTransfer=4096
[76259][1]<- MBIM MessageType=MBIM_OPEN_DONE MessageLength=16 TransactionId=1 Status=0
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=84 TransactionId=2
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=a289cc33bcbb8b4fb6b0133ec2aae6df CID=19 CommandType=set InformationBufferLength=36
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=84 TransactionId=2
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=a289cc33bcbb8b4fb6b0133ec2aae6df CID=19 Status=0 InformationBufferLength=36
[76259][1]MBIM transport error callback is enabled
[76259][1]CtlService_Sync

[76259][1]-> QMUX Length=11 QMIType=0 ClientId=0 Payload:
[76259][1]Send 6 bytes
[76259][1]00 01 27 00 00 00
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=60 TransactionId=3
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=12
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=67 TransactionId=3
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=19
[76259][1]<- QMUX Length=18 QMIType=0 ClientId=0 Payload:
[76259][1]Read 13 bytes
[76259][1]01 01 27 00 07 00 02 04 00 00 00 00 00
[76259][1]CtlService_Sync: succeeded

[76259][1]CtlService_GetClientId: serviceType=2

[76259][1]-> QMUX Length=15 QMIType=0 ClientId=0 Payload:
[76259][1]Send 10 bytes
[76259][1]00 02 22 00 04 00 01 01 00 02
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=64 TransactionId=4
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=16
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=72 TransactionId=4
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=24
[76259][1]<- QMUX Length=23 QMIType=0 ClientId=0 Payload:
[76259][1]Read 18 bytes
[76259][1]01 02 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 01
[76259][1]CtlService_GetClientId: succeeded, serviceType=2, clientId=1

[76259][1][ pack] DMS_SET_OPERATING_MODE xid 0x0001 returned 0x0

[76259][1]-> QMUX Length=16 QMIType=2 ClientId=1 Payload:
[76259][1]Send 11 bytes
[76259][1]00 01 00 2e 00 04 00 01 01 00 03
[76259][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=65 TransactionId=5
[76259][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76259][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=17
[76259][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=68 TransactionId=5
[76259][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76259][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=20
[76259][1]<- QMUX Length=19 QMIType=2 ClientId=1 Payload:
[76259][1]Read 14 bytes
[76259][1]02 01 00 2e 00 07 00 02 04 00 00 00 00 00
[76259][1][unpack] DMS_SET_OPERATING_MODE xid 0x0001 returned 0x0

[76260][1][ pack] QMI_DMS_GET_POWER_STATE xid 0x0002 returned 0x0

[76260][1]-> QMUX Length=12 QMIType=2 ClientId=1 Payload:
[76260][1]Send 7 bytes
[76260][1]00 02 00 2d 00 00 00
[76260][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=61 TransactionId=6
[76260][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76260][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=13
[76260][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=72 TransactionId=6
[76260][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76260][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=24
[76260][1]<- QMUX Length=23 QMIType=2 ClientId=1 Payload:
[76260][1]Read 18 bytes
[76260][1]02 02 00 2d 00 0b 00 02 04 00 00 00 00 00 01 01 00 03
[76260][1][unpack] QMI_DMS_GET_OPERATING_MODE xid 0x0002 returned 0x0

[76260][1][ pack] DMS_SET_OPERATING_MODE xid 0x0003 returned 0x0

[76260][1]-> QMUX Length=16 QMIType=2 ClientId=1 Payload:
[76260][1]Send 11 bytes
[76260][1]00 03 00 2e 00 04 00 01 01 00 04
[76260][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=65 TransactionId=7
[76260][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76260][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=17
[76260][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=68 TransactionId=7
[76260][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76260][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=20
[76260][1]<- QMUX Length=19 QMIType=2 ClientId=1 Payload:
[76260][1]Read 14 bytes
[76260][1]02 03 00 2e 00 07 00 02 04 00 00 00 00 00
[76260][1][unpack] DMS_SET_OPERATING_MODE xid 0x0003 returned 0x0

[76260][1]CtlService_ReleaseClientId: serviceType=2 clientId=1

[76260][1]-> QMUX Length=16 QMIType=0 ClientId=0 Payload:
[76260][1]Send 11 bytes
[76260][1]00 03 23 00 05 00 01 02 00 02 01
[76260][1]-> MBIM MessageType=MBIM_COMMAND MessageLength=65 TransactionId=8
[76260][1]-> MBIM TotalFragments=1 CurrentFragment=0
[76260][1]-> MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 CommandType=set InformationBufferLength=17
[76260][1]<- MBIM MessageType=MBIM_COMMAND_DONE MessageLength=72 TransactionId=8
[76260][1]<- MBIM TotalFragments=1 CurrentFragment=0
[76260][1]<- MBIM DeviceServiceId=d1a30bc2f97a6e43bf65c7e24fb0f0d3 CID=1 Status=0 InformationBufferLength=24
[76260][1]<- QMUX Length=23 QMIType=0 ClientId=0 Payload:
[76260][1]Read 18 bytes
[76260][1]01 03 23 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 01
[76260][1]CtlService_ReleaseClientId: succeeded, serviceType=2

[76260][1]-> MBIM MessageType=MBIM_CLOSE MessageLength=12 TransactionId=9
[76260][1]<- MBIM MessageType=MBIM_CLOSE_DONE MessageLength=16 TransactionId=9 Status=0
[76280][7]Modem disconnected from host
[76287][7]Modem is in B&H mode. Downloading firmware …
[76287][7]QDL Port :/dev/ttyUSB0
[76292][7]Read payload [48]
[76292][7]Read 48 bytes
[76292][7]01 00 00 00 30 00 00 00 02 00 00 00 01 00 00 00 00 04 00 00 02 00 00 00 00 00 00 00 00 00 00 00
[76292][7]00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[76292][7]Current mode: 0, previous max_reads_allowed: 9
[76292][7]Send 48 bytes
[76292][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
[76292][7]03 00 00 00 04 00 00 00 05 00 00 00 06 00 00 00
[76292][7]Sahara Hello Rsp sent successfully, max_reads_allowed reset to 10
[76292][7]Read payload [8]
[76292][7]Read 8 bytes
[76292][7]0b 00 00 00 08 00 00 00
[76292][7]Current mode: 1, previous max_reads_allowed: 9
[76292][7]Send 12 bytes
[76292][7]0d 00 00 00 0c 00 00 00 00 ff 00 00
[76292][7]Sahara Command Execute packet sent successfully, max_reads_allowed reset to 10
[76292][7]Read payload [16]
[76292][7]Read 16 bytes
[76292][7]0e 00 00 00 10 00 00 00 00 ff 00 00 09 00 00 00
[76292][7]Current mode: 2, previous max_reads_allowed: 9
[76292][7]Send 12 bytes
[76292][7]0f 00 00 00 0c 00 00 00 00 ff 00 00
[76292][7]Sahara Switch to Firehose command sent successfully, max_reads_allowed reset to 10
[76292][7]Read payload [9]
[76292][7]Read 9 bytes
[76292][7]63 6f 6e 66 69 72 6d 65 64
[76292][7]Current mode: 13, previous max_reads_allowed: 9
[76292][7]Leaving Sahara …
[76293][7]read timeout
[76293][7]Current mode: 13, previous max_reads_allowed: 29
[76293][7]read timeout
[76293][7]Current mode: 13, previous max_reads_allowed: 28
[76293][7]Read payload [111]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 27
[76293][7]Read payload [232]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: 3, previous max_reads_allowed: 26
[76293][7]Tx: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Firehose configure cmd sent, max_reads_allowed reset to 10
[76293][7]Read payload [237]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][1]MaxPayloadSizeToTargetInBytes: 8192
[76293][7]Current mode: 4, previous max_reads_allowed: 9
[76293][7]Tx: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Firehose getstorageinfo cmd sent, max_reads_allowed reset to 20
[76293][7]Read payload [185]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 19
[76293][7]Read payload [197]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][1]SECTOR_SIZE_IN_BYTES: 4096
[76293][7]Current mode: -1, previous max_reads_allowed: 18
[76293][7]Read payload [100]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 17
[76293][7]Read payload [97]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 16
[76293][7]Read payload [102]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 15
[76293][7]Read payload [89]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 14
[76293][7]Read payload [143]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 13
[76293][7]Read payload [71]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 12
[76293][7]Read payload [86]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 11
[76293][7]Read payload [107]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: -1, previous max_reads_allowed: 10
[76293][7]Read payload [448]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: 5, previous max_reads_allowed: 9
[76293][7]File: “/home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686”, size in bytes: 3260516, size in sectors: 797
[76293][7]Tx: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Firehose program cmd sent, max_reads_allowed reset to 10
[76293][7]Read payload [406]
[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Complete target 1: <?xml version="1.0" encoding="UTF-8" ?>


[76293][7]Current mode: 6, previous max_reads_allowed: 9
[76293][7]Write: /home/jerry/Desktop/SampleApps/lite-fw-download/bin/fwdwl-litehosti686

[76293][7]Actual read block size used: 0 bytes
[76293][7]Write Start

here is some working log for EM7565:
working.zip (14.0 KB)

@jyijyi

We tried using fwdwl tool without specifying .cwe and .nvu and it’s workable.
However, specifying .cwe and .nvu according to the commands in the readme for the fwdwl tool fails.