not able to receive any indications using libqmi on Linaro

Aleksander Morgado aleksander at aleksander.es
Thu Nov 17 09:10:27 UTC 2016


Hey,

On Wed, Nov 16, 2016 at 11:29 PM, Shilpa Velamuri <shilpa.vel at gmail.com> wrote:
> The libqmi interaction/WWAN code is all running in a separate thread being
> part of a bigger application. The g_main_loop is running in this thread. I
> am receiving responses to requests but no indications from libqmi. Code is
> using proxy to talk to LE910 modem.
>

It is usually much simpler if you provide e.g. a working minimal
example showing the issue, instead of explaining what the code does.

> In the callback of Nas Client allocation, i invoke:
> qmi_client_nas_register_indications(...)
>
> In the callback to the above qmi_client_nas_register_indications:
>
> i register for NAS serving-system indication as :
> g_signal_connect(nasClient,
>                           "serving-system",
>                           G_CALLBACK (SrvSysIndCallback),
>                           callback_data);
>
> The callback is never invoked even though the modem is registered and has
> service.
>
> what am i doing wrong? Could you help?

Maybe you need to define which is the thread-default main context as
soon as you create the new thread where the libqmi main loop is
supposed to run? See  g_main_context_push_thread_default(). Otherwise,
the g_signal_connect() you run may schedule the signal events in the
main context of the main thread, but you don't have a main loop
running there, right?

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list