Bug 91351

Summary: MBIM doesn't handle CDMA capabilities well
Product: ModemManager Reporter: Dan Williams <dcbw>
Component: generalAssignee: ModemManager bug user <modemmanager>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium    
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: altered mm-broadband-modem.c

Description Dan Williams 2015-07-15 16:58:49 UTC
When a modem like a Sierra EM7355 (or any MBIM-capable Gobi modem) exposes CDMA capabilities, MM tries to enable the 3GPP2 interface and fails because MBIM doesn't handle CDMA yet.

[/dev/cdc-wdm1] Device capabilities retrieved:
	      Device type: 'embedded'
	   Cellular class: 'gsm, cdma'
	      Voice class: 'no-voice'
	        Sim class: 'removable'
	       Data class: 'gprs, edge, umts, hsdpa, hsupa, 1xrtt, 1xevdo, 1xevdo-reva'
	         SMS caps: 'pdu-receive, pdu-send'
	        Ctrl caps: 'reg-manual, cdma-mobile-ip, cdma-simple-ip, multi-carrier'
	     Max sessions: '8'
	Custom data class: 'unknown'
	        Device ID: 'xxxxx'
	    Firmware info: 'SWI9X15C_05.05'
	    Hardware info: 'EM7355'

[/dev/cdc-wdm1] Registration status:
	         Network error: 'unknown'
	        Register state: 'deregistered'
	         Register mode: 'automatic'
	Available data classes: 'unknown'
	Current cellular class: 'cdma'
	           Provider ID: 'unknown'
	         Provider name: 'unknown'
	          Roaming text: 'unknown'
	    Registration flags: 'packet-service-automatic-attach'

[/dev/cdc-wdm1] Registration status:
	         Network error: 'unknown'
	        Register state: 'searching'
	         Register mode: 'automatic'
	Available data classes: 'unknown'
	Current cellular class: 'gsm'
	           Provider ID: 'unknown'
	         Provider name: 'unknown'
	          Roaming text: 'unknown'
	    Registration flags: 'packet-service-automatic-attach'

mmcli -m 0 -e:
error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Connected: No AT port available to run command'

ModemManager[4421]: [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< Header:
<<<<<<   length      = 48
<<<<<<   type        = command (0x00000003)
<<<<<<   transaction = 18
<<<<<< Fragment header:
<<<<<<   total   = 1
<<<<<<   current = 0
<<<<<< Contents:
<<<<<<   service = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
<<<<<<   cid     = 'register-state' (0x00000009)
<<<<<<   type    = 'query' (0x00000000)
ModemManager[4421]: [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 96
>>>>>>   data   = 03:00:00:80:60:00:00:00:12: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:09:00:00:00:00:00:00:00:30:00:00:00:00:00:00:00:02:00:00:00:01:00:00:00:00:00:00:00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:02:00:00:00
ModemManager[4421]: [/dev/cdc-wdm1] Received message (translated)...
>>>>>> Header:
>>>>>>   length      = 96
>>>>>>   type        = command-done (0x80000003)
>>>>>>   transaction = 18
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   status error = 'None' (0x00000000)
>>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>>   cid          = 'register-state' (0x00000009)
ModemManager[4421]: <debug> [1436977958.922412] [mm-broadband-modem.c:8529] enabling_step(): Modem has CDMA capabilities, enabling the Modem CDMA interface...
ModemManager[4421]: <debug> [1436977958.922521] [mm-iface-modem-cdma.c:946] mm_iface_modem_cdma_run_registration_checks(): Running registration checks (CDMA1x: 'yes', EV-DO: 'yes')
ModemManager[4421]: <debug> [1436977958.922575] [mm-broadband-modem.c:7033] setup_registration_checks_context_complete_and_free(): Will skip all QCDM-based registration checks
ModemManager[4421]: <debug> [1436977958.922619] [mm-broadband-modem.c:7054] setup_registration_checks_context_complete_and_free(): Will skip generic detailed registration check, we don't have Sprint commands
ModemManager[4421]: <debug> [1436977958.922687] [mm-iface-modem-cdma.c:768] registration_check_step(): Starting QCDM-based registration checks
ModemManager[4421]: <debug> [1436977958.922732] [mm-iface-modem-cdma.c:780] registration_check_step():   Skipping all QCDM-based checks and falling back to AT-based checks
ModemManager[4421]: <debug> [1436977958.922772] [mm-iface-modem-cdma.c:823] registration_check_step(): Starting AT-based registration checks
ModemManager[4421]: <warn>  [1436977958.922841] [mm-iface-modem-cdma.c:641] get_service_status_ready(): Could not get service status: No AT port available to run command
ModemManager[4421]: <info>  [1436977958.922935] [mm-iface-modem.c:1203] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (enabling -> disabled)
Comment 1 Collin McMillan 2015-07-18 04:15:30 UTC
Created attachment 117216 [details]
altered mm-broadband-modem.c

It ain't pretty, but this file at least demonstrates the problem and a hacked solution.  CDMA is prevented from enabling.
Comment 2 Collin McMillan 2015-07-18 04:16:30 UTC
I can confirm this problem.  I downloaded the source package on Debian Testing (ModemManager 1.4.8) and removed the call to enable CDMA:
1) commented lines 8616 to 8622 from mm-broadband-modem.c
2) commented line 8495 from mm-broadband-modem.c

Then enabling the modem is successful:
# mmcli -m 0 -e

Plus I am able to connect using NetworkManager.



(
However, the bug with the EM7355 remaining in "low" power state still means I need to boot to Windows and warm-reboot to Linux:
https://mail.gnome.org/archives/networkmanager-list/2015-January/msg00095.html
https://bugzilla.kernel.org/show_bug.cgi?id=92101
)
Comment 3 GitLab Migration User 2018-06-10 09:05:04 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/62.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.