suspend: add boot timer

The EG25 modem needs at least 2 minutes after indicating 'RDY'
to be fully operational. If the modem is suspended before that,
calls or texts may not be seen by the userspace.
This mostly occurs when a full reboot or poweroff/poweron
sequence of the phone is performed.

:
This commit is contained in:
Dylan Van Assche
2021-02-06 07:52:32 +01:00
parent 3bb6e15de0
commit b8d269cf2f
5 changed files with 108 additions and 33 deletions

View File

@@ -202,8 +202,10 @@ static gboolean modem_response(gint fd,
g_message("Response: [%s]", response);
if (strcmp(response, "RDY") == 0)
if (strcmp(response, "RDY") == 0) {
suspend_inhibit(manager, TRUE, TRUE);
manager->modem_state = EG25_STATE_STARTED;
}
else if (strstr(response, "ERROR"))
retry_at_command(manager);
else if (strstr(response, "OK"))