QMI crashes when modem reboots during initialization

Aleksander Morgado aleksander at aleksander.es
Thu Jan 5 09:19:26 UTC 2023

Hey Sai,

> I am using libqmi APIs to enable data connection in my Sierra modem. I have steps like these..
> qmi_device_new()
> qmi_device_open()
> qmi_device_allocate_client(dev, QMI_SERVICE_DMS, ....)
> qmi_client_dms_swi_get_current_firmware
> qmi_client_dms_get_operating_mode
> qmi_device_allocate_client(dev, QMI_SERVICE_UIM, ....)
> qmi_device_allocate_client(dev, QMI_SERVICE_WDS, ....)
> ----
> -----
> My network manager crashes if the modem reboots for some reason, when the initialization is in progress, somewhere in the middle of the above steps.
> I am able to reproduce the issue very easily. All I have to do is to reboot the modem with AT commands, while the above setup process is on-going in my network manager.
> Any inputs to fix this issue are highly appreciated.

You can easily reproduce the crash, so you should be able to easily
run it under gdb and see where it crashed? when using libqmi, as long
as you have proper references for all relevant objects (device,
client..) then a modem going away should not be an issue. The
QmiDevice will emit a device removed signal, and the QmiClient objects
won´t be able to process any futher operations (and the current ones
wiil fail cleanly).

> My issue seems to be similar to this:
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/374

That issue is in ModemManager, unrelated to libqmi and unrelated to
your own code :)

More information about the libqmi-devel mailing list