Cinterion MV31-W modem support

ROSTANSKI Tomasz tomasz.rostanski at thalesgroup.com
Thu Jul 29 11:18:16 UTC 2021


Hi Aleksander,

I have modified the plugin as suggested.
There's some progress but no success yet.

I have started Modem Manager, then executed (we're running on openwrt with no udev):
mmcli --report-kernel-event="action=add,subsystem=wwan,name=wwan0mbim0"

And then observed that Modem Manager tried talking to modem using QMI first and them MBIM but without success. The log is below.

Thanks,
Tomasz

root at OpenWrt:~# ls /dev/wwan*
/dev/wwan0at0    /dev/wwan0mbim0

[7442]: <debug> [base-manager] kernel event reported:
[7442]: <debug> [base-manager]   action:    add
[7442]: <debug> [base-manager]   subsystem: wwan
[7442]: <debug> [base-manager]   name:      wwan0mbim0
[7442]: <debug> [base-manager]   uid:       n/a
[7442]: <debug> [wwan0mbim0] preloading contents and properties...
[7442]: <debug> [wwan0mbim0] sysfs path: /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0/0002:58:00.0/mhi0/wwan/wwan0/wwan0mbim0
[7442]: <debug> [wwan0mbim0] port contents loaded:
[7442]: <debug> [wwan0mbim0]   bus: pci
[7442]: <debug> [wwan0mbim0]   device: /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0
[7442]: <debug> [wwan0mbim0]   subsystems: wwan, mhi, pci
[7442]: <debug> [wwan0mbim0]   drivers: mhi-pci-generic, pcieport
[7442]: <debug> [wwan0mbim0]   vendor: 177d
[7442]: <debug> [wwan0mbim0]   product: a22d
[7442]: <debug> [wwan0mbim0]   revision: 0002
[7442]: <debug> [wwan0mbim0]   ID_VENDOR_ID: 0x177d
[7442]: <debug> [wwan0mbim0]   ID_MODEL_ID: 0xa22d
[7442]: <debug> [wwan0mbim0]   ID_REVISION: 0x0002
[7442]: <debug> [wwan0mbim0] property added: ID_MM_CANDIDATE=1
[7442]: <warn>  [wwan0mbim0] unknown match condition parameter: ATTR{type}
[7442]: <warn>  [wwan0mbim0] unknown match condition parameter: ATTR{type}
[7442]: <warn>  [wwan0mbim0] unknown match condition parameter: ATTR{type}
[7442]: <warn>  [wwan0mbim0] unknown match condition parameter: ATTR{type}
[7442]: <warn>  [wwan0mbim0] unknown match condition parameter: ATTR{type}
[7442]: <warn>  [wwan0mbim0] invalid pattern in rule '*MBIM': Error while compiling regular expression *MBIM at char 0: nothing to repeat
[7442]: <warn>  [wwan0mbim0] invalid pattern in rule '*QMI': Error while compiling regular expression *QMI at char 0: nothing to repeat
[7442]: <warn>  [wwan0mbim0] invalid pattern in rule '*AT': Error while compiling regular expression *AT at char 0: nothing to repeat
[7442]: <warn>  [wwan0mbim0] invalid pattern in rule '*QCDM': Error while compiling regular expression *QCDM at char 0: nothing to repeat
[7442]: <warn>  [wwan0mbim0] invalid pattern in rule '*FIREHOSE': Error while compiling regular expression *FIREHOSE at char 0: nothing to repeat
[7442]: <debug> [base-manager] adding port wwan0mbim0 at sysfs path: /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0/0002:58:00.0/mhi0/wwan/wwan0/wwan0mbim0
[7442]: <debug> [filter] (wwan/wwan0mbim0) port allowed: wwan device
[7442]: <debug> [base-manager] port wwan0mbim0 is first in device /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0
[7442]: <debug> [plugin-manager] task 2: new support task for device: /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0
[7442]: <debug> [plugin-manager] task 2: port grabbed: wwan0mbim0
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: new support task for port
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: deferred until min wait time elapsed
[7442]: <debug> [plugin-manager] task 2: min wait time elapsed
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: found '3' plugins to try
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: will try with plugin 'quectel'
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: will try with plugin 'cinterion'
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: will try with plugin 'generic'
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: started
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: checking with plugin 'quectel'
[7442]: <debug> [plugin/quectel] probes required for port wwan0mbim0: 'at, at-vendor, qcdm, qmi, mbim'
[7442]: <debug> [wwan0mbim0/probe] launching port probing: 'at, at-vendor, qcdm, qmi, mbim'
[7442]: <debug> [plugin-manager] task 2: extra probing time elapsed
[7442]: <debug> [plugin-manager] task 2: still 1 running probes (1 active): wwan0mbim0
[7442]: <debug> [wwan0mbim0/at] opening serial port...
[7442]: <debug> [wwan0mbim0/at] device open count is 1 (open)
[7442]: <debug> [wwan0mbim0/at] --> 'AT<CR><LF>'
[7442]: <debug> [plugin-manager] task 2: min probing time elapsed
[7442]: <debug> [plugin-manager] task 2: still 1 running probes (1 active): wwan0mbim0
[7442]: <debug> [wwan0mbim0/at] --> 'AT<CR><LF>'
[7442]: <debug> [wwan0mbim0/at] --> 'AT<CR><LF>'
[7442]: <debug> [wwan0mbim0/probe] port is not AT-capable
[7442]: <debug> [wwan0mbim0/probe] probing QCDM...
[7442]: <debug> [wwan0mbim0/at] device open count is 0 (close)
[7442]: <debug> [wwan0mbim0/at] closing serial port...
[7442]: <debug> [wwan0mbim0/at] serial port closed
[7442]: <debug> [wwan0mbim0/at] forced to close port
[7442]: <debug> [wwan0mbim0/qcdm] opening serial port...
[7442]: <debug> [wwan0mbim0/qcdm] device open count is 1 (open)
[7442]: <debug> [wwan0mbim0/qcdm] --> 7e 00 78 f0 7e
[7442]: <debug> [wwan0mbim0/qcdm] --> 7e 00 78 f0 7e
[7442]: <debug> [wwan0mbim0/probe] port is not QCDM-capable
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: checking with plugin 'cinterion'
[7442]: <debug> [plugin/cinterion] subsystem wwan match
[7442]: <debug> [plugin/cinterion] port wwan0mbim0 matched pre filters
[7442]: <debug> [plugin/cinterion] probes required for port wwan0mbim0: 'at, at-vendor, qmi, mbim'
[7442]: <debug> [wwan0mbim0/probe] launching port probing: 'qmi, mbim'
[7442]: <debug> [wwan0mbim0/qcdm] device open count is 0 (close)
[7442]: <debug> [wwan0mbim0/qcdm] closing serial port...
[7442]: <debug> [wwan0mbim0/qcdm] serial port closed
[7442]: <debug> [wwan0mbim0/qcdm] forced to close port
[7442]: <debug> [wwan0mbim0/probe] probing QMI...
[7442]: <debug> [wwan0mbim0/qmi] Opening QMI device...
[7442]: <debug> [wwan0mbim0/qmi] Checking if QMI device already opening...
[7442]: <debug> [wwan0mbim0/qmi] Checking if QMI device already open...
[7442]: <debug> [wwan0mbim0/qmi] Creating QMI device...
[7442]: <debug> [wwan0mbim0/qmi] Opening device with flags: version-info, proxy...
[7442]: [/dev/wwan0mbim0] Opening device with flags 'version-info, proxy'...
[7442]: [/dev/wwan0mbim0] requested QMI mode but unexpected transport type found
[7442]: [/dev/wwan0mbim0] created endpoint
[7442]: cannot connect to proxy: Could not connect: Connection refused
[7442]: spawning new qmi-proxy (try 1)...
[7442]: [/dev/wwan0mbim0] Sent message...
<<<<<< RAW:
<<<<<<   length = 30
<<<<<<   data   = 01:1D:00:00:00:00:00:01:00:FF:12:00:01:0F:00:2F:64:65:76:2F:77:77:61:6E:30:6D:62:69:6D:30
[7442]: [/dev/wwan0mbim0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<<   length  = 29
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 18
<<<<<<   message     = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<<   type       = "Device Path" (0x01)
<<<<<<   length     = 15
<<<<<<   value      = 2F:64:65:76:2F:77:77:61:6E:30:6D:62:69:6D:30
<<<<<<   translated = /dev/wwan0mbim0
[7442]: [/dev/wwan0mbim0] Received message...
<<<<<< RAW:
<<<<<<   length = 19
<<<<<<   data   = 01:12:00:80:00:00:01:01:00:FF:07:00:02:04:00:00:00:00:00
[7442]: [/dev/wwan0mbim0] Received generic response (translated)...
<<<<<< QMUX:
<<<<<<   length  = 18
<<<<<<   flags   = 0x80
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "response"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 7
<<<<<<   message     = "Internal Proxy Open" (0xFF00)
<<<<<< TLV:
<<<<<<   type       = "Result" (0x02)
<<<<<<   length     = 4
<<<<<<   value      = 00:00:00:00
<<<<<<   translated = SUCCESS
[7442]: [/dev/wwan0mbim0] Checking version info (45 retries)...
[7442]: [/dev/wwan0mbim0] Sent message...
<<<<<< RAW:
<<<<<<   length = 12
<<<<<<   data   = 01:0B:00:00:00:00:00:02:21:00:00:00
[7442]: [/dev/wwan0mbim0] Sent generic request (translated)...
<<<<<< QMUX:
<<<<<<   length  = 11
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 2
<<<<<<   tlv_length  = 0
<<<<<<   message     = "Get Version Info" (0x0021)
[7442]: transaction 0x2 aborted, but message is not abortable
...
[7442]: <debug> [wwan0mbim0/qmi] QMI port open operation failed: Transaction timed out
[7442]: <debug> [wwan0mbim0/probe] error checking QMI support: Transaction timed out
[7442]: <debug> [wwan0mbim0/probe] port is not QMI-capable
[7442]: <debug> [wwan0mbim0/probe] probing MBIM...
[7442]: opening device...
[7442]: cannot connect to proxy: Could not connect: Connection refused
[7442]: spawning new mbim-proxy (try 1)...
[7442]: [/dev/wwan0mbim0] Couldn't find descriptors file, possibly not using cdc_mbim
[7442]: [/dev/wwan0mbim0] Fallback to default max control message size: 4096
[7442]: [/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:2D: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
[7442]: [/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 = '45'
[7442]: proxy configuration failed: closed
[7442]: <debug> [wwan0mbim0/probe] error checking MBIM support: Transaction timed out
[7442]: <debug> [wwan0mbim0/probe] port is not MBIM-capable
[7442]: [/dev/wwan0mbim0] channel destroyed
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: checking with plugin 'generic'
[7442]: <debug> [plugin/generic] subsystem wwan match
[7442]: <debug> [plugin/generic] port wwan0mbim0 matched pre filters
[7442]: <debug> [plugin/generic] probes required for port wwan0mbim0: 'at, qcdm, qmi, mbim'
[7442]: <debug> [wwan0mbim0/probe] port probing finished: no more probings needed
[7442]: <debug> [plugin/generic] port wwan0mbim0 matched post filters
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: found best plugin for port (generic)
[7442]: <debug> [plugin-manager] task 2,wwan0mbim0: finished in '107.328048' seconds
[7442]: <debug> [plugin-manager] task 2: no more ports to probe
[7442]: <debug> [plugin-manager] task 2: finished in '107.328514' seconds
[7442]: <info>  [device /sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0] creating modem with plugin 'generic' and '1' ports
[7442]: <debug> [plugin/generic] subsystem wwan match
[7442]: <warn>  [plugin/generic] could not grab port wwan0mbim0: Cannot add port 'wwan/wwan0mbim0', unhandled port type
[7442]: <debug> [modem0] completely disposed
[7442]: <warn>  [base-manager] couldn't create modem for device '/sys/devices/platform/soc at 0/884057000000.pci/pci0002:57/0002:57:00.0': Failed to find primary AT port

-----Original Message-----
From: Aleksander Morgado <aleksander at aleksander.es> 
Sent: Thursday, July 29, 2021 12:01 PM
To: ROSTANSKI Tomasz <tomasz.rostanski at thalesgroup.com>
Cc: modemmanager-devel at lists.freedesktop.org
Subject: Re: Cinterion MV31-W modem support

Hey Tomasz,

> We do have a Cinterion MV31-W PCIe (MHI) modem (SGX55 based) and would like to use Modem Manager to control it.
>
> We have mhi, mhi_pci_generic, mhi_net and mhi_wwan_ctrl modules 
> loaded. The modem is detected, /dev/wwan0at0 and /dev/wwan0mbim0 
> devices are created,
>
> mhi_mbim0 network interface is present.
>
> The modem is visible on PCI bus with vendor id 0x1269 and device id 0x00b3.
>
> The first thought was that we have to whitelist the vendor id in the Modem Manager, but it doesn’t seem to help.
>
> Any guidelines will be really appreciated.
>

You need to modify the Cinterion plugin to add the PCI vendor ID in MM_PLUGIN_ALLOWED_VENDOR_STRINGS, and the "wwan" subsystem in MM_PLUGIN_ALLOWED_SUBSYSTEMS. Look at plugins/quectel/mm-plugin-quectel.c for an example of how to do that.

--
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list