lenovo / lenovo-wwan-unlock

FCC and DPR unlock for Lenovo PCs
33 stars 7 forks source link

EM160R-GL could not work on X1 2-in-1 #29

Closed binli closed 1 month ago

binli commented 1 month ago
$ mmcli -m 1
  --------------------------------
  General  |                 path: /org/freedesktop/ModemManager1/Modem/1
           |            device id: 56c757fbe1e372362b930169ca2883ff7d4d6ed0
  --------------------------------
  Hardware |         manufacturer: Quectel
           |                model: EM160R-GL
           |    firmware revision: EM160RGLAPR02A10M4G
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 016509000026080
  --------------------------------
  System   |               device: /sys/devices/pci0000:00/0000:00:1c.6/0000:08:00.0
           |              drivers: mhi-pci-generic
           |               plugin: quectel
           |         primary port: wwan0at0
           |                ports: wwan0 (net), wwan0at0 (at), wwan0qcdm0 (qcdm)
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-puk (10), sim-pin2 (3), sim-puk2 (10)
           |                state: enabled
           |          power state: on
           |       signal quality: 0% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 2g, 3g, 4g; preferred: none
  --------------------------------
  IP       |            supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |                 imei: 016509000026080
           |         registration: idle
           | packet service state: detached
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |     primary sim path: /org/freedesktop/ModemManager1/SIM/0
binli commented 1 month ago

BIOS is N3YET69W, EC is N3YHT50W.

Sep 30 04:12:49 Mersey-2 DPR_Fcc_unlock_service[2455]: WWAN device Quectel EM160R-GL found
Sep 30 04:12:49 Mersey-2 DPR_Fcc_unlock_service[2455]: Device "/dev/wwan0mbim0" exists
Sep 30 04:12:50 Mersey-2 DPR_Fcc_unlock_service[2455]: FCC unlock failed
Sep 30 04:12:50 Mersey-2 DPR_Fcc_unlock_service[2455]: FCC unlock app exited
binli commented 1 month ago

Here is the debug mode of modemmanager.

$ sudo /usr/sbin/ModemManager --debug --test-low-power-suspend-resume --test-quick-suspend-resume modem.log

nitinexclusively commented 1 month ago

This issue was not reproduced in our environment . Already tested with OEM image as well .

binli commented 1 month ago

@nitinexclusively the X1 2-in-1 in my side still could not work with the same OEM image, could you share your firmware revision of the modem and BIOS? Could you share what's the possible reasons for FCC unlock failed? Thanks!

Queztion commented 1 month ago

Hello Binli,

We've tested OEM image 1004 in Mersey with Em160R. EM160 FW used was EM160RGLAPR02A10M4G_01.211.01.211.

Please try by updating this via LVFS directly first.

Thanks!

binli commented 1 month ago

@Queztion yes, there is a new version, but it's failed to upgrade. It sounds that this is a bug of LVFS package of EM160RGLAPR02A10M4G_01.211.01.211, do you have any ideas how does it detach using modem_manager?

╔═════════════════════════════════════════════════════╗
║ Upgrade EM160R GL from EM160RGLAPR02A10M4G_01.210.01.210 to                  ║
║ EM160RGLAPR02A10M4G_01.211.01.211?                                                                     ║
╠═════════════════════════════════════════════════════╣
║ Firmware release EM160RGLAPR02A10M4G_01.211.01.211 packaged for LVFS.   ║
║                                                                                                                                                ║
║ • Performance improvements                                                                                          ║
║ • Stability improvements                                                                                                   ║
║                                                                                                                                                ║
║ EM160R GL and all connected devices may not be usable while updating.            ║
╚═════════════════════════════════════════════════════╝
Perform operation? [Y|n]:Y

$ sudo fwupdmgr get-results 5b82190ce5dcf46fdcfed3fbf42b96a95996f361
EM160R GL:
  Device ID:            5b82190ce5dcf46fdcfed3fbf42b96a95996f361
  Previous version:     EM160RGLAPR02A10M4G_01.210.01.210
  Update State:         Failed
  Update Error:         failed to detach using modem_manager: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Cancelled: Operation was cancelled
  Last modified:        2024-10-10 06:04
  GUID:                 c60d8ae3-2059-503f-8035-6ddd664e6b1c
  Device Flags:         • Updatable
                        • System requires external power source
nitinexclusively commented 1 month ago

@binli I can see below in your logs:

primary port: wwan0at0

Primary port should be wwan0mbim0. Are you using OEM image ?

Just in case - >In order to debug , can you stop below SAR config service and reboot machine and see if you can see this issue or not ? https://github.com/lenovo/lenovo-wwan-unlock/blob/ubuntu-oem/lenovo-cfgservice.service Thanks

@Queztion Please update your BIOS version? Thank you!

binli commented 1 month ago

@Queztion @nitinexclusively I did update successfuly at the 3rd times. BIOS is 71W now. EC is 50W.

Devices that have been updated successfully:

• System Firmware (0.1.34 → 0.1.36) • EM160R GL (EM160RGLAPR02A10M4G_01.210.01.210 → EM160RGLAPR02A10M4G_01.211.01.211)

binli commented 1 month ago

After upgrading the firmware, now the FCC unlock is success fromthe log, but the modem could not work, now it's the same issue with x1 Carbon, has the same log 'SIM inserted is of non-USA'

https://github.com/lenovo/lenovo-wwan-unlock/issues/28

Oct 10 02:34:11 Mersey-2 DPR_Fcc_unlock_service[2712]: WWAN device Quectel EM160R-GL found
Oct 10 02:34:11 Mersey-2 DPR_Fcc_unlock_service[2712]: Device "/dev/wwan0mbim0" exists
Oct 10 02:34:12 Mersey-2 DPR_Fcc_unlock_service[2712]: SIM inserted is of non-USA
Oct 10 02:34:12 Mersey-2 DPR_Fcc_unlock_service[2712]: FCC unlock is success
Oct 10 02:34:12 Mersey-2 DPR_Fcc_unlock_service[2712]: FCC unlock app exited
nitinexclusively commented 1 month ago

Hello @binli Thanks for update

has the same log 'SIM inserted is of non-USA'

This is OK and as expected . Can you please give below command and reboot machine: mmcli -m 0 --3gpp-set-initial-eps-bearer-settings=apn=xxxx,ip-type=IPV4V6,allowed-auth=chap,user=xxxx,password=xxxx

you can keep username and passowrd as empty but please give correct apn information

Thank you !

binli commented 1 month ago

hi @nitinexclusively , I did reinstall the OEM image again, now I could connect it successfuly, it needs click the 'Connect' and then in a dialog window select 3gnet as 'Access Point'. So after upgrading the firmware, this issue is fixed.

EM160R GL (EM160RGLAPR02A10M4G_01.210.01.210 → EM160RGLAPR02A10M4G_01.211.01.211)

binli commented 1 month ago

Thanks all.