xmm7360 / xmm7360-usb-modeswitch

Tools for the Fibocom L850-GL / Intel XMM7360 LTE modem
125 stars 21 forks source link

Constant modem reboots on Thinkpad X1 Gen7 ( 20QES01M00 ) #23

Open RobertBuhren opened 4 years ago

RobertBuhren commented 4 years ago

Hi,

thanks for the work!. I was able to put my modem into USB mode:

[root@arch xmm7360]# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 04f2:b67c Chicony Electronics Co., Ltd Integrated Camera
Bus 001 Device 081: ID 2cb7:0007 Fibocom MBIM + 3 CDC-ACM
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

However, it is still not usable. The Modem seems to be stuck in a reboot loop. Here's what I can see in dmesg:

[Mon Dec 16 13:38:26 2019] usb 1-7: USB disconnect, device number 60
[Mon Dec 16 13:38:26 2019] cdc_mbim 1-7:1.0 wwp0s20f0u7: unregister 'cdc_mbim' usb-0000:00:14.0-7, CDC MBIM
[Mon Dec 16 13:38:26 2019] usb 1-7: new high-speed USB device number 61 using xhci_hcd
[Mon Dec 16 13:38:26 2019] usb 1-7: New USB device found, idVendor=2cb7, idProduct=0007, bcdDevice= 3.33
[Mon Dec 16 13:38:26 2019] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Mon Dec 16 13:38:26 2019] usb 1-7: Product: MBIM + 3 CDC-ACM
[Mon Dec 16 13:38:26 2019] usb 1-7: Manufacturer: Fibocom
[Mon Dec 16 13:38:26 2019] usb 1-7: SerialNumber: 004999010640000
[Mon Dec 16 13:38:26 2019] cdc_mbim 1-7:1.0: setting rx_max = 16384
[Mon Dec 16 13:38:26 2019] cdc_mbim 1-7:1.0: cdc-wdm0: USB WDM device
[Mon Dec 16 13:38:26 2019] cdc_mbim 1-7:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-7, CDC MBIM, 02:de:4b:3e:d8:34
[Mon Dec 16 13:38:26 2019] cdc_acm 1-7:1.2: ttyACM0: USB ACM device
[Mon Dec 16 13:38:26 2019] cdc_acm 1-7:1.4: ttyACM1: USB ACM device
[Mon Dec 16 13:38:26 2019] cdc_acm 1-7:1.6: ttyACM2: USB ACM device
[Mon Dec 16 13:38:27 2019] cdc_mbim 1-7:1.0 wwp0s20f0u7: renamed from wwan0
[Mon Dec 16 13:38:29 2019] usb 1-7: USB disconnect, device number 61
[Mon Dec 16 13:38:29 2019] cdc_mbim 1-7:1.0 wwp0s20f0u7: unregister 'cdc_mbim' usb-0000:00:14.0-7, CDC MBIM
[Mon Dec 16 13:38:29 2019] usb 1-7: new high-speed USB device number 62 using xhci_hcd
[Mon Dec 16 13:38:29 2019] usb 1-7: New USB device found, idVendor=2cb7, idProduct=0007, bcdDevice= 3.33
[Mon Dec 16 13:38:29 2019] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[Mon Dec 16 13:38:29 2019] usb 1-7: Product: MBIM + 3 CDC-ACM
[Mon Dec 16 13:38:29 2019] usb 1-7: Manufacturer: Fibocom
[Mon Dec 16 13:38:29 2019] usb 1-7: SerialNumber: 004999010640000
[Mon Dec 16 13:38:29 2019] cdc_mbim 1-7:1.0: setting rx_max = 16384
[Mon Dec 16 13:38:30 2019] cdc_mbim 1-7:1.0: cdc-wdm0: USB WDM device
[Mon Dec 16 13:38:30 2019] cdc_mbim 1-7:1.0 wwan0: register 'cdc_mbim' at usb-0000:00:14.0-7, CDC MBIM, 02:de:4b:3e:d8:34
[Mon Dec 16 13:38:30 2019] cdc_acm 1-7:1.2: ttyACM0: USB ACM device
[Mon Dec 16 13:38:30 2019] cdc_acm 1-7:1.4: ttyACM1: USB ACM device
[Mon Dec 16 13:38:30 2019] cdc_acm 1-7:1.6: ttyACM2: USB ACM device
[Mon Dec 16 13:38:30 2019] cdc_mbim 1-7:1.0 wwp0s20f0u7: renamed from wwan0
[Mon Dec 16 13:38:37 2019] usb 1-7: USB disconnect, device number 62

These messages repeat over and over again.

Any ideas?

Regards,

Robert

dziq commented 4 years ago

Did you try "FCC Lock" section on Readme? It helps mine form x1 carbon 6th.

RobertBuhren commented 4 years ago

Yes. Did you encounter reboots of the modem too?

gladiac commented 4 years ago

Hi, I have the same problem on my X1 Carbon G6. I get the modem-reboots as soon as I permanently disable the FCC Lock [via at@nvm:fix_cat_fcclock.fcclock_mode=0 + at@store_nvm(fix_cat_fcclock)] and restarting the modem [AT+CFUN=15]. My only fix is to re-enable the fcclock. However, the modem only lives for a few seconds so you gotta be quick. I fixed the reboots via:

while test 1; do ls -l /dev/ttyACM0 2>/dev/null && echo -e "at@nvm:fix_cat_fcclock.fcclock_mode=2\nat@store_nvm(fix_cat_fcclock)" | socat - /dev/ttyACM0 && break; done

I believe the problem is caused by the current firmware version (18500.5001.00.02.24.09) - maybe a countermeasure for permanently disabling the FCC lock which was introduced to prevent our hack? Firmware updates are shipped with the fibocom drivers.

I guess there are two things we can do:

  1. install older driver on windows to install an older firmware version (if possible?)
  2. learn how to do the intended FCC unlocking (@abrasive did some work on that (here: https://github.com/xmm7360/xmm7360-usb-modeswitch/tree/master/fcc_unlock) - I compiled and ran it but it did not successfully unlock the modem.
Gottox commented 4 years ago

Same issue here, Yoga 4th gen.

abrasive commented 4 years ago

PCI driver is in the works. Hoping to have something to release later in the month (fires permitting)

abrasive commented 4 years ago

Maybe I'm being pessimistic. @gladiac1337, if you run the FCC unlocker, does it correctly induce unlocked state? (Repeated runs should indicate state 1, probably mode 2?)

And if so, what happens if you issue the AT command at@bmm:UtaModeSetReq(UTA_MODE_NORMAL)?

gladiac commented 4 years ago

Maybe I'm being pessimistic. @gladiac1337, if you run the FCC unlocker, does it correctly induce unlocked state? (Repeated runs should indicate state 1, probably mode 2?)

And if so, what happens if you issue the AT command at@bmm:UtaModeSetReq(UTA_MODE_NORMAL)?

I will test that tonight an report back then.

Gottox commented 4 years ago

https://gist.github.com/Gottox/cfd04d8d0239ccc198534f9100a0ba9b this is the log from NetworkManager/ModemManager I get.

I'm not sure if it is the same issue as @gladiac1337 as I'm able to connect to LTE at some point, but I cannot reproduce this state deterministicly.

gladiac commented 4 years ago

@Gottox you are right, your problem looks different in comparison to mine. Mine is identical to the one @RobertBuhren posted.

@abrasive This is the initial situation:

> AT+GTUSBMODE?
+GTUSBMODE: 7
> at@nvm:fix_cat_fcclock.fcclock_mode?
2
> AT+CFUN?
+CFUN: 4,0
> at@bmm:UtaModeSetReq(UTA_MODE_NORMAL)
UTA_ERROR_WRONG_STATE

There is a SIM inside the SIM-slot which does not require a PIN. The firmware-version is 18500.5001.00.02.24.09 which came with the 2.0.1.75 driver package; see: nz3wj24w.txt nz3wj24w.exe

fcc_unlock:

# ./fcc_unlock /dev/ttyACM0 
lock mode: 2 state: 0
lock challenge present: 1 challenge: cda9e7dd
resp: dd e7 a9 cd 3d f8 c7 19 
 00 00 00 00 00 00 00 00
success
successss
switch states: hw 1, sw 0

It just stops there and does not quit. Here are the results after running fcc_unlock:

> AT+CFUN?
+CFUN: 4,0
> at@bmm:UtaModeSetReq(UTA_MODE_NORMAL)
UTA_ERROR_WRONG_STATE

It looks quite the same as before. Rerunning fcc_unlock is interesting:

# ./fcc_unlock /dev/ttyACM0 
lock mode: 2 state: 1
lock challenge present: 1 challenge: 303da89b
resp: 9b a8 3d 30 3d f8 c7 19 
 00 00 00 00 00 00 00 00
success
successss
switch states: hw 1, sw 0

It again hangs there. However, it writes that the lock mode is still 2 but the state is now 1 instead of 0. So the first run actually did something...

Hope that helps.

abrasive commented 4 years ago

PCI driver is up. Ugly, but up.

m7mdcc commented 4 years ago

@gladiac1337 , there is new firmware from microzeft here: https://www.catalog.update.microsoft.com/Search.aspx?q=Fibocom

18500.5001.00.03.25.07

Try if it's can solve your issue?

mpxc commented 4 years ago

I had a similar issue on my Gen6, but luckily the firmware can be downgraded :) For example, nz3wj22w has 18500.5001.xx.01.20.85 and that one appears to be working fine. Although my modem was not stuck in a reboot loop after setting fcclock_mode=0, it kept saying it was busy. I also tried PCI driver and it works fine, but having a USB device has its perks (and for some reason I also get better throughput). @abrasive thanks for your work!

vuori commented 4 years ago

FWIW there don't seem to be any particular problems with setting fcclock_mode=0 on 18500.5001.00.03.25.13 (Thinkpad T14), but I didn't try to save the setting to NVM. The following chat script (chat -f unlock.chat < /dev/ttyACM0 > /dev/ttyACM0) can be run after xmm2usb:

ABORT   ERROR

""  AT
OK  "at@nvm:fix_cat_fcclock.fcclock_mode=0"
OK  "AT+CFUN=1"
OK  \c
HeySora commented 4 years ago

A bit late, but I can confirm that on 18600.5903.23587.2 (ThinkPad T490s), the reboot loop doesn't happen anymore, even after the NVM store. It used to happen on 18500.5001.00.02.24.09 before. (I know the PCI driver is here and works well, but on my end I prefer the USB modeswitch version so I can manage my card through the OS)

mpxc commented 4 years ago

Thanks @vuori & @HeySora for the update! I went ahead and updated to nz4wj07w on my X1C6 which came out few days ago. The FW Updater version is 18500.5903.30.1 and the actual firmware appears to be 18500.5001.00.04.26.06 (Generic network). I can also confirm that writing to NVM store and rebooting my laptop works just fine :)