<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 9 Aug 2021 at 23:26, Aleksander Morgado <<a href="mailto:aleksander@aleksander.es">aleksander@aleksander.es</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Thomas!<br>
<br>
> I'm trying to use ModemManager with a Sierra Wireless AirPrime EM919X,<br>
> based on a Snapdragon X55 5G Modem, without success.<br>
><br>
> The EM919X is connected to an i.MX6QDL through a MHI bus on top of a<br>
> PCIe gen2 bus.<br>
><br>
> I'm using the kernel 5.13.6, modemmanager 1.32.4, libqmi 1.30.0 and<br>
> libmbim 1.26.0.<br>
<br>
Wow, that's a MM version from the future! It's 1.16.8 according to<br>
your logs though ;)<br>
<br>
><br>
> Aug 9 15:32:54 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> dbus-daemon[435]: [system]<br>
> Activating service name='org.freedesktop.ModemManager1' requested by<br>
> ':1.1' (uid=0 pid=507 comm="/usr/sbin/NetworkManager ") (using<br>
> servicehelper)<br>
> Aug 9 15:32:54 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> ModemManager[531]: <info><br>
> ModemManager (version 1.16.8) starting in system bus...<br>
> Aug 9 15:32:55 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> dbus-daemon[435]: [system]<br>
> Successfully activated service 'org.freedesktop.ModemManager1'<br>
> Aug 9 15:32:55 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> NetworkManager[507]: <info><br>
> [1628523175.0109] modem-manager: ModemManager not available<br>
> Aug 9 15:32:55 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> NetworkManager[507]: <info><br>
> [1628523175.1141] modem-manager: ModemManager now available<br>
> Aug 9 15:32:56 target daemon.warn ModemManager[531]: <warn><br>
> [wwan0p1QCDM/qcdm] failed to open serial device<br>
> Aug 9 15:32:56 target daemon.warn ModemManager[531]: <warn> [plugin-<br>
> manager] task 0,wwan0p1QCDM: error when checking support with plugin<br>
> 'generic': (wwan/wwan0p1QCDM) Failed to open QCDM port: Failed to open<br>
> QCDM port: -2<br>
<br>
Humm, that should not happen, right @Loic Poulain ? It's true that<br>
it's not a serial device, and I recall some patch avoiding to run<br>
config_fd() on non-serial devices, so it may be related.<br></blockquote><div><br></div><div>Yes, but AFAIR, the patch was for AT (non-serial) ports, we should apply the same kind of change here. I get the same issue on my side, but since qcdm is not really used, MM just ignore it without further issue.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p3QMI] Opening device with flags 'version-info, proxy'...<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p3QMI] created endpoint<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]: cannot connect<br>
> to proxy: Could not connect: Connection refused<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]: spawning new<br>
> qmi-proxy (try 1)...<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]: opening<br>
> device...<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]: cannot connect<br>
> to proxy: Could not connect: Connection refused<br>
<br>
There is something very wrong in this setup I think; MM tries to spawn<br>
a new qmi-proxy as there is none, but that fails. It shouldn't fail! I<br>
would assume the proxy could be failing to open the wwan0p3QMI port in<br>
the same way as the QCDM one, but wouldn't know.<br>
<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]: spawning new<br>
> mbim-proxy (try 1)...<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p2MBIM] Couldn't find descriptors file, possibly not using<br>
> cdc_mbim<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p2MBIM] Fallback to default max control message size: 4096<br>
<br>
Wait, and this modem exposes both QMI and MBIM ports? I think this is<br>
new, first time I've seen this I think. If I'm not mistaken this is a<br>
decision that the manufacturer takes, right? I think the generic<br>
plugin will try to create a QMI based modem if it finds any QMI<br>
capable port, and otherwise fallback to create a MBIM based modem if<br>
it finds any MBIM capable port. Anyway, we didn't reach that point<br>
yet, just a heads up.<br></blockquote><div><br></div><div>'Generic' X55 devices expose both MBIM and QMI control ports, I'm going to submit a change in the kernel to avoid that if it causes trouble. But last time I tried with such a device, MM was just picking the QMI one for control (generic plugin), as you said.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Aug 9 15:32:56 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p3QMI] Checking version info (45 retries)...<br>
> Aug 9 15:32:57 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> ModemManager[531]: <info> [base-<br>
> manager] couldn't check support for device<br>
> '/sys/devices/platform/soc/2100000.bus/2184200.usb/ci_hdrc.1/usb1/1-<br>
> 1/1-1.1': not supported by any plugin<br>
> Aug 9 15:32:57 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> ModemManager[531]: <info> [base-<br>
> manager] couldn't check support for device<br>
> '/sys/devices/platform/soc/2100000.bus/2188000.ethernet': not supported<br>
> by any plugin<br>
> Aug 9 15:32:57 target daemon.debug ModemManager[531]: transaction 0x2<br>
> aborted, but message is not abortable<br>
> <...><br>
> Aug 9 15:33:25 target daemon.debug ModemManager[531]: transaction 0x1e<br>
> aborted, but message is not abortable<br>
> Aug 9 15:33:26 target daemon.debug ModemManager[531]: proxy<br>
> configuration failed: closed<br>
> Aug 9 15:33:26 target daemon.debug ModemManager[531]:<br>
> [/dev/wwan0p2MBIM] channel destroyed<br>
> Aug 9 15:33:26 target daemon.debug ModemManager[531]: transaction 0x1f<br>
> aborted, but message is not abortable<br>
> <...><br>
> Aug 9 15:33:41 target daemon.debug ModemManager[531]: transaction 0x2e<br>
> aborted, but message is not abortable<br>
> Aug 9 15:33:41 target <a href="http://daemon.info" rel="noreferrer" target="_blank">daemon.info</a> ModemManager[531]: <info> [device<br>
> /sys/devices/platform/soc/1ffc000.pcie/pci0000:00/0000:00:00.0/0000:01:<br>
> 00.0] creating modem with plugin 'generic' and '3' ports<br>
> Aug 9 15:33:41 target daemon.warn ModemManager[531]: <warn><br>
> [plugin/generic] could not grab port wwan0p3QMI: Cannot add port<br>
> 'wwan/wwan0p3QMI', unhandled port type<br>
> Aug 9 15:33:41 target daemon.warn ModemManager[531]: <warn><br>
> [plugin/generic] could not grab port wwan0p2MBIM: Cannot add port<br>
> 'wwan/wwan0p2MBIM', unhandled port type<br>
<br>
Neither the QMI nor the MBIM probing were successful.<br></blockquote><div><br></div><div>Maybe udev rules are not installed?</div><div><br></div></div><div class="gmail_quote">Regards,</div><div class="gmail_quote">Loic<br></div></div>