diff options
author | Martin Hundebøll <martin@geanix.com> | 2024-04-30 13:52:25 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2024-05-02 08:46:43 -0500 |
commit | 4b98bea96881a9c582271c102cdfa8335b6e307c (patch) | |
tree | 6bf7c4eb07be47ab49d23806ae6deb6711f42d39 | |
parent | 4e161031a92b1f2fe134ff192ab1b91176e7993f (diff) | |
download | ofono-4b98bea96881a9c582271c102cdfa8335b6e307c.tar.gz |
sim7100: wait for modem to start while enabling
The sim7100_enable() returns 0 just after queuing the AT+CFUN=1 command,
which ofono core interprets as the modem being powered up and in pre-sim
state. In fact, the pre-sim state isn't reached until the modem returns
OK, which is caught in cfun_set_on_cb() in sim7100.c.
Delay the transition from off to pre-sim until the respone is received
by return EINPROGRESS instead, and let the (existing)
ofono_modem_set_powered() call signal pre-sim to ofono core.
-rw-r--r-- | plugins/sim7100.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/sim7100.c b/plugins/sim7100.c index 4a1ac7821..b5e658915 100644 --- a/plugins/sim7100.c +++ b/plugins/sim7100.c @@ -149,7 +149,7 @@ static int sim7100_enable(struct ofono_modem *modem) g_at_chat_send(data->at, "AT+CFUN=1", NULL, cfun_set_on_cb, modem, NULL); - return 0; + return -EINPROGRESS; } static void cfun_set_off_cb(gboolean ok, GAtResult *result, gpointer user_data) |