Skip to content

intel: support for RPC-powered xmm7360

Thomas Vogt requested to merge tuxor1337/ModemManager:port-xmm7360 into main

This MR adds support for Intel XMM7360 (e.g. Fibocom L850) modems to the intel plugin.

This includes modem initialization, enabling, registration and connecting. The following parts (possibly among others) do not work:

  • Unlocking a SIM card with a PIN is not supported. I have only tested this with a SIM card for which the PIN is deactivated.
  • Only APN settings with default (empty) user/password, cert type, APN protocol/type are supported (see https://github.com/xmm7360/xmm7360-pci/issues/62).
  • Disconnecting always fails immediately with an error message.
  • The modem might freeze in certain situations, e.g. after waking up from suspend. ModemManager will not be able to reset it to a usable state. Only rebooting will solve this for the average user (cold-resetting/power-cycling the PCI interface would be an alternative).
  • No IPv6 connection to the internet, only IPv4.

Isn't the XMM7360 already 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 are some features missing, and can they be added in the context of this MR?

The reason is that the 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. In principle, it would be possible to get more information about the interface by reverse engineering the Windows drivers. However, I will not work on this in the context of this MR.

Who contributed to this implementation?

Some open questions from my side

  • On disconnect, an error is raised. Is this the best solution given that we don't know the appropriate RPC commands?
  • While the modem class inherits from MMBroadbandModem, the MMBearerXmm7360 class inherits from MMBaseBearer, and not from MMBroadbandBearer. This is because previous implementations made the same choice, and I have no idea what would be the difference. Would there be any benefits from using MMBroadbandBearer instead?
  • During probing, both AT ports are probed even though one of them will never respond. Is there a way to speed up this process somehow, e.g. by cancelling the probing if at least one responsive AT port has been found? I mean, only for the XMM7360 - not in general.

Some remarks about coding style and structure

I tried to follow the style and structure of code in similar pre-existing parts of the ModemManager code as closely as possible. For example, I created the file src/plugins/intel/mm-broadband-modem-xmm7360-rpc.c by copying and adapting the code in src/mm-base-modem-at.c. Also, the structure of the file src/plugins/intel/mm-port-serial-xmmrpc-xmm7360.c has notable similarities with src/mm-port-serial-at.c.

How to compile and test this

See my note below with instructions on how to compile and test the version of ModemManager from this MR on Ubuntu or Fedora.

Edited by Thomas Vogt

Merge request reports