QMI via MBIM for "FCC Authentication" fix

Bjørn Mork bjorn at mork.no
Mon Apr 4 14:23:31 UTC 2016

Aleksander Morgado <aleksander at aleksander.es> writes:

> On Sat, Apr 2, 2016 at 10:13 PM, Bjørn Mork <bjorn at mork.no> wrote:
>>> How far did you get with that Collin?
>> I believe the posted patches were functional, but there were some
>> outstanding questions on how to properly integrate it in
>> MM/libmbim/libqmi.  Is that correct, Aleksander?
> Yes, that's right. Anyway, if someone is up to polishing those patches
> and integrating them in libmbim sources directly, even if not perfect,
> I think it would be good not to forget about them. I kind of already
> forgot about them myself :)

This isn't really polishing... Rather the contrary ;)

The attached patch set is a sort of working proof-of-concept.  It needs
to be cleaned up by someone understanding all the G-stuff :) And it
should have a lot more error checking.  Testing for EXT_QMUX support
instead of timing out would be nice for example.  And the library
integration could be made nicer.  Maybe dynamically loading libmbim from
libqmi to prevent the hard dependency?

The libmbim patch is Collin's latest version with only context changes.

The remaining two libqmi patches provide generic QMI access over MBIM.
FCC auth is only one possibility.  Many other QMI requests work too:

nemi:/home/bjorn# /usr/local/src/git/libqmi/src/qmicli/qmicli -p  --device-open-mbim -d /dev/cdc-wdm0 --nas-get-system-selection-preference
[/dev/cdc-wdm0] Successfully got system selection preference
        Emergency mode: 'no'
        Mode preference: 'umts, lte'
        Band preference: 'wcdma-2100, wcdma-pcs-1900, wcdma-dcs-1800, wcdma-1700-us, wcdma-850-us, wcdma-900'
        LTE band preference: '1, 2, 3, 4, 5, 7, 8, 12, 13, 20, 25, 41'
        TD-SCDMA band preference: '(null)'
        Roaming preference: 'any'
        Network selection preference: 'automatic'
        Service domain preference: 'cs-ps'
        Service selection preference: 'automatic'
nemi:/home/bjorn# /usr/local/src/git/libqmi/src/qmicli/qmicli -p  --device-open-mbim -d /dev/cdc-wdm0   --nas-get-lte-cphy-ca-info
[/dev/cdc-wdm0] Successfully got carrier aggregation info
DL Bandwidth: '20'
Secondary Cell Info
        Physical Cell ID: '101'
        TX Channel: '3050'
        DL Bandwidth: '20'
        LTE Band: 'eutran-7'
        State: 'deconfigured'
Primary Cell Info
        Physical Cell ID: '299'
        TX Channel: '1450'
        DL Bandwidth: '20'
        LTE Band: 'eutran-3'
Secondary Cell index: '1'

The above was done while the modem was in MBIM mode:

bjorn at nemi:/tmp/lpmutil$ mmcli -m 5 

/org/freedesktop/ModemManager1/Modem/5 (device id '0edccfb793fd041c51235669ecdb8bebfbb9b540')
  Hardware |   manufacturer: 'Sierra'
           |          model: 'MBIM [1199:9071]'
           |       revision: 'SWI9X30C_02.08.02.00'
           |      supported: 'gsm-umts, lte'
           |        current: 'gsm-umts, lte'
           |   equipment id: '359072060005556'
  System   |         device: '/sys/devices/pci0000:00/0000:00:1d.7/usb4/4-4'
           |        drivers: 'qcserial, cdc_mbim'
           |         plugin: 'Sierra'
           |   primary port: 'cdc-wdm0'
           |          ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (mbim), wwan0 (net)'
  Numbers  |           own : 'unknown'
  Status   |           lock: 'none'
           | unlock retries: 'sim-puk2 (10)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'lte'
           | signal quality: '51' (recent)
  Modes    |      supported: 'allowed: 3g, 4g; preferred: none'
           |        current: 'allowed: 3g, 4g; preferred: none'
  Bands    |      supported: 'unknown'
           |        current: 'unknown'
  IP       |      supported: 'ipv4, ipv6, ipv4v6'
  3GPP     |           imei: '359072060005556'
           |  enabled locks: 'sim, fixed-dialing'
           |    operator id: '24201'
           |  operator name: 'TELENOR'
           |   subscription: 'unknown'
           |   registration: 'home'
  SIM      |           path: '/org/freedesktop/ModemManager1/SIM/5'

  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/3'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-QMI-via-MBIM.patch
Type: text/x-diff
Size: 19991 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20160404/56c2be9b/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libqmi-support-MBIM-EXT_QMUX-service.patch
Type: text/x-diff
Size: 11347 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20160404/56c2be9b/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-qmicli-support-MBIM-EXT_QMUX-devices.patch
Type: text/x-diff
Size: 1856 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libmbim-devel/attachments/20160404/56c2be9b/attachment-0005.patch>

More information about the libmbim-devel mailing list