QMI crashes when modem reboots during initialization
aleksander at aleksander.es
Thu Jan 5 09:19:26 UTC 2023
> I am using libqmi APIs to enable data connection in my Sierra modem. I have steps like these..
> qmi_device_allocate_client(dev, QMI_SERVICE_DMS, ....)
> 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:
That issue is in ModemManager, unrelated to libqmi and unrelated to
your own code :)
More information about the libqmi-devel