Some ublox modems can't establish connection due to "reload_stats" call
Hi.
I observed, that currently connectivity for at least some of ublox modems can't be activated.
I have ublox SARA U201 modem and no connection can be established in mainline MM version(on the latest main
branch).
I also found a possible reason for that - looks like it's "stats reload" in the commit 029ea68ce with the generic connection sequence rework. The debug log fragment available in no_connection_029ea68ce.log
file.
To check it, I've commented out stats reload call at mm-base-bearer:connect_ready
function:
From 53cce0915a5a85a56845e7f6a216ebd9dc1e4f4e Mon Sep 17 00:00:00 2001
From: Alexander Yashin <alexandr.yashin@emlid.com>
Date: Thu, 10 Mar 2022 14:47:33 +0300
Subject: [PATCH] WIP: base-bearer: temporary drop reload_stats
---
src/mm-base-bearer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mm-base-bearer.c b/src/mm-base-bearer.c
index a6b5c65f..4f7e317f 100644
--- a/src/mm-base-bearer.c
+++ b/src/mm-base-bearer.c
@@ -974,14 +974,14 @@ connect_ready (MMBaseBearer *self,
/* Check that reload statistics is supported by the device; we can only do this while
* connected. */
- if (MM_BASE_BEARER_GET_CLASS (self)->reload_stats &&
+ /* if (MM_BASE_BEARER_GET_CLASS (self)->reload_stats &&
MM_BASE_BEARER_GET_CLASS (self)->reload_stats_finish) {
MM_BASE_BEARER_GET_CLASS (self)->reload_stats (
self,
(GAsyncReadyCallback)reload_stats_supported_ready,
task);
return;
- }
+ } */
connect_succeeded (self, task);
}
--
2.20.1
After applying this patch, the connection always will work as expected, no errors happen(see connection.log
). Based on that, I suspect that the problem here is in the reload_stats
method realization in the ublox plugin.
As you can see from no_connection_029ea68ce.log
, there is <-- '<CR><LF>+CME ERROR: 1952<CR><LF>'
error that means "No DHCP Packets received from the DTE"
according to u-blox datasheet.
I have no idea why same at-command calls may end up with so different results - 1952 error when stats are reloaded and no errors when stats are not touched. Maybe this looks more familiar to you, so I'll wait for your thoughts very much. :)