* [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* Re: [PATCH] atmodem: gprs-context: use default PPP ACCM for Quectel serial modems
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
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2024-05-28 21:37 UTC (permalink / raw)
To: Martin Hundebøll, ofono; +Cc: Sergei Golubtsov
Hi Martin,
On 5/27/24 5:59 AM, Martin Hundebøll wrote:
> 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(+)
>
Could you please add:
[core]
abbrev = 12
to your .git/config? Otherwise CI complains:
0001-atmodem-gprs-context-use-default-PPP-ACCM-for-Quecte.patch:7: ERROR: Please
use git commit description style 'commit <12+ chars of sha1> ("<title line>")' -
ie: 'commit 0123456789ab ("ppp: using RX ACCM = 0 by default")'
> 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. */
Multi-line comments should look like this:
/*
* Line 1
* Line 2
*/
> + 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);
I fixed both issues and applied, thanks.
Regards,
-Denis
^ permalink raw reply [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