Skip to content

port-probe: detect XMMRPC ports

Thomas Vogt requested to merge tuxor1337/ModemManager:xmmrpc-ports into main

This MR adds a new port type XMMRPC during probing. A port is flagged as this port type if there is a port type hint (from udev), or based on the type attribute of the wwan subsystem. No actual port probing is done.

Why do we need an XMMRPC port type?

The iosm linux kernel module introduced this port type for Intel XMM7360 (e.g. Fibocom L850) modems (https://lore.kernel.org/lkml/20221029090355.565200-1-shaneparslow808@gmail.com/T/), but ModemManager is currently incapable of identifying and using it. ModemManager will fall back to using a generic MMBroadbandModem. ModemManager then tries to setup the device using AT commands, but will get stuck at SIM not inserted (see #612).

With this MR, the log messages of ModemManager failing to use the XMM7360 are much clearer. Here is the debug log showing that ModemManager fails to add the XMM7360 with this MR.

ModemManager[5544]: <dbg> [1718721425.544877] [plugin/intel] (intel) Intel modem with RPC control port found...
ModemManager[5544]: <wrn> [1718721425.544899] [base-manager] couldn't create modem for device '/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0': Intel XMM7360 in RPC mode not supported

Also note that, without this MR, ModemManager will try to probe the XMMRPC port with AT commands and users have reported about instabilities caused by those attempts. Users that want to use Python scripts (https://github.com/xmm7360/xmm7360-pci) to set up the connection, do not want ModemManager to mess with the XMMRPC port.

Can't the XMM7360 be supported via MBIM?

XMM7360 devices that are connected via a PCI interface will only expose an RPC and no MBIM port. Hence, support for XMM7360 in ModemManager is currently limited to setups where the device is connected via an USB interface. Forcing the device to use the USB instead of the PCI interface is not an option for many users (e.g. ThinkPad T495 laptops).

Why doesn't this MR add support for XMM7360 via RPC?

A possible next step would be to implement a proper XMMRPC port type for the XMM7360, based on the great work by @ShaneParslow (https://gitlab.freedesktop.org/ShaneParslow/ModemManager/-/tree/enz7360). However, note that this RPC interface is not officially documented anywhere, but our knowledge about it is solely based on reverse engineering efforts by James Wah (https://github.com/xmm7360/reversing). Therefore, this will probably never be as stable as the MBIM interface. It would still be nice to support the RPC interface in ModemManager, even if it might be a bit buggy, and does not provide radio signal strength information etc.

My idea would be to first merge this MR, and later add the XMM7360-RPC-related code in another MR. But if you prefer to have both in a single step, I can create a MR with both together. However, due to time constraints I can only provide the code by @ShaneParslow as is. I cannot address known instabilities and open issues (https://gitlab.freedesktop.org/ShaneParslow/ModemManager/-/issues).

Edited by Thomas Vogt

Merge request reports