From: "Martin Hundebøll" <martin@geanix.com>
To: ofono@lists.linux.dev
Cc: "Martin Hundebøll" <martin@geanix.com>, MaxLyubimov <m.lyubimov@aqsi.ru>
Subject: [PATCH 05/10] sim7100: fix going offline for A76XX modems
Date: Tue, 30 Apr 2024 13:52:28 +0200 [thread overview]
Message-ID: <20240430115234.180185-5-martin@geanix.com> (raw)
In-Reply-To: <20240430115234.180185-1-martin@geanix.com>
When tearing down the PPP context, the SIMCom A7672 modem issues a NO
CARRIER event on the control channel, which is detected as an error when
processing the AT+CFUN=4 respones.
Make the set_online(false) call succed by ignoring the NO CARRIER event.
---
plugins/sim7100.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/plugins/sim7100.c b/plugins/sim7100.c
index f4979ffe..2e9d0eb3 100644
--- a/plugins/sim7100.c
+++ b/plugins/sim7100.c
@@ -151,6 +151,16 @@ static void cgmm_cb(gboolean ok, GAtResult *result, gpointer user_data)
break;
}
+ switch (data->model) {
+ case SIMCOM_A76XX:
+ /* ignore NO CARRIER on the AT channel when disconnecting PPP */
+ g_at_chat_blacklist_terminator(data->at,
+ G_AT_CHAT_TERMINATOR_NO_CARRIER);
+ break;
+ default:
+ break;
+ }
+
/* power up modem */
g_at_chat_send(data->at, "AT+CFUN=4", NULL, cfun_set_on_cb, modem,
NULL);
--
2.44.0
next prev parent reply other threads:[~2024-04-30 11:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 11:52 [PATCH 01/10] sim7100: simplify serial device opening Martin Hundebøll
2024-04-30 11:52 ` [PATCH 02/10] sim7100: wait for modem to start while enabling Martin Hundebøll
2024-04-30 11:52 ` [PATCH 03/10] sim7100: query device model during enable Martin Hundebøll
2024-05-02 14:04 ` Denis Kenzior
2024-04-30 11:52 ` [PATCH 04/10] sim7100: implement set_online() Martin Hundebøll
2024-04-30 11:52 ` Martin Hundebøll [this message]
2024-04-30 11:52 ` [PATCH 06/10] atmodem: introduce SIMCom A76XX vendor quirks Martin Hundebøll
2024-04-30 11:52 ` [PATCH 07/10] sim7100: enable A76XX simcom vendor quirks for relevant atoms Martin Hundebøll
2024-04-30 11:52 ` [PATCH 08/10] udevng: register support for SIMCom A76XX USB serial modem Martin Hundebøll
2024-05-22 7:48 ` Martin Hundebøll
2024-05-23 13:26 ` Martin Hundebøll
2024-04-30 11:52 ` [PATCH 09/10] Makefile: enable build of simcommodem radiosettings Martin Hundebøll
2024-04-30 11:52 ` [PATCH 10/10] sim7100: create radio-settings atom for A76XX modems Martin Hundebøll
2024-05-02 14:00 ` [PATCH 01/10] sim7100: simplify serial device opening patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240430115234.180185-5-martin@geanix.com \
--to=martin@geanix.com \
--cc=m.lyubimov@aqsi.ru \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).