From a0a58b85dfb1086571119bd941ece8375fdc57f2 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 12 Sep 2024 09:55:05 +0200 Subject: [PATCH 1/5] Add missing rp2040 architecture to library.properties --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index c202d604..a40fac0e 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Arduino Library for network connection management (WiFi, GSM, NB, [Ethe paragraph=Originally part of ArduinoIoTCloud category=Communication url=https://github.com/arduino-libraries/Arduino_ConnectionHandler -architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno,mbed_edge,stm32 +architectures=samd,esp32,esp8266,mbed,megaavr,mbed_nano,mbed_portenta,mbed_nicla,mbed_opta,mbed_giga,renesas_portenta,renesas_uno,mbed_edge,stm32,rp2040 depends=Arduino_DebugUtils, WiFi101, WiFiNINA, MKRGSM, MKRNB, MKRWAN, Blues Wireless Notecard (>=1.6.3) From 924f18efea7d08388f784b31a83165cdf3c290fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 13:05:06 +0000 Subject: [PATCH 2/5] Bump arduino/arduino-lint-action from 1 to 2 Bumps [arduino/arduino-lint-action](https://github.com/arduino/arduino-lint-action) from 1 to 2. - [Release notes](https://github.com/arduino/arduino-lint-action/releases) - [Commits](https://github.com/arduino/arduino-lint-action/compare/v1...v2) --- updated-dependencies: - dependency-name: arduino/arduino-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/check-arduino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index adb330f8..e8186852 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: compliance: specification library-manager: update From d6a727a8d13764f72a88dbd9340d87e49086fc62 Mon Sep 17 00:00:00 2001 From: "Zachary J. Fields" Date: Mon, 7 Oct 2024 11:54:30 -0500 Subject: [PATCH 3/5] chore: Remove vestigial database template from NCH --- src/NotecardConnectionHandler.cpp | 37 ------------------------------- src/NotecardConnectionHandler.h | 3 ++- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/src/NotecardConnectionHandler.cpp b/src/NotecardConnectionHandler.cpp index 5205c4a8..b254c79a 100644 --- a/src/NotecardConnectionHandler.cpp +++ b/src/NotecardConnectionHandler.cpp @@ -31,13 +31,11 @@ #define NOTEFILE_BASE_NAME "arduino_iot_cloud" // Notecard LoRa requires us to choose an arbitrary port between 1-99 -#define NOTEFILE_DATABASE_LORA_PORT 1 #define NOTEFILE_INBOUND_LORA_PORT 2 #define NOTEFILE_OUTBOUND_LORA_PORT 3 // Note that we use "s" versions of the Notefile extensions to ensure that // traffic always happens on a secure transport -#define NOTEFILE_SECURE_DATABASE NOTEFILE_BASE_NAME ".dbs" #define NOTEFILE_SECURE_INBOUND NOTEFILE_BASE_NAME ".qis" #define NOTEFILE_SECURE_OUTBOUND NOTEFILE_BASE_NAME ".qos" @@ -423,41 +421,6 @@ NetworkConnectionState NotecardConnectionHandler::update_handleInit() } #endif - // Set database template to support LoRa/Satellite Notecard - if (NetworkConnectionState::INIT == result) { - if (J *req = _notecard.newRequest("note.template")) { - JAddStringToObject(req, "file", NOTEFILE_SECURE_DATABASE); - JAddStringToObject(req, "format", "compact"); // Support LoRa/Satellite Notecards - JAddIntToObject(req, "port", NOTEFILE_DATABASE_LORA_PORT); // Support LoRa/Satellite Notecards - if (J *body = JAddObjectToObject(req, "body")) { - JAddStringToObject(body, "text", TSTRINGV); - JAddNumberToObject(body, "value", TFLOAT64); - JAddBoolToObject(body, "flag", TBOOL); - if (J *rsp = _notecard.requestAndResponse(req)) { - // Check the response for errors - if (NoteResponseError(rsp)) { - const char *err = JGetString(rsp, "err"); - Debug.print(DBG_ERROR, F("%s"), err); - result = NetworkConnectionState::ERROR; - } else { - result = NetworkConnectionState::INIT; - } - JDelete(rsp); - } else { - Debug.print(DBG_ERROR, F("Failed to receive response from Notecard.")); - result = NetworkConnectionState::ERROR; // Assume the worst - } - } else { - Debug.print(DBG_ERROR, "Failed to allocate request: note.template:body"); - JFree(req); - result = NetworkConnectionState::ERROR; // Assume the worst - } - } else { - Debug.print(DBG_ERROR, "Failed to allocate request: note.template"); - result = NetworkConnectionState::ERROR; // Assume the worst - } - } - // Set inbound template to support LoRa/Satellite Notecard if (NetworkConnectionState::INIT == result) { if (J *req = _notecard.newRequest("note.template")) { diff --git a/src/NotecardConnectionHandler.h b/src/NotecardConnectionHandler.h index c758030f..2b3a8734 100644 --- a/src/NotecardConnectionHandler.h +++ b/src/NotecardConnectionHandler.h @@ -29,7 +29,7 @@ #define NOTECARD_CONNECTION_HANDLER_VERSION_MAJOR 1 #define NOTECARD_CONNECTION_HANDLER_VERSION_MINOR 0 -#define NOTECARD_CONNECTION_HANDLER_VERSION_PATCH 0 +#define NOTECARD_CONNECTION_HANDLER_VERSION_PATCH 1 #define NOTECARD_CONNECTION_HANDLER_VERSION NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_MAJOR) "." NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_MINOR) "." NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_PATCH) @@ -261,6 +261,7 @@ class NotecardConnectionHandler final : public ConnectionHandler * @param interval_min[in] The inbound polling interval (in minutes) * * @note Set the interval to 0 to disable inbound polling. + * @note Must be set prior to initializing the connection to the Notecard. */ inline void setNotehubPollingInterval (int32_t interval_min) { _inbound_polling_interval_min = (interval_min ? interval_min : -1); From cb2dc7aa9b08f1da8f915b88afb22ddc449a77a9 Mon Sep 17 00:00:00 2001 From: "Zachary J. Fields" Date: Fri, 28 Feb 2025 15:16:42 -0600 Subject: [PATCH 4/5] chore: refactor device id handling - Migrate from `sn` to `_arduino_device_id` --- src/NotecardConnectionHandler.cpp | 10 +++++++--- src/NotecardConnectionHandler.h | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NotecardConnectionHandler.cpp b/src/NotecardConnectionHandler.cpp index b254c79a..9917fcef 100644 --- a/src/NotecardConnectionHandler.cpp +++ b/src/NotecardConnectionHandler.cpp @@ -774,9 +774,13 @@ bool NotecardConnectionHandler::updateUidCache (void) result = false; } else { _notecard_uid = JGetString(rsp, "device"); - _device_id = JGetString(rsp, "sn"); - _device_id = (_device_id.length() ? _device_id : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"); - Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s updated cache with Notecard UID: <%s> and Arduino Device ID: <%s>"), __FUNCTION__, _notecard_uid.c_str(), _device_id.c_str()); + char device_id[] = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; + if (NoteGetEnv("_arduino_device_id", device_id, device_id, sizeof(device_id))) { + _device_id = device_id; + } else { + Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s Arduino Device ID not cached on Notecard, using default value: <%s>"), __FUNCTION__, _device_id.c_str()); + } + Debug.print(DBG_DEBUG, F("NotecardConnectionHandler::%s updated local cache with Notecard UID: <%s> and Arduino Device ID: <%s>"), __FUNCTION__, _notecard_uid.c_str(), _device_id.c_str()); result = true; } JDelete(rsp); diff --git a/src/NotecardConnectionHandler.h b/src/NotecardConnectionHandler.h index 2b3a8734..4278c144 100644 --- a/src/NotecardConnectionHandler.h +++ b/src/NotecardConnectionHandler.h @@ -28,7 +28,7 @@ ******************************************************************************/ #define NOTECARD_CONNECTION_HANDLER_VERSION_MAJOR 1 -#define NOTECARD_CONNECTION_HANDLER_VERSION_MINOR 0 +#define NOTECARD_CONNECTION_HANDLER_VERSION_MINOR 1 #define NOTECARD_CONNECTION_HANDLER_VERSION_PATCH 1 #define NOTECARD_CONNECTION_HANDLER_VERSION NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_MAJOR) "." NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_MINOR) "." NOTE_C_STRINGIZE(NOTECARD_CONNECTION_HANDLER_VERSION_PATCH) From 8014ed99588906e6d047a0b97f4006c6e535cf9c Mon Sep 17 00:00:00 2001 From: Mattia Pennasilico Date: Mon, 10 Mar 2025 12:20:09 +0100 Subject: [PATCH 5/5] Release 1.0.1 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index a40fac0e..f3c10c58 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_ConnectionHandler -version=1.0.0 +version=1.0.1 author=Ubi de Feo, Cristian Maglie, Andrea Catozzi, Alexander Entinger et al. maintainer=Arduino sentence=Arduino Library for network connection management (WiFi, GSM, NB, [Ethernet], Notecard) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy