Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
The Quectel EM120 provided in the newer Thinkpad X1 Carbon Gen9 laptops comes FCC locked by default. There is currently no open source solution to unlock the module, although there seems to be some existing tool to do so already, as per the following Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/modemmanager/+bug/1934286
Quoting from the bug description:
4.4 Check the modem’s status
$ mmcli --modem 0
4.5 Install and execute Lenovo’s FCC unlock app ( for Quectel modem only )
The dpr-wwan_1.0-wwan-test_amd64.snap package should provide the unlock tool, would be good to see if it can be integrated easily in ModemManager/libqmi/libmbim.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
...
Related merge requests
4
When these merge requests are accepted, this issue will be closed automatically.
That's true , not supported yet...journalctl says:
DPR_wwan[5026]: get_product(): WWAN DPR functionality is not supported in this productDPR_wwan[5026]: DPR and FCC unlock App is not supported by Lenovo nowsystemd[1]: snap.lenovo-wwan-dpr.wwan-dpr.service: Deactivated successfully.systemd[1]: Finished Service for snap application lenovo-wwan-dpr.wwan-dpr.
Meanwhile, Lenovo published a version of its FCC unlock app at https://snapcraft.io/lenovo-wwan-dpr . This package is designed for the EM160R, but I think both chipsets are quite similar. I've already had a quick glance at the contents of the snap. It consists of two CLI binaries linked to a shipped library called mbim2sar.so . Luckily Lenovo "forgot" to strip all binaries which is why they still contain symbols. Kudos for that one ;-)
mbim2sar.so exports several symbols, among them a function table called fcc_ops which contains various functions invoked by the CLI tools (especially the DPR_Fcc_unlock_service one). The CLI wrapper mainly verifies that you are actually running a computer with one of the Quectel modems in question installed. It does this by accessing DMI data and looking for a FCC signature string (with a value of KHOIHGIUCCHHII). My ThinkPad T14 with a Quectel EM120R-GL provides the correct signature but the CLI wrapper also tests the modem model and detects that it's not a EM160R, subsequently failing. Apart from the latter obstacle I think that I'm on the right path in that regard.
Back to mbim2sar.so. If you patch the various checks in DPR_Fcc_unlock_service away, the unlock procedure still fails. I'm fairly sure that mbim2sar.so either performs additional checks to verify that it's running on the right HW or there are some bits that differ between the two FCC unlock sequences. Not sure about that.
Since the fcc_ops structure is an opaque one it's quite difficult to follow the execution path inside the library in order to understand what exactly they are doing there.
There are references to some MD5 signing that happens inside the .so but I don't think that this is related to FCC unlocking (because, honestly, who would use MD5 for that ;) ).
Some success on both kernel 5.13 and 5.14, although the device path seems to have changed in 5.14.
mbim2sar.so is the one shipped as /usr/lib/mbim2sar.so in the lenovo-wwan-dpr snap, version 1.0.1-wwan-dpr-test, (obtained via snap download lenovo-wwan-dpr --edge at the time) .
Could you run a strace of that program? Now I'm thinking there may be some additional thing run just after the device services query; i.e. in this chunk:
[09-17_17:49:21:660] FccUnlock[09-17_17:49:21:660] SMBIOS 3.2.0 present.[09-17_17:49:21:660] Table at 0x90CA4000.[09-17_17:49:21:660] Handle 0x0030, DMI type 133, 5 bytes[09-17_17:49:21:660] String 1[09-17_17:49:21:660] KHOIHGIUCCHHII
@joar Thanks for sharing this piece of code, it worked on my Quectel EM120R-GL on my ThinkPad P14s Gen2 AMD running current Ubuntu 21.10. However, after a few minutes connected over LTE the modem's firmware crashes. I tried a few times, after rebooting, hoping it was a one-time-bad-luck but it turned out to be constantly repro, and I have not managed to gather actionable feedback from dmesg. All I can say is that I verified it was working and was stable under a Windows 10 (booted from a USB drive).
If you know what I should collect, don't hesitate, although I doubt you can do much about it.
FTR I've also opened a case on Lenovo support asking for the unlocking tool to be made available, because so far their model is non fonctional to me, and that's a first for a lenovo. It seems, though, those FCC locks are mroe and more common and not specific to this Quectel model ?
Great, meanwhile I have asked Nitin, the lenovo packager of snap, if the snap will cover other products and machines, here the comes the reply:
Will Quectel EM120R be supported by this snap package?
Yes
If yes are there any dates scheduled?
We are currently working to support X1 Yoga Gen 6 & X1 Carbon Gen 9 and release over SNAP.
Also , we are evaluating x13 yoga g2 now and will plan to release it also. Its still work in progress and I assume it could be available in next few months.
That's definitely good to know, but as you might imagine, I'd prefer if we could manage to get that into ModemManager/libqmi instead, just as it worked out with the Foxconn modems ;)
<<<<<< data = 03:00:00:00:30:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:00:00:00:00
>>>>>> data = 03:00:00:80:34:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:04:00:00:00:04:00:00:00
The information buffer in the response is different, we're getting 0x0004 instead of 0x0001 for the HW radio state.
So there must be something else missing. Maybe we do need to run the explicit query of device services before the FCC unlock?
Can you try the following?
$ sudo systemctl disable ModemManager // so that it's not started on next boot$ sudo shutdown -h now // fully shutdown to make sure the WWAN module is shutdown// manually boot the laptop$ sudo /usr/libexec/mbim-proxy --no-exit --verbose// in another terminal now:$ sudo mbimcli -d /dev/wwan0mbim0 --query-device-services -p$ sudo mbimcli -d /dev/wwan0mbim0 --quectel-query-fcc-unlock -p
That would be still a bit different, but more similar to what we can see in the original log. If that doesn't work, I'll add the implicit device services query in the same fcc unlock operation itself.
sudo mbimcli -d /dev/wwan0mbim0 --quectel-query-fcc-unlock -p[/dev/wwan0mbim0] Radio state retrieved after FCC unlock: Hardware radio state: 'unknown' Software radio state: 'off'
output of mbim-proxy After trying to connect via modemmanager(failing):
[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002d] forwarding request to device: basic-connect, query, radio-state[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 48<<<<<< data = 03:00:00:00:30:00:00:00:49:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:00:00:00:00:00:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 48<<<<<< type = command (0x00000003)<<<<<< transaction = 73<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'query' (0x00000000)[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 56>>>>>> data = 03:00:00:80:38:00:00:00:49:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:00:00:00:00:08:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 56>>>>>> type = command-done (0x80000003)>>>>>> transaction = 73>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)>>>>>> Fields:>>>>>> HwRadioState = 'on'>>>>>> SwRadioState = 'off'[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002d] response from device received[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002e] forwarding request to device: basic-connect, set, radio-state[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 52<<<<<< data = 03:00:00:00:34:00:00:00:4A:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:04:00:00:00:01:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 52<<<<<< type = command (0x00000003)<<<<<< transaction = 74<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< RadioState = 'on'[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:4A:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 74>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'Busy' (0x00000001)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002e] response from device received[21 de set. 2021, 10:41:56] [Debug] [client 5,0x00000029] forwarding request to device: qmi, set, msg[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 61<<<<<< data = 03:00:00:00:3D:00:00:00:4B:00:00:00:01:00:00:00:00:00:00:00:D1:A3:0B:C2:F9:7A:6E:43:BF:65:C7:E2:4F:B0:F0:D3:01:00:00:00:01:00:00:00:0D:00:00:00:01:0C:00:00:02:01:00:07:00:5F:55:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 61<<<<<< type = command (0x00000003)<<<<<< transaction = 75<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'qmi' (d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3)<<<<<< cid = 'msg' (0x00000001)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< QmiMsg = '01:0c:00:00:02:01:00:07:00:5f:55:00:00'[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 68>>>>>> data = 03:00:00:80:44:00:00:00:4B:00:00:00:01:00:00:00:00:00:00:00:D1:A3:0B:C2:F9:7A:6E:43:BF:65:C7:E2:4F:B0:F0:D3:01:00:00:00:00:00:00:00:14:00:00:00:01:13:00:80:02:01:02:07:00:5F:55:07:00:02:04:00:01:00:39:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 68>>>>>> type = command-done (0x80000003)>>>>>> transaction = 75>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'qmi' (d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3)>>>>>> cid = 'msg' (0x00000001)>>>>>> Fields:>>>>>> QMUX = '01:13:00:80:02:01:02:07:00:5f:55:07:00:02:04:00:01:00:39:00'[21 de set. 2021, 10:41:56] [Debug] [client 5,0x00000029] response from device received[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002f] forwarding request to device: basic-connect, set, radio-state[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 52<<<<<< data = 03:00:00:00:34:00:00:00:4C:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:04:00:00:00:01:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 52<<<<<< type = command (0x00000003)<<<<<< transaction = 76<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< RadioState = 'on'[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:4C:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:56] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 76>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'Busy' (0x00000001)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)[21 de set. 2021, 10:41:56] [Debug] [client 4,0x0000002f] response from device received[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000030] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000030] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000031] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000031] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000032] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000032] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000033] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000033] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000034] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000034] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000035] forwarding request to device: basic-connect, query, radio-state[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 48<<<<<< data = 03:00:00:00:30:00:00:00:4D:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:00:00:00:00:00:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 48<<<<<< type = command (0x00000003)<<<<<< transaction = 77<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'query' (0x00000000)[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 56>>>>>> data = 03:00:00:80:38:00:00:00:4D:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:00:00:00:00:08:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 56>>>>>> type = command-done (0x80000003)>>>>>> transaction = 77>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)>>>>>> Fields:>>>>>> HwRadioState = 'on'>>>>>> SwRadioState = 'off'[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000035] response from device received[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000036] forwarding request to device: basic-connect, set, radio-state[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 52<<<<<< data = 03:00:00:00:34:00:00:00:4E:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:04:00:00:00:01:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 52<<<<<< type = command (0x00000003)<<<<<< transaction = 78<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< RadioState = 'on'[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:4E:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 78>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'Busy' (0x00000001)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000036] response from device received[21 de set. 2021, 10:41:57] [Debug] [client 5,0x0000002a] forwarding request to device: qmi, set, msg[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 61<<<<<< data = 03:00:00:00:3D:00:00:00:4F:00:00:00:01:00:00:00:00:00:00:00:D1:A3:0B:C2:F9:7A:6E:43:BF:65:C7:E2:4F:B0:F0:D3:01:00:00:00:01:00:00:00:0D:00:00:00:01:0C:00:00:02:01:00:08:00:5F:55:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 61<<<<<< type = command (0x00000003)<<<<<< transaction = 79<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'qmi' (d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3)<<<<<< cid = 'msg' (0x00000001)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< QmiMsg = '01:0c:00:00:02:01:00:08:00:5f:55:00:00'[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 68>>>>>> data = 03:00:00:80:44:00:00:00:4F:00:00:00:01:00:00:00:00:00:00:00:D1:A3:0B:C2:F9:7A:6E:43:BF:65:C7:E2:4F:B0:F0:D3:01:00:00:00:00:00:00:00:14:00:00:00:01:13:00:80:02:01:02:08:00:5F:55:07:00:02:04:00:01:00:39:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 68>>>>>> type = command-done (0x80000003)>>>>>> transaction = 79>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'qmi' (d1a30bc2-f97a-6e43-bf65-c7e24fb0f0d3)>>>>>> cid = 'msg' (0x00000001)>>>>>> Fields:>>>>>> QMUX = '01:13:00:80:02:01:02:08:00:5f:55:07:00:02:04:00:01:00:39:00'[21 de set. 2021, 10:41:57] [Debug] [client 5,0x0000002a] response from device received[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000037] forwarding request to device: basic-connect, set, radio-state[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 52<<<<<< data = 03:00:00:00:34:00:00:00:50:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:04:00:00:00:01:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 52<<<<<< type = command (0x00000003)<<<<<< transaction = 80<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)<<<<<< cid = 'radio-state' (0x00000003)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< RadioState = 'on'[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:50:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:03:00:00:00:01:00:00:00:00:00:00:00[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 80>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'Busy' (0x00000001)>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'radio-state' (0x00000003)[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000037] response from device received[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000038] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000038] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000039] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x00000039] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003a] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003a] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003b] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003b] service subscribe list update in device not needed[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003c] request to update service subscribe list received[21 de set. 2021, 10:41:57] [Debug] [client 4] service subscribe list built[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merging client service subscribe lists...[21 de set. 2021, 10:41:57] [Debug] [/dev/wwan0mbim0] merged service subscribe list not updated[21 de set. 2021, 10:41:57] [Debug] [client 4,0x0000003c] service subscribe list update in device not needed[21 de set. 2021, 10:41:59] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 144>>>>>> data = 07:00:00:80:90:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:02:00:00:00:64:00:00:00:01:00:00:00:1C:00:00:00:1E:00:00:00:3C:00:00:00:28:00:00:00:00:00:00:00:00:00:00:00:32:00:31:00:34:00:30:00:36:00:30:00:36:00:31:00:32:00:38:00:35:00:37:00:36:00:30:00:34:00:00:00:38:00:39:00:33:00:34:00:35:00:37:00:31:00:30:00:30:00:32:00:31:00:30:00:32:00:33:00:37:00:36:00:30:00:34:00:30:00:46:00[21 de set. 2021, 10:41:59] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 144>>>>>> type = indicate-status (0x80000007)>>>>>> transaction = 0>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'subscriber-ready-status' (0x00000002)>>>>>> Fields:>>>>>> ReadyState = 'initialized'>>>>>> SubscriberId = '214060612857604'>>>>>> SimIccId = '8934571002102376040F'>>>>>> ReadyInfo = 'none'>>>>>> TelephoneNumbersCount = '0'>>>>>> TelephoneNumbers = ''
@aleksm On Ubuntu 21.10 preview + 5.14.6-generic-amd64 Ubuntu PPA kernel, the code doesn't work. (build with the source on master)
$ mbimcli --helpmbimcli: symbol lookup error: mbimcli: undefined symbol: mbim_message_ms_sar_config_set_new
That is a broken build I'm afraid. I would bet you built the project without specifying --prefix and so everything is installed in /usr/local, and when you don't specify a full path, the mbimcli is taken from /usr/local/bin (in Ubuntu, which has this IMO broken thing of having that in the PATH) BUT the libmbim library is taking from /usr/lib instead. Please see this page for more details on that specific build issue: https://modemmanager.org/docs/faq/#can-the-projects-be-installed-in-usrlocal-instead-of-usr
The fix is simple, just use --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu in configure, the make and sudo make install, and that will overwrite the system-installed libmbim package.
Or if you don't want to overwrite and keep everything under /usr/local, then you need to use LD_LIBRARY_PATH as explained in the link above.
That is a broken build I'm afraid. I would bet you built the project without specifying --prefix and so everything is installed in /usr/local, and when you don't specify a full path, the mbimcli is taken from /usr/local/bin (in Ubuntu, which has this IMO broken thing of having that in the PATH) BUT the libmbim library is taking from /usr/lib instead. Please see this page for more details on that specific build issue: https://modemmanager.org/docs/faq/#can-the-projects-be-installed-in-usrlocal-instead-of-usr
The fix is simple, just use --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu in configure, the make and sudo make install, and that will overwrite the system-installed libmbim package.
Or if you don't want to overwrite and keep everything under /usr/local, then you need to use LD_LIBRARY_PATH as explained in the link above.
On Ubuntu 21.10 preview + 5.14.6-generic-amd64 Ubuntu PPA kernel, linking problem is still sticky. (both on 'master' source with meson builddir --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu; cd builddir; ninja; sudo ninja install and '1.26' source with ./autogen.sh; ./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu; make; sudo make install)
Oh, I was dumb :(
Now it executes something, but it fails in the same manner as @joar 's solution, I think. (something with mbim-proxy)
$ sudo mbimcli -d /dev/wwan0mbim0 -p -v --quectel-query-fcc-unlock[21 9월 2021, 23:45:26] [Debug] opening device...[21 9월 2021, 23:45:26] [Debug] cannot connect to proxy: Could not connect: Connection refused[21 9월 2021, 23:45:26] [Debug] spawning new mbim-proxy (try 1)...[21 9월 2021, 23:45:26] [Debug] [/dev/wwan0mbim0] Couldn't find descriptors file, possibly not using cdc_mbim[21 9월 2021, 23:45:26] [Debug] [/dev/wwan0mbim0] Fallback to default max control message size: 4096[21 9월 2021, 23:45:26] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 92<<<<<< data = 03:00:00:00:5C:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:01:00:00:00:2C:00:00:00:0C:00:00:00:1E:00:00:00:1E:00:00:00:2F:00:64:00:65:00:76:00:2F:00:77:00:77:00:61:00:6E:00:30:00:6D:00:62:00:69:00:6D:00:30:00:00:00[21 9월 2021, 23:45:26] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 92<<<<<< type = command (0x00000003)<<<<<< transaction = 1<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)<<<<<< cid = 'configuration' (0x00000001)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< DevicePath = '/dev/wwan0mbim0'<<<<<< Timeout = '30'[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:00:00:00:00:00:00:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 1>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)>>>>>> cid = 'configuration' (0x00000001)[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 16<<<<<< data = 01:00:00:00:10:00:00:00:02:00:00:00:00:10:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 16<<<<<< type = open (0x00000001)<<<<<< transaction = 2<<<<<< Contents:<<<<<< max control transfer = 4096[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 16>>>>>> data = 01:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00[21 9월 2021, 23:45:27] [Debug] MBIM Device at '/dev/wwan0mbim0' ready[21 9월 2021, 23:45:27] [Debug] Asynchronously running FCC unlock...[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 48<<<<<< data = 03:00:00:00:30:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:00:00:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 48<<<<<< type = command (0x00000003)<<<<<< transaction = 3<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'quectel' (11223344-5566-7788-99aa-bbccddeeff11)<<<<<< cid = 'fcc-unlock' (0x00000001)<<<<<< type = 'query' (0x00000000)[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 180>>>>>> data = 07:00:00:80:B4:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:02:00:00:00:88:00:00:00:01:00:00:00:40:00:00:00:1E:00:00:00:60:00:00:00:28:00:00:00:00:00:00:00:01:00:00:00:24:00:00:00:1A:00:00:00:2B:00:38:00:32:00:31:00:30:00:37:00:33:00:39:00:34:00:37:00:33:00:33:00:30:00:00:00:34:00:35:00:30:00:30:00:38:00:30:00:31:00:32:00:30:00:30:00:39:00:31:00:34:00:35:00:33:00:00:00:38:00:39:00:38:00:32:00:33:00:30:00:31:00:32:00:32:00:30:00:30:00:30:00:30:00:36:00:31:00:34:00:35:00:33:00:38:00:46:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 180>>>>>> type = indicate-status (0x80000007)>>>>>> transaction = 0>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)>>>>>> cid = 'subscriber-ready-status' (0x00000002)>>>>>> Fields:>>>>>> ReadyState = 'initialized'>>>>>> SubscriberId = '450080120091453'>>>>>> SimIccId = '8982301220000614538F'>>>>>> ReadyInfo = 'none'>>>>>> TelephoneNumbersCount = '1'>>>>>> TelephoneNumbers = '+821073947330'[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 52>>>>>> data = 03:00:00:80:34:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:04:00:00:00:04:00:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 52>>>>>> type = command-done (0x80000003)>>>>>> transaction = 3>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'quectel' (11223344-5566-7788-99aa-bbccddeeff11)>>>>>> cid = 'fcc-unlock' (0x00000001)>>>>>> Fields:>>>>>> HwRadioState = '(null)'>>>>>> SwRadioState = 'off'[/dev/wwan0mbim0] Radio state retrieved after FCC unlock: Hardware radio state: 'unknown' Software radio state: 'off'[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 12<<<<<< data = 02:00:00:00:0C:00:00:00:04:00:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 12<<<<<< type = close (0x00000002)<<<<<< transaction = 4[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 16>>>>>> data = 02:00:00:80:10:00:00:00:04:00:00:00:00:00:00:00[21 9월 2021, 23:45:27] [Debug] [/dev/wwan0mbim0] channel destroyed[21 9월 2021, 23:45:27] [Debug] Device closed
Is there something I'm missing about the Ubuntu's default 5.14.6 kernel or missing kernel modules, or settings about linking with mbim2sar.so from the snap package?
@aleksm After sudo modprobe cdc_mbim, now there's no mbim-proxy error:
$ sudo mbimcli -d /dev/wwan0mbim0 -p -v --quectel-query-fcc-unlock[21 9월 2021, 23:57:10] [Debug] opening device...[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Couldn't find descriptors file, possibly not using cdc_mbim[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Fallback to default max control message size: 4096[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 92<<<<<< data = 03:00:00:00:5C:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:01:00:00:00:2C:00:00:00:0C:00:00:00:1E:00:00:00:1E:00:00:00:2F:00:64:00:65:00:76:00:2F:00:77:00:77:00:61:00:6E:00:30:00:6D:00:62:00:69:00:6D:00:30:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 92<<<<<< type = command (0x00000003)<<<<<< transaction = 1<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)<<<<<< cid = 'configuration' (0x00000001)<<<<<< type = 'set' (0x00000001)<<<<<< Fields:<<<<<< DevicePath = '/dev/wwan0mbim0'<<<<<< Timeout = '30'[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 48>>>>>> data = 03:00:00:80:30:00:00:00:01:00:00:00:01:00:00:00:00:00:00:00:83:8C:F7:FB:8D:0D:4D:7F:87:1E:D7:1D:BE:FB:B3:9B:01:00:00:00:00:00:00:00:00:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 48>>>>>> type = command-done (0x80000003)>>>>>> transaction = 1>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'proxy-control' (838cf7fb-8d0d-4d7f-871e-d71dbefbb39b)>>>>>> cid = 'configuration' (0x00000001)[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 16<<<<<< data = 01:00:00:00:10:00:00:00:02:00:00:00:00:10:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 16<<<<<< type = open (0x00000001)<<<<<< transaction = 2<<<<<< Contents:<<<<<< max control transfer = 4096[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 16>>>>>> data = 01:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00[21 9월 2021, 23:57:10] [Debug] MBIM Device at '/dev/wwan0mbim0' ready[21 9월 2021, 23:57:10] [Debug] Asynchronously running FCC unlock...[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 48<<<<<< data = 03:00:00:00:30:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:00:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 48<<<<<< type = command (0x00000003)<<<<<< transaction = 3<<<<<< Fragment header:<<<<<< total = 1<<<<<< current = 0<<<<<< Contents:<<<<<< service = 'quectel' (11223344-5566-7788-99aa-bbccddeeff11)<<<<<< cid = 'fcc-unlock' (0x00000001)<<<<<< type = 'query' (0x00000000)[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 52>>>>>> data = 03:00:00:80:34:00:00:00:03:00:00:00:01:00:00:00:00:00:00:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:11:01:00:00:00:00:00:00:00:04:00:00:00:01:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message (translated)...>>>>>> Header:>>>>>> length = 52>>>>>> type = command-done (0x80000003)>>>>>> transaction = 3>>>>>> Fragment header:>>>>>> total = 1>>>>>> current = 0>>>>>> Contents:>>>>>> status error = 'None' (0x00000000)>>>>>> service = 'quectel' (11223344-5566-7788-99aa-bbccddeeff11)>>>>>> cid = 'fcc-unlock' (0x00000001)>>>>>> Fields:>>>>>> HwRadioState = 'on'>>>>>> SwRadioState = 'off'[/dev/wwan0mbim0] Radio state retrieved after FCC unlock: Hardware radio state: 'on' Software radio state: 'off'[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message...<<<<<< RAW:<<<<<< length = 12<<<<<< data = 02:00:00:00:0C:00:00:00:04:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Sent message (translated)...<<<<<< Header:<<<<<< length = 12<<<<<< type = close (0x00000002)<<<<<< transaction = 4[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] Received message...>>>>>> RAW:>>>>>> length = 16>>>>>> data = 02:00:00:80:10:00:00:00:04:00:00:00:00:00:00:00[21 9월 2021, 23:57:10] [Debug] [/dev/wwan0mbim0] channel destroyed[21 9월 2021, 23:57:10] [Debug] Device closed
But what should I do now? I heard that mhi_pci_generic on the kernel > 5.13 does the job, but I cannot see any option to configure the WWAN.
I got a strace from @aleixq and what I can see is that the program reads these two files just before running the lock query command I added as --quectel-query-fcc-unlock:
I would have said that reading those files would be in order to perform the lenovo platform check (i.e. so that the unlock tool works only on lenovo setups); but maybe they have something to do with the unlock process itself?
I believe FccUnlock indirectly reads smbios_entry_point in order to fetch the KHOIHGIUCCHHII string, but from what I can see in mbim2sar.so, the KHOIHGIUCCHHII string is never used, in fact, KHOIHGIUCCHHII is assigned to a local char * FOO, but the next thing that happens is that FOO = get_time(). I'm not proficient enough in C/assembly to judge whether that's an underhanded C thing or if it's just the compiler optimizing away an unused variable.
I would say it's the latter. My assumption is that the DMI table read is just to validate whether the system is a Lenovo setup, i.e. so that the FCC unlock is not run in other systems.
after which modem initialization and connection worked. You need to make sure that you supply the correct pkg-config paths to meson, or the tools will link against your system's versions of the libs.
That's definitely a step in the right direction, but of course there's still plenty of work to do. If I can spare some time I might be able to try to take the buildscripts from Ubuntu's versions of things to create custom .debs for the patched versions of the packages.
Maybe I mess something with old libs in my system, I will check too that all these libs are correctly picked, repackaging everything in arch to be sure that I have at least the commits that @tehplague is using.
If I can get everything ordered and working as @tehplague I'll share the PKGBUILDs used to test in archlinux systems too.