Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH] atmodem: gprs-context: use default PPP ACCM for Quectel serial modems
@ 2024-05-27 10:59 Martin Hundebøll
  2024-05-28 21:37 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Hundebøll @ 2024-05-27 10:59 UTC (permalink / raw)
  To: ofono; +Cc: Martin Hundebøll, Sergei Golubtsov

Since commit c8ed7162 ("ppp: using RX ACCM = 0 by default"), the Quectel
M95 modem has failed to establish a PPP context. Instead, it
continuously logs this:
    PPP: event: 9 (RCN), action: 1028, new_state: 8 (ACKSENT)
    PPP: lcp: pppcp_initialize_restart_count: current state 8:ACKSENT
    PPP: lcp: pppcp_send_configure_request: current state 8:ACKSENT
    PPP: lcp: pppcp_process_configure_nak: current state 8:ACKSENT
    PPP: lcp: pppcp_generate_event: current state 8:ACKSENT

Restore PPP functionality by configuring the (protocol) default ACCM
value of 0x000a0000.
---
 drivers/atmodem/gprs-context.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
index bfe6ae56..0baea4a1 100644
--- a/drivers/atmodem/gprs-context.c
+++ b/drivers/atmodem/gprs-context.c
@@ -163,6 +163,11 @@ static gboolean setup_ppp(struct ofono_gprs_context *gc)
 		g_at_ppp_set_credentials(gcd->ppp, gcd->username,
 								gcd->password);
 
+	/* Quectel M95 fails to configure RCN when using ACCM = 0, so set it to
+	 * the protocol default of 0x000a0000. */
+	if (gcd->vendor == OFONO_VENDOR_QUECTEL_SERIAL)
+		g_at_ppp_set_accm(gcd->ppp, 0x000a0000);
+
 	/* set connect and disconnect callbacks */
 	g_at_ppp_set_connect_function(gcd->ppp, ppp_connect, gc);
 	g_at_ppp_set_disconnect_function(gcd->ppp, ppp_disconnect, gc);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-28 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 10:59 [PATCH] atmodem: gprs-context: use default PPP ACCM for Quectel serial modems Martin Hundebøll
2024-05-28 21:37 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox