How to get certain indications of the radio module in Python?
Aleksander Morgado
aleksandermj at chromium.org
Tue Jan 30 11:00:43 UTC 2024
Hey,
> there is
>
> indication_nas_serving_system and a function to parse it
>
>
> https://lazka.github.io/pgi-docs/Qmi-1.0/functions.html#Qmi.indication_nas_serving_system_indication_parse
>
> indication_nas_operator_name and a function to parse it
>
>
> https://lazka.github.io/pgi-docs/Qmi-1.0/functions.html#Qmi.indication_nas_operator_name_indication_parse
>
> indication_wds_packet_service_status and a function to parse it
>
>
> https://lazka.github.io/pgi-docs/Qmi-1.0/functions.html#Qmi.indication_wds_packet_service_status_indication_parse
>
> I see that my radio module is sending them (on USB) and contains useful
> data.
>
> What do I need to do to be able to received them (at any time, when they
> occure)?
>
> Are there functions where I can store a callback, which is called, when
> such a message was sent by my radio module?
>
> Is this supported by libqmi?
>
>
Yes, this is supported by libqmi. This type of QMI indications are emitted
by the QmiClient as signals, see e.g.
https://www.freedesktop.org/software/libqmi/libqmi-glib/latest/QmiClientWds.html
Unfortunately the python example does not include a signal listening step,
but it should not be difficult to implement. Feel free to investigate and
if you can extend the example, or create a completely new one, please send
it for review.
https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/blob/main/examples/simple-tester-python/simple-tester-python?ref_type=heads
--
Aleksander
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libqmi-devel/attachments/20240130/6ce05890/attachment.htm>
More information about the libqmi-devel
mailing list