From 145c612867ba4de2691355831f89c5b995541ac9 Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Mon, 31 Mar 2025 13:53:56 +0700 Subject: [PATCH 1/3] Enable cellular at debug when registering network On boot, airgradient-client change cellular init timeout to 5 mins --- .gitignore | 2 ++ examples/OneOpenAir/OneOpenAir.ino | 12 ++++++++++++ src/Libraries/airgradient-client | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 82085f6..c9a020a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,7 @@ build /.idea/ .pio .cache +.clangd logs +gen_compile_commands.py compile_commands.json diff --git a/examples/OneOpenAir/OneOpenAir.ino b/examples/OneOpenAir/OneOpenAir.ino index 82123fe..8f13a6a 100644 --- a/examples/OneOpenAir/OneOpenAir.ino +++ b/examples/OneOpenAir/OneOpenAir.ino @@ -934,6 +934,11 @@ void initializeNetwork() { networkOption = UseWifi; } + if (networkOption == UseCellular) { + // Enable serial stream debugging to check the AT command when doing registration + agSerial->setDebug(true); + } + if (!agClient->begin(ag->deviceId().c_str())) { oledDisplay.setText("Client", "initialization", "failed"); delay(5000); @@ -943,6 +948,11 @@ void initializeNetwork() { ESP.restart(); } + if (networkOption == UseCellular) { + // Disabling it again + agSerial->setDebug(false); + } + if (networkOption == UseWifi) { if (!wifiConnector.connect()) { Serial.println("Cannot initiate wifi connection"); @@ -1495,11 +1505,13 @@ void networkingTask(void *args) { else if (networkOption == UseCellular) { if (agClient->isClientReady() == false) { Serial.println("Cellular client not ready, ensuring connection..."); + agSerial->setDebug(true); if (agClient->ensureClientConnection() == false) { Serial.println("Cellular client connection not ready, retry in 5s..."); delay(5000); continue; } + agSerial->setDebug(false); } } diff --git a/src/Libraries/airgradient-client b/src/Libraries/airgradient-client index 774f8b7..f4c503e 160000 --- a/src/Libraries/airgradient-client +++ b/src/Libraries/airgradient-client @@ -1 +1 @@ -Subproject commit 774f8b70e68a6c867d72d7a8ed2d6b12354cb9bd +Subproject commit f4c503ee2f644d36e496f57c3487f6e87ec70597 From 3fc02b3f5406fe0c696e2ce1cfe44f20dd8cfba4 Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Mon, 31 Mar 2025 16:51:29 +0700 Subject: [PATCH 2/3] Check signal when initialize cellular client --- src/Libraries/airgradient-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Libraries/airgradient-client b/src/Libraries/airgradient-client index f4c503e..938a928 160000 --- a/src/Libraries/airgradient-client +++ b/src/Libraries/airgradient-client @@ -1 +1 @@ -Subproject commit f4c503ee2f644d36e496f57c3487f6e87ec70597 +Subproject commit 938a92830d090bbd3ae100007040fb404220c551 From 2f69932ef711c97e4d487a8cee95e47b324f691a Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Mon, 31 Mar 2025 17:04:37 +0700 Subject: [PATCH 3/3] add depth submodule update --- .github/workflows/check.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8c27eac..d5416ac 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -38,6 +38,7 @@ jobs: steps: - uses: actions/checkout@v4.2.2 with: + fetch-depth: 0 submodules: 'true' - uses: arduino/compile-sketches@v1.1.2 with: