Hi Christo,
On 9/5/19 5:35 AM, Christo Labuschagne wrote:
Good day all
We are running ofono 1.29 with a Telit HE910 modem connected via HSIC
(USB). When I suspend the kernel and wake again the following events
happen:
gatio.c – read_watcher_destroy_notify
gatchat.c – io_disconnect
So basically the kernel sends us a HUP and we think the underlying
file-descriptor has been closed.
- chat_cleanup
- in chat_cleanup chat->command_queue is freed and
set to NULL
Then (I haven’t traced the root of this one)
drivers/atmodem/gprs-context.c – at_gprs_activate_primary()
gatchat.c – g_at_chat_send()
In here it fails because command_queue is null
It then continues forever to try and call at_gprs_activate_primary().
Probably caused by ConnMan?
I did not trace everything into glib, but I’m assuming that when going
to sleep and then waking removes and then re-adds the ttyACM’s for the
modem, which causes the destroy notify.
I suspect this is the case, yes.
There are two possible ways to fix the problem. Fix it in ofono to
recreate the command_queue before actually calling
at_gprs_activate_primary (which in the long term should probably be the
Curious. How are you thinking of accomplishing that? How would you
distinguish between a real HUP and the weird suspend/resume HUP? Also,
are you sure your device isn't being rebooted as well?
best fix) or try and prevent - on a driver level - to not remove the
ttyACM’s between sleep and resume. The latter would then not kick of
the destroy notify.
That's what oFono has always assumed, that the baseband is always alive
during the time the host is suspended. ttys are always active and can
even wake up the host as needed (e.g. incoming call, etc).
Regards,
-Denis
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono