[Solved] EM7565 Firmware Update from 01.00.02.00 to 01.07.00.00


#1

Dear all,

I desperately try to update the firmware of an EM7565 module. The sdk’s firmware download tool reports the following output, when trying to upgrade the firmware to 01.07.00.00:

   [root@X250RF bin]# ./fwdldhostx86_64 -s ../../../build/bin/hostx86_64/slqssdk -d 9x50 -p fw
    Detecting USB of the target
    DONE
    Communicating with the target
    DONE
    Switching to firmware download mode
    ...............Firmware Not Downloaded (Not Required)
    ...............ERROR: Failed to enter download mode
    [root@X250RF bin]# ./fwdldhostx86_64 -s ../../../build/bin/hostx86_64/slqssdk -d 9x50 -p fw
    Detecting USB of the target
    DONE
    Communicating with the target
    DONE
    Switching to firmware download mode
    ...............Firmware Not Downloaded (Not Required)
    ...............ERROR: Failed to enter download mode

However, after running these commands, the modem stays in LOW POWER MODE, even after a power cycle:

at!impref?
!IMPREF: 
 preferred fw version:    01.07.00.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.002_000
 current fw version:      01.00.02.00
 current carrier name:    GENERIC
 current config name:     GENERIC_001.012_000

 fw version mismatch
 config name mismatch

OK
at!gstatus?
!GSTATUS: 
Current Time:  685              Temperature: 30
Reset Counter: 3                Mode:        LOW POWER MODE 


OK
ati
Manufacturer: Sierra Wireless, Incorporated
Model: EM7565
Revision: SWI9X50C_01.00.02.00 6ff48a jenkins 2017/09/29 05:54:26
MEID: 35926008011077
IMEI: 359260080110775
IMEI SV:  2
FSN: UF801687520406
+GCAP: +CGSM


OK

The modem can be recovered (after some research in the forums) by the following AT commands:

at!impref="GENERIC"
at!reset

After rebooting the modem it reports the following:

at!impref?
!IMPREF: 
 preferred fw version:    01.00.02.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_001.012_000
 current fw version:      01.00.02.00
 current carrier name:    GENERIC
 current config name:     GENERIC_001.012_000

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

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


OK

System information:

[root@X250RF robert]# uname -a
Linux X250RF 4.17.2-1-ARCH #1 SMP PREEMPT Sat Jun 16 11:08:59 UTC 2018 x86_64 GNU/Linux

GobiDriver Version: gobi-drivers_S2.31N2.50

Upstream Driver qcserial and qmi_wwan are blacklisted.

at!usbcomp?
Config Index: 1
Config Type:  3 (Generic)
Interface bitmask: 0000050D (diag,nmea,modem,rmnet0,rmnet1) 

OK

Additional notes:
I must admit that I have tried the lite-fw-download from the SLQS04.00.13-lite package in the first place with no success. Maybe this has left some damaged/incomplete files on the device. However, I have no idea whether this is the case nor how to purge them.

Finally, I have also tried to perform an RMA reset

at!rmareset=3

which reported a success except for 4 failed entries (this is what I can remember).
However, I cannot repeat this procedure, since this command now reports

at!rmareset?
!RMARESET: NOT IMPLEMENTED

OK

I would like to retry this process with one of the previous firmware versions. But I can only find the most recent version.

Has anyone a hint for me?

P.S.: When trying to update with the Windows tool (tried Windows 7 and Windows 10), it fails as well after resetting the modem and waiting for the firmware download mode.

Update:
It seems that Gobi Image Management application comes further, but image downloading process seems not to terminate for half an hour…

Please select one of the following options or press <Enter> to exit:
1. Display the list of carrier images available for download
2. Display the list of carrier images resident on the device
3. Display the information specific to a carrier image resident on the device
4. Download carrier image to the device
5. Delete a carrier image from the device
6. Select a carrier image resident on the device as the new active image
7. Display Raw Images present in device
8. Activate from Raw Images avilable on device
9. Display boot loader version number
Option: 3
Unknown Image : 01.00.02.00_GENERIC
Unknown Image : 01.00.02.00_?
Id        Carrier             Technology          Region              Status              

Please select a image index,or press <Enter> to exit:
Option : 0
Id        Carrier             Technology          Region              Status              
0         Image Index Error

Please select one of the following options or press <Enter> to exit:
1. Display the list of carrier images available for download
2. Display the list of carrier images resident on the device
3. Display the information specific to a carrier image resident on the device
4. Download carrier image to the device
5. Delete a carrier image from the device
6. Select a carrier image resident on the device as the new active image
7. Display Raw Images present in device
8. Activate from Raw Images avilable on device
9. Display boot loader version number
Option: 4

Please select firmware download method
1 - G3K Firmware Download Method
2 - SPKG Firmware Download Method
or press <Enter> to exit. Option :
2

Please specify the path (upto 510 Characters) or press <Enter> to return to the main menu: fw

SPKG CWE Image Fields
---------------------
Model ID: SWI9X50C
BOOT Version: 01.07.00.00
AMSS Version: 01.07.00.00
SKU ID: INTERNAL
Package ID: ?
Carrier: ?
PRI version: ?

Downloading Firmware................
Enter Download Mode
...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
....^C

Afterwards, the firmware update applications detects the modem in download mode and starts its download as well… however it also seems to be stuck:

[robert@X250RF bin]$ ./fwdldhostx86_64 -s ../../../build/bin/hostx86_64/slqssdk -d 9x50 -p fw
Detecting USB of the target
DONE
Communicating with the target
DONE
Downloading the firmware
..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

#2

Is it a real machine or just a VM? In case of a VM you must re-attach the Modem quickly to the VM after mode switching.

The Modem stays in LPM because you must flash the FW twice in order get the Carrier PRI updated.

Firmware Upgrade Instructions

Release 10 FW and Carrier PRI files support Secure Boot. The images are signed. Release 9 FW
does not support upgrading to a signed PRI file. Therefore, upgrading FW will require the following
steps.

  • Upgrade the FW package as usual with the FW and Carrier PRI files.

  • The update will report a failure; however, FW will be updated on the module.

  • FW will detect an Image Mismatch and stay in LPM. This can be confirmed via the following AT commands:
    ATI
    AT!IMPREF?

  • Run the same upgrade procedures as Step 1. This will report success. FW and Carrier PRI will be updated successfully.

WARNING: Customer should not be downgraded to Release 9 again to avoid future issues.
WARNING: It is recommended to upgrade all carrier images to Release 10 on the module to avoid
future issues.


#3

You should also be aware of this fix in 01.05.03.00:

QTI9X50-837 Fixed issue when downloading FW in Linux using USB 3.0 FW DOWNLOAD

If possible I’d recommend connecting the modem by USB2 when upgrading from an older firmware. Use an external enclosure with a USB2 cable, or temporarily cover the USB3 pins if you have no other way to disable USB3 on the m.2 slot.


#4

@unknown:

the Windows 7 machine is a VM, however I have already considered to pass the USB devices into the VM, even after registration and while tracking for other devices (due to changed USB IDs).
The Windows 10 machine is running directly on the CPU, but has the same behaviour as the VM:

The device does not come up in download mode, but in normal mode (but stays in Low Power Mode)

FDT version: 1.0.1801.0
Awaiting adapter ...
Setting images preference ...
Resetting ...
Awaiting download port ...
Enabling selective suspend ...
Firmware download failed.
Primary error code: 82 - Failed in checking modem mode.
Secondary error code: 68 - Received incorrect response.
Device error code: 0x0 - Unknown device error code.

Preexisting images information:
        Current:
                Firmware:
                        ImageId: 001.012_000
                        BuildId: 01.00.02.00_GENERIC
                Configuration:
                        ImageId: 001.012_000
                        BuildId: 01.00.02.00_GENERIC
Final images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:

OEM PRI:

IMEI:

Total time elapsed: 46890 ms.

Time to switch to boot mode: -1 ms.

Images downloaded:


Press Enter to continue ...

I have already seen and followed the instructions in the release note.

@dl5162: The modem is attached to an external M2->USB3 adapter. I just tried to use an USB2 cable. Still the same behaviour.

Furthermore, the instruction “AT!BOOTHOLD” just causes a simple reset of the device.

On Linux somehow the Gobi_Image_Management application is capable of putting the modem into a different mode. Here, the modem registers with the following ID: 1199:9090 instead of 1199:9091 (in normal mode) and the driver registers only a single /dev/ttyUSB0 instead of three ttyUSB0-2.

Any further ideas?

P.S. I suspect that by trying to run at!rmareset=3 has put the modem into an even older firmware state so that the current flashing procedure does not work anymore. But this is only a suggestion.


#5

Hi,

Can you send the following commands to the unit and give their responses (in this order)?

ati
at!priid?
at!gstatus?
at!entercnd="A710"
at!pcinfo?
at!priid?

Also on the system can you send the below when the unit is plugged in
uname -r
ls /dev
lsusb
lsmod

This is just to confirm some of the above in the current device configuration (although some of it is conflicting). Also sometime it is just easier to update the unit using the Windows one click updater,are you able to use that with the latest Windows drivers?.

If you are using Linux (ideally with it natively installed) you definitely need to use the Firmware_download application and not the image_management one.

Regards

Matt


#6

Dear Matt,

glad to hear from you!

Using just Windows was my second attempt. I tried linux first, however maybe I have already locked-out myself by trying the “lite” tools in the first place…

If it makes any difference: The modem is attached via external enclosure: https://techship.com/products/usb30-m2-adapter-with-enclosure/

Here is my AT ouput:

Manufacturer: Sierra Wireless, Incorporated
Model: EM7565
Revision: SWI9X50C_01.00.02.00 6ff48a jenkins 2017/09/29 05:54:26
MEID: 35926008011077
IMEI: 359260080110775
IMEI SV:  2
FSN: UF801687520406
+GCAP: +CGSM


OK
at!priid?
PRI Part Number: 9907344
Revision: 001.001
Customer: Generic-M2M

Carrier PRI: 9999999_9907259_SWI9X50C_01.00.02.00_00_GENERIC_001.012_000

OK
at!gstatus?
!GSTATUS: 
Current Time:  73               Temperature: 32
Reset Counter: 2                Mode:        ONLINE         
System mode:   LTE              PS state:    Attached     
LTE band:      B3               LTE bw:      20 MHz  
LTE Rx chan:   1300             LTE Tx chan: 19300
LTE SSC1 state:NOT ASSIGNED
LTE SSC2 state:NOT ASSIGNED
LTE SSC3 state:NOT ASSIGNED
LTE SSC4 state:NOT ASSIGNED
EMM state:     Registered       Normal Service 
RRC state:     RRC Idle       
IMS reg state: No Srv   

PCC RxM RSSI:  -56              PCC RxM RSRP:  -85
PCC RxD RSSI:  -60              PCC RxD RSRP:  -90
Tx Power:      --               TAC:         34bb (13499)
RSRQ (dB):     -10.8            Cell ID:     01c07902 (29391106)
SINR (dB):     11.0


OK
at!entercnd="A710"
OK
at!pcinfo?
State: Online
LPM voters - Temp:0, Volt:0, User:0, W_DISABLE:0, IMSWITCH:0, BIOS:0, LWM2M:0, OMADM:0, FOTA:0, RFCAL:0
LPM persistence - None

OK
at!priid?
PRI Part Number: 9907344
Revision: 001.001
Customer: Generic-M2M

Carrier PRI: 9999999_9907259_SWI9X50C_01.00.02.00_00_GENERIC_001.012_000

OK

And here the system information:

[root@X250RF robert]# uname -r
4.17.2-1-ARCH
[root@X250RF robert]# uname -a
Linux X250RF 4.17.2-1-ARCH #1 SMP PREEMPT Sat Jun 16 11:08:59 UTC 2018 x86_64 GNU/Linux
[root@X250RF robert]# ls /dev
autofs           hugepages           null      tpm0   tty27  tty47  ttyS0       vcs5
block            hwrng               nvram     tty    tty28  tty48  ttyS1       vcs6
bsg              initctl             port      tty0   tty29  tty49  ttyS2       vcsa
btrfs-control    input               ppp       tty1   tty3   tty5   ttyS3       vcsa1
bus              kmsg                psaux     tty10  tty30  tty50  ttyUSB0     vcsa2
cdc-wdm0         kvm                 ptmx      tty11  tty31  tty51  ttyUSB1     vcsa3
char             lightnvm            ptp0      tty12  tty32  tty52  ttyUSB2     vcsa4
console          log                 pts       tty13  tty33  tty53  uhid        vcsa5
core             loop-control        random    tty14  tty34  tty54  uinput      vcsa6
cpu              mapper              rfkill    tty15  tty35  tty55  urandom     vfio
cpu_dma_latency  media0              rtc       tty16  tty36  tty56  userio      vga_arbiter
cuse             mei0                rtc0      tty17  tty37  tty57  v4l         vhci
disk             mem                 sda       tty18  tty38  tty58  v4l-touch0  vhost-net
dri              memory_bandwidth    sda1      tty19  tty39  tty59  vboxdrv     vhost-vsock
drm_dp_aux0      mqueue              sda128    tty2   tty4   tty6   vboxdrvu    video0
drm_dp_aux1      mtd0                serial    tty20  tty40  tty60  vboxnetctl  video1
drm_dp_aux2      mtd0ro              shm       tty21  tty41  tty61  vboxusb     watchdog
fb0              mtd1                snapshot  tty22  tty42  tty62  vcs         watchdog0
fd               mtd1ro              snd       tty23  tty43  tty63  vcs1        zero
full             net                 stderr    tty24  tty44  tty7   vcs2
fuse             network_latency     stdin     tty25  tty45  tty8   vcs3
hpet             network_throughput  stdout    tty26  tty46  tty9   vcs4
[root@X250RF robert]# lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 005: ID 04ca:703c Lite-On Technology Corp. 
Bus 002 Device 004: ID 8087:0a2a Intel Corp. 
Bus 002 Device 003: ID 138a:0017 Validity Sensors, Inc. VFS 5011 fingerprint sensor
Bus 002 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 002 Device 044: ID 1199:9091 Sierra Wireless, Inc. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@X250RF robert]# lsmod
Module                  Size  Used by
qcserial               20480  0
qmi_wwan               32768  0
usb_wwan               20480  1 qcserial
cdc_mbim               16384  0
cdc_wdm                24576  2 cdc_mbim,qmi_wwan
cdc_ncm                40960  1 cdc_mbim
uas                    28672  0
usb_storage            69632  1 uas
usbserial              53248  2 qcserial,usb_wwan
usbnet                 49152  3 cdc_mbim,cdc_ncm,qmi_wwan
mii                    16384  1 usbnet
ccm                    20480  6
fuse                  118784  3
cmac                   16384  1
rfcomm                 86016  12
joydev                 24576  0
mousedev               24576  0
rmi_smbus              16384  0
rmi_core               90112  1 rmi_smbus
intel_rapl             24576  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
kvm_intel             233472  0
kvm                   729088  1 kvm_intel
snd_hda_codec_hdmi     57344  1
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  0
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
bnep                   24576  2
pcbc                   16384  0
mei_wdt                16384  0
ofpart                 16384  0
aesni_intel           200704  6
cmdlinepart            16384  0
arc4                   16384  2
aes_x86_64             20480  1 aesni_intel
wmi_bmof               16384  0
intel_spi_platform     16384  0
intel_spi              20480  1 intel_spi_platform
crypto_simd            16384  1 aesni_intel
snd_hda_codec_realtek   110592  1
cryptd                 28672  3 crypto_simd,ghash_clmulni_intel,aesni_intel
glue_helper            16384  1 aesni_intel
spi_nor                36864  1 intel_spi
iTCO_wdt               16384  0
snd_hda_codec_generic    86016  1 snd_hda_codec_realtek
intel_cstate           16384  0
iTCO_vendor_support    16384  1 iTCO_wdt
mtd                    69632  5 cmdlinepart,intel_spi,ofpart
uvcvideo              110592  0
videobuf2_vmalloc      16384  2 rmi_core,uvcvideo
videobuf2_memops       16384  1 videobuf2_vmalloc
i915                 2043904  36
videobuf2_v4l2         28672  2 rmi_core,uvcvideo
iwlmvm                430080  0
videobuf2_common       53248  3 rmi_core,videobuf2_v4l2,uvcvideo
btusb                  53248  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
videodev              208896  4 rmi_core,videobuf2_v4l2,uvcvideo,videobuf2_common
btintel                24576  1 btusb
mac80211              925696  1 iwlmvm
bluetooth             638976  39 btrtl,btintel,btbcm,bnep,btusb,rfcomm
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   24576  1
fat                    81920  1 vfat
media                  45056  2 videodev,uvcvideo
iwlwifi               327680  1 iwlmvm
ecdh_generic           24576  2 bluetooth
crc16                  16384  1 bluetooth
i2c_algo_bit           16384  1 i915
snd_hda_intel          45056  4
intel_uncore          131072  0
intel_rapl_perf        16384  0
drm_kms_helper        200704  1 i915
snd_hda_codec         151552  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
pcspkr                 16384  0
psmouse               167936  0
cfg80211              778240  3 iwlmvm,iwlwifi,mac80211
input_leds             16384  0
drm                   471040  17 drm_kms_helper,i915
thinkpad_acpi         106496  1
snd_hda_core           94208  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
rtsx_pci_ms            20480  0
nvram                  16384  1 thinkpad_acpi
memstick               16384  1 rtsx_pci_ms
rfkill                 28672  10 bluetooth,thinkpad_acpi,cfg80211
intel_gtt              24576  1 i915
tpm_tis                16384  0
tpm_tis_core           20480  1 tpm_tis
wmi                    28672  1 wmi_bmof
snd_pcm               135168  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
tpm                    65536  2 tpm_tis,tpm_tis_core
agpgart                49152  2 intel_gtt,drm
snd_timer              36864  1 snd_pcm
syscopyarea            16384  1 drm_kms_helper
mei_me                 45056  1
ac                     16384  0
sysfillrect            16384  1 drm_kms_helper
rtc_cmos               24576  1
led_class              16384  3 input_leds,iwlmvm,thinkpad_acpi
evdev                  20480  14
battery                24576  1 thinkpad_acpi
rng_core               16384  1 tpm
e1000e                282624  0
snd                    98304  17 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,thinkpad_acpi,snd_pcm
mac_hid                16384  0
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
soundcore              16384  1 snd
mei                   106496  3 mei_wdt,mei_me
i2c_i801               32768  0
intel_pch_thermal      16384  0
shpchp                 40960  0
lpc_ich                28672  0
vboxnetflt             32768  0
vboxnetadp             28672  0
vboxpci                28672  0
vboxdrv               487424  3 vboxpci,vboxnetadp,vboxnetflt
crypto_user            16384  0
ip_tables              28672  0
x_tables               45056  1 ip_tables
btrfs                1372160  1
libcrc32c              16384  1 btrfs
crc32c_generic         16384  0
xor                    24576  1 btrfs
zstd_decompress        81920  1 btrfs
zstd_compress         184320  1 btrfs
xxhash                 16384  2 zstd_compress,zstd_decompress
raid6_pq              122880  1 btrfs
sd_mod                 61440  3
rtsx_pci_sdmmc         28672  0
serio_raw              16384  0
mmc_core              172032  1 rtsx_pci_sdmmc
atkbd                  32768  0
libps2                 16384  2 atkbd,psmouse
ahci                   40960  2
libahci                40960  1 ahci
crc32c_intel           24576  1
xhci_pci               16384  0
ehci_pci               16384  0
libata                278528  2 libahci,ahci
xhci_hcd              262144  1 xhci_pci
ehci_hcd               94208  1 ehci_pci
scsi_mod              258048  4 sd_mod,usb_storage,uas,libata
usbcore               294912  16 usbserial,xhci_hcd,ehci_pci,usbnet,qcserial,cdc_mbim,cdc_ncm,usb_storage,cdc_wdm,usb_wwan,uvcvideo,ehci_hcd,qmi_wwan,btusb,xhci_pci,uas
rtsx_pci               73728  2 rtsx_pci_sdmmc,rtsx_pci_ms
usb_common             16384  1 usbcore
i8042                  32768  0
serio                  28672  8 rmi_core,serio_raw,atkbd,psmouse,i8042

Finally, if it matters, I had to patch the latest GobiDriver to match with the updated definitions in the newer kernel:

diff -aur gobi-drivers_S2.31N2.50/GobiNet/QMIDevice.c gobi-drivers_S2.31N2.50.patched.4.18/GobiNet/QMIDevice.c
--- gobi-drivers_S2.31N2.50/GobiNet/QMIDevice.c	2018-02-28 03:10:08.000000000 +0100
+++ gobi-drivers_S2.31N2.50.patched.4.18/GobiNet/QMIDevice.c	2018-06-30 21:29:22.000000000 +0200
@@ -115,6 +115,7 @@
 //---------------------------------------------------------------------------
 // Include Files
 //---------------------------------------------------------------------------
+#include <linux/version.h>
 #include <asm/unaligned.h>
 #include "QMIDevice.h"
 #include "Structs.h"
@@ -137,6 +138,9 @@
 #define _SIG_LOCK_ 0
 #endif
 #include <linux/sched.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
 #include <linux/dnotify.h>
 //-----------------------------------------------------------------------------
 // Definitions
@@ -1302,7 +1306,8 @@
                                DEFAULT_READ_URB_LENGTH,
                                ReadCallback,
                                pDev );
-         setup_timer( &pDev->read_tmr, (void*)read_tmr_cb, (unsigned long)pDev->mQMIDev.mpReadURB );
+         //setup_timer( &pDev->read_tmr, (void*)read_tmr_cb, (unsigned long)pDev->mQMIDev.mpReadURB );
+         timer_setup( &pDev->read_tmr, (void*)read_tmr_cb, 0);
          mod_timer( &pDev->read_tmr, jiffies + msecs_to_jiffies(USB_READ_TIMEOUT) );
          mb();
          status = usb_submit_urb( pDev->mQMIDev.mpReadURB, GOBI_GFP_ATOMIC );
@@ -5616,7 +5621,7 @@
                              }
                              printk( KERN_INFO "forcing close of opened file handle i_ino:%lu\n", i_no);
 
-                             reffrom = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount );
+                             reffrom = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount.refs );
                              if (reffrom<2)
                              {
                                 DBG("opened file handle i_ino:%lu\n", i_no);
@@ -5880,14 +5885,14 @@
    {
       int ref = 0;
       mb();
-      ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount );
+      ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount.refs );
       DBG("%s:%d(%d) tries:%d ref:%d\n",__FUNCTION__,__LINE__,iIntfNum,tries,ref);     
       if (ref > 1)
       {       
          int iLoop = 0;
          mb();
          wait_interrupt();
-         ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount );
+         ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount.refs );
          if(wait_preempt()==1)
          if(ref>1)
          {
@@ -6009,11 +6014,11 @@
 
    for (tries = 0; tries < 60; tries++)
    {
-      int ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount );
+      int ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount.refs );
       if (ref > 1)
       {
          wait_ms(500);
-         ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount );
+         ref = atomic_read( &pDev->mQMIDev.mCdev.kobj.kref.refcount.refs );
          if(ref>1)
          {
             printk( KERN_WARNING "cdev in use by %d tasks\n", ref - 1 );
Nur in gobi-drivers_S2.31N2.50/GobiNet: .QMIDevice.o.d.

Kind Regards
Robert


#7

Robert,

The issue is that despite you blacklisting the qmi_wwan and qcserial drivers Linux really wants to use them as you can see from the below extract.

qcserial               20480  0
qmi_wwan               32768  0
usb_wwan               20480  1 qcserial
cdc_mbim               16384  0
cdc_wdm                24576  2 cdc_mbim,qmi_wwan
cdc_ncm                40960  1 cdc_mbim
uas                    28672  0
usb_storage            69632  1 uas
usbserial              53248  2 qcserial,usb_wwan
usbnet                 49152  3 cdc_mbim,cdc_ncm,qmi_wwan

This in turn means that the unit is not creating the /dev/qcqmi interfaces. I would suggest renaming/deleting the qmi_wwan.ko and qcserial.ko files from your system then rebooting, after that you should get the correct interfaces.

Regards

Matt


#8

Hi Matt,

thank you for your reply.

Sorry for the confusion, but qmi_wwan and qcserial were loaded manually by me, since I was just experimenting with a em7455 (Lenovo Branding), which is not working with the Gobi driver.

Nevertheless I have checked the blacklist, rebooted my system and retried the firmware update process:

[root@X250RF bin]# ./fwdldhostx86_64 -s ../../../build/bin/hostx86_64/slqssdk -d 9x50 -p fw -k
Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode
...............Firmware Not Downloaded (Not Required)
...............ERROR: Failed to enter download mode
[root@X250RF bin]# 

In the mean time tracking, if qcserial is being loaded accidentially…

[root@X250RF robert]# lsmod | grep qc
[root@X250RF robert]# lsmod | grep qmi_
[root@X250RF robert]# lsmod | grep qmi_
[root@X250RF robert]# lsmod | grep qmi_
[root@X250RF robert]# lsmod | grep qmi_
[root@X250RF robert]# lsmod | grep qmi
[root@X250RF robert]# lsmod | grep qmi
[root@X250RF robert]# lsmod | grep qc
[root@X250RF robert]# lsmod | grep qmi
[root@X250RF robert]# lsmod | grep qc
[root@X250RF robert]# lsmod | grep qmi
[root@X250RF robert]# 

And the output of dmesg -w during the update process:

[  364.063406] usb 2-2: new high-speed USB device number 7 using xhci_hcd
[  364.204407] usb 2-2: config 1 has an invalid interface number: 8 but max is 3
[  364.204415] usb 2-2: config 1 has no interface number 1
[  364.205281] usb 2-2: New USB device found, idVendor=1199, idProduct=9091, bcdDevice= 0.06
[  364.205288] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  364.205292] usb 2-2: Product: Sierra Wireless EM7565 Qualcomm® Snapdragon™ X16 LTE-A
[  364.205296] usb 2-2: Manufacturer: Sierra Wireless, Incorporated
[  364.205300] usb 2-2: SerialNumber: f1f96a3e
[  364.210618] GobiSerial 2-2:1.0: GobiSerial converter detected
[  364.210806] usb 2-2: GobiSerial converter now attached to ttyUSB0
[  364.212183] GobiSerial 2-2:1.2: GobiSerial converter detected
[  364.212250] usb 2-2: GobiSerial converter now attached to ttyUSB1
[  364.213814] GobiSerial 2-2:1.3: GobiSerial converter detected
[  364.213888] usb 2-2: GobiSerial converter now attached to ttyUSB2
[  364.215543] GobiNet 2-2:1.8 eth0: register 'GobiNet' at usb-0000:00:14.0-2, GobiNet Ethernet Device, d6:5b:db:b9:04:18
[  364.215974] USB Speed : USB 2.0
[  364.245993] GobiNet 2-2:1.8 enp0s20u2i8: renamed from eth0
[  364.269015] IPv6: ADDRCONF(NETDEV_UP): enp0s20u2i8: link is not ready
[  364.269084] IPv6: ADDRCONF(NETDEV_UP): enp0s20u2i8: link is not ready
[  378.880091] creating qcqmi0
[  378.880279] RawIP mode
... launched update here
[  496.603813] usb 2-2: USB disconnect, device number 7
[  496.604240] GobiSerial driver ttyUSB0: GobiSerial converter now disconnected from ttyUSB0
[  496.604293] GobiSerial 2-2:1.0: device disconnected
[  496.604694] GobiSerial driver ttyUSB1: GobiSerial converter now disconnected from ttyUSB1
[  496.604738] GobiSerial 2-2:1.2: device disconnected
[  496.605120] GobiSerial driver ttyUSB2: GobiSerial converter now disconnected from ttyUSB2
[  496.605168] GobiSerial 2-2:1.3: device disconnected
[  496.605448] GobiNet 2-2:1.8 enp0s20u2i8: unregister 'GobiNet' usb-0000:00:14.0-2, GobiNet Ethernet Device
[  496.623882] forcing close of opened file handle i_ino:27216
[  508.073360] usb 2-2: new high-speed USB device number 8 using xhci_hcd
[  508.214339] usb 2-2: config 1 has an invalid interface number: 8 but max is 3
[  508.214344] usb 2-2: config 1 has no interface number 1
[  508.215166] usb 2-2: New USB device found, idVendor=1199, idProduct=9091, bcdDevice= 0.06
[  508.215171] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  508.215174] usb 2-2: Product: Sierra Wireless EM7565 Qualcomm® Snapdragon™ X16 LTE-A
[  508.215177] usb 2-2: Manufacturer: Sierra Wireless, Incorporated
[  508.215180] usb 2-2: SerialNumber: f1f96a3e
[  508.219709] GobiSerial 2-2:1.0: GobiSerial converter detected
[  508.219932] usb 2-2: GobiSerial converter now attached to ttyUSB0
[  508.221276] GobiSerial 2-2:1.2: GobiSerial converter detected
[  508.221435] usb 2-2: GobiSerial converter now attached to ttyUSB1
[  508.223097] GobiSerial 2-2:1.3: GobiSerial converter detected
[  508.223311] usb 2-2: GobiSerial converter now attached to ttyUSB2
[  508.224929] GobiNet 2-2:1.8 eth0: register 'GobiNet' at usb-0000:00:14.0-2, GobiNet Ethernet Device, d6:5b:db:b9:04:18
[  508.227861] USB Speed : USB 2.0
[  508.257058] GobiNet 2-2:1.8 enp0s20u2i8: renamed from eth0
[  508.279806] IPv6: ADDRCONF(NETDEV_UP): enp0s20u2i8: link is not ready
[  508.279919] IPv6: ADDRCONF(NETDEV_UP): enp0s20u2i8: link is not ready
[  521.213368] creating qcqmi0
[  521.213616] RawIP mode

What I have noticed: The EM7565 does not come up with another USB PID when the firmware update is initiated (even not for a short time as dmesg shows). In contrast, the EM7455 registers with a different USB PID (decremented by one) when being reset/powercycled.


#9

Any further ideas?
Neither Windows nor Linux updater work for this modem…


#10

Dear all,

in the mean time, I have made some progress. However, still with no final success.

I switched the chassis and put the em7565 into an M.2 to MiniPCIe adapter ( https://techship.com/products/m2mu2/ ), which in turn is connected to a MiniPCIe USB adapter.
Since I had success to update an EM7455 with that configuration, I tried my EM7565 now.
By this, the modem now comes up in Download Mode (PID 9090 instead of 9091) and firmware download applications continue their work… at least for one step.

The Firmware_Download application from SDK now stucks in “downloading” the image infinitely. It just keeps printing points on the screen.

The “one click” updater for Windows (tested on a native Windows 10 machine) now fails with the following output:

FDT version: 1.0.1801.0
Awaiting adapter ...
Setting images preference ...
Resetting ...
Awaiting download port ...
Switching to streaming mode ...
Downloading images ...
Writing image |
Flashing image /
Enabling selective suspend ...
Firmware download failed.
Primary error code: 77 - Failed in streaming download stage.
Secondary error code: 68 - Received incorrect response.
Device error code: 0x80 - Invalid image type.

Preexisting images information:
        Current:
                Firmware:
                        ImageId: 001.012_000
                        BuildId: 01.00.02.00_GENERIC
                Configuration:
                        ImageId: 001.012_000
                        BuildId: 01.00.02.00_GENERIC
Final images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:

OEM PRI:

IMEI:

Total time elapsed: 38312 ms.

Time to switch to boot mode: 25360 ms.

Images downloaded:
        Image ID: ?_?
        Build ID: 01.07.00.00_?
                failed

Time to reset to application mode: -1 ms.

Press Enter to continue ...

If I restart this tool, it doesn’t detect the modem at all:

FDT version: 1.0.1801.0
Awaiting adapter ...
Enabling selective suspend ...
Firmware download failed.
Primary error code: 82 - Failed in checking modem mode.
Secondary error code: 0 - Not applicable.
Device error code: 0x0 - Unknown device error code.

Preexisting images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:
Final images information:
        Current:
                Firmware:
                        ImageId:
                        BuildId:
                Configuration:
                        ImageId:
                        BuildId:

OEM PRI:

IMEI:

Total time elapsed: 125 ms.


Images downloaded:


Press Enter to continue ...

A powercycle brings me back to the first output. The modem stays in LOW POWER MODE

ati
Manufacturer: Sierra Wireless, Incorporated
Model: EM7565
Revision: SWI9X50C_01.00.02.00 6ff48a jenkins 2017/09/29 05:54:26
MEID: 35926008011077
IMEI: 359260080110775
IMEI SV:  2
FSN: UF801687520406
+GCAP: +CGSM


OK
at!impref?
!IMPREF:
 preferred fw version:    01.07.00.00
 preferred carrier name:  GENERIC
 preferred config name:   GENERIC_002.002_000
 current fw version:      01.00.02.00
 current carrier name:    GENERIC
 current config name:     GENERIC_001.012_000

 fw version mismatch
 config name mismatch

OK
at!gstatus?
!GSTATUS:
Current Time:  92               Temperature: 31
Reset Counter: 1                Mode:        LOW POWER MODE


OK

All tested with USB2 and USB3.

@mlw: Do you have any ideas?


#11

Hi,

The reason the unit is in LPM is because of the mis match i.e. the PRI file want to have 1.07 firmware where what is actually on the device is 1.02. Why it is failing to perform the firmware download I do not know, you might want to try it again or manually extract the FDT application from the one click updater along with the firmware (.cwe)/PRI (.nvu) and try to download them through the command line (this is all the one click updater does in an automated fashion).

Regards

Matt


#12

I have exactly the same problem with the Windows 1-click installer as described in the latest post by falkenber9. Did you test the update from this old firmware version (01.00.02.00) internally?

I already burned far too much time for something that should be quite simple, really disappointing.


#13

To be honest guys the 1.00.02 firmware is over 7 months old indicating to me that if the units were manufactured with it it then the hardware are early prototype units. As with anything if you are using early hardware then incompatibilities can happen over time (not ideal but just part of the reality of a design process).

I do not know what you issues are and I will continue to try to help but I would recommend getting hold of some current hardware.

Regards

Matt


#14

Hi Matt,

thank you. I will try the unpacked one click updater and report back.

Regarding the old version: I am not sure, whether my unit is really old or if the old software version is a result of my deperate attempts of updating and resetting the unit.
Remember, I have executed “AT!RMARESET=X”, where I tried different numbers of X. Now, “AT!RMARESET” says “Not implemented”. Instead, “AT!NVRESTORE” seems to exist in that old 1.00.02 version, which provides similar (?) functionality.

Maybe you could provide us a one-click updater for an itermediate version?

Maybe some “incomplete” uploads are resident in the modem, which prevent an update? Is there a way to purge them? (This is only a guess from extensively reading all related topic in this forum).


#15

Hi,

I tried the unpacked one click updater, but still with no success.

I run the following command: fdt2.exe -d g5k -f SWI9X50C_01.07.00.00.cwe SWI9X50C_01.07.00.00_GENERIC_002.002_000.nvu -nsc -log %temp%

At least I have a logfile of the update process (see attachment).

Looks like the modem does not like the successfully uploaded image (see line 11222 and following).

Maybe an intermediate version might help? Matt? @mlw

fdt2 2018-07-05_15.42.29.tbd.zip (78.6 KB)


#16

There are other versions but I cannot post them to the forum (because they are too big and its not something that should be done anyway). If you want intermediate versions I have listed them below so you can ask exactly.

  • Release 7 - 1.02.01
  • Release 8 - 1.05.01
  • Release 9 - 1.05.03
  • Release 10 - 1.07.00
  • Release 11 - 1.07.02

Regards

Matt


#17

Hi Matt,

might you provide me the one-click updater for Release 9 (1.05.03), please?
This is the most recent version before introducing secure boot.

(If this also fails, I would like to try Release 7 (1.02.01) as well. It introduces the AT!RMARESET command which I used to ‘downgrade’ my module to 1.00.02. The module now reports AT!RMARESET as not implemented)

Regards
Robert


#18

Robert,

You are going to need to go through your commercial channel to get the one click updaters for the reasons I have outlined above.

Regards

Matt


#19

Matt,

thank you for your reply. I could download version 01.05.01.00 from by distributor and gave it a shot: The result was a great success and I finally updated to 01.07.02.00

As a summary for those who run into a similar trouble and get stuck at version 01.00.02.00:

Prerequisites

  • Install latest Windows drivers
  • Get an intermediate firmware version from your distributor (e.g. 01.05.01.00 worked for me)
  • Use a chassis/adapter which allows the modem to come up with VID=9090 (instead of 9091) when issuing AT!BOOTHOLD as a test. The devices will appear as a single COM port labeled as QDownload. In my previous attempts the chassis somehow caused the modem to always come up as 9091.

Procedure

  • Launch update to the intermediate firmware
  • Launch update to 01.07.02.00 (may be higher in future)
  • Repeat the previous step (which is related to the introduction of secure boot)
  • Device should now be up to date

I have attached a detailed log of the outputs during the update steps.

Hope this thread will help others too.

Regards
Robert

7565-Update-Details.txt (6.4 KB)


#20

If you pay for it. Otherwise this answer is not helpful.