From cec7846588fc0a77da8a3db7bb190ccb99480386 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Thu, 14 Aug 2025 12:41:49 +0200 Subject: [PATCH 1/6] fix provisioning sketch for opta lite --- examples/utility/Provisioning_2.0/ClaimingHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/utility/Provisioning_2.0/ClaimingHandler.cpp b/examples/utility/Provisioning_2.0/ClaimingHandler.cpp index 0db7e494a..1aab5409e 100644 --- a/examples/utility/Provisioning_2.0/ClaimingHandler.cpp +++ b/examples/utility/Provisioning_2.0/ClaimingHandler.cpp @@ -12,6 +12,7 @@ #include #include "utility/HCI.h" #include +#include "ANetworkConfigurator_Config.h" #define SLOT_BOARD_PRIVATE_KEY 1 @@ -150,6 +151,9 @@ void ClaimingHandlerClass::resetStoredCredReqHandler() { void ClaimingHandlerClass::getBLEMacAddressReqHandler() { uint8_t mac[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +#ifdef ARDUINO_OPTA + if(_getPid_() == OPTA_WIFI_PID) { +#endif bool activated = false; ConfiguratorAgent * connectedAgent = _agentManager.getConnectedAgent(); if(!_agentManager.isAgentEnabled(ConfiguratorAgent::AgentTypes::BLE) || (connectedAgent != nullptr && @@ -168,7 +172,9 @@ void ClaimingHandlerClass::getBLEMacAddressReqHandler() { if (activated) { BLE.end(); } - +#ifdef ARDUINO_OPTA + } +#endif ProvisioningOutputMessage outputMsg; outputMsg.type = MessageOutputType::BLE_MAC_ADDRESS; outputMsg.m.BLEMacAddress = mac; From caf059792568f7e1fc903f19bbadc61244b1bcbe Mon Sep 17 00:00:00 2001 From: fabik111 Date: Thu, 14 Aug 2025 15:26:23 +0200 Subject: [PATCH 2/6] change default value for ble mac address to ff:ff:ff:ff:ff:ff --- examples/utility/Provisioning_2.0/ClaimingHandler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/utility/Provisioning_2.0/ClaimingHandler.cpp b/examples/utility/Provisioning_2.0/ClaimingHandler.cpp index 1aab5409e..e2567e084 100644 --- a/examples/utility/Provisioning_2.0/ClaimingHandler.cpp +++ b/examples/utility/Provisioning_2.0/ClaimingHandler.cpp @@ -149,7 +149,10 @@ void ClaimingHandlerClass::resetStoredCredReqHandler() { } void ClaimingHandlerClass::getBLEMacAddressReqHandler() { - uint8_t mac[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + /* Set the default MAC address as ff:ff:ff:ff:ff:ff for compatibility + * with the Arduino IoT Cloud WebUI + */ + uint8_t mac[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #ifdef ARDUINO_OPTA if(_getPid_() == OPTA_WIFI_PID) { From b6669350fbcc2ed4038f4cc76fa7dfc154e4cb41 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Mon, 18 Aug 2025 10:41:41 +0200 Subject: [PATCH 3/6] Provisioning v0.3.3 --- examples/utility/Provisioning_2.0/Provisioning_2.0.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/utility/Provisioning_2.0/Provisioning_2.0.ino b/examples/utility/Provisioning_2.0/Provisioning_2.0.ino index 976d99805..7f8f44ceb 100644 --- a/examples/utility/Provisioning_2.0/Provisioning_2.0.ino +++ b/examples/utility/Provisioning_2.0/Provisioning_2.0.ino @@ -15,7 +15,7 @@ #include #include "utility/LEDFeedback.h" -const char *SKETCH_VERSION = "0.3.0"; +const char *SKETCH_VERSION = "0.3.3"; enum class DeviceState { HARDWARE_CHECK, From d4233315d16580dd8fb6d6f1f35fe9d7dd9acb08 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Mon, 18 Aug 2025 10:51:28 +0200 Subject: [PATCH 4/6] add compile flow update NetworkConfigurator --- .github/workflows/compile-provisioning.yml | 246 +++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 .github/workflows/compile-provisioning.yml diff --git a/.github/workflows/compile-provisioning.yml b/.github/workflows/compile-provisioning.yml new file mode 100644 index 000000000..1bbbccf5a --- /dev/null +++ b/.github/workflows/compile-provisioning.yml @@ -0,0 +1,246 @@ +name: Compile Provisioning + +on: + pull_request: + paths: + - ".github/workflows/compile-provisioning.yml" + - "examples/**" + - "src/**" + push: + paths: + - ".github/workflows/compile-provisioning.yml" + - "examples/**" + - "src/**" + +jobs: + build: + runs-on: ubuntu-latest + + env: + # libraries to install for all boards + UNIVERSAL_LIBRARIES: | + # Install the ArduinoIoTCloud library from the repository + - source-path: ./ + - name: ArduinoBLE + version: 1.4.0 + - name: ArduinoHttpClient + version: 0.6.1 + - name: Arduino_DebugUtils + version: 1.4.0 + - name: ArduinoMqttClient + version: 0.1.8 + - name: Arduino_KVStore + version: 1.0.0 + - source-url: https://github.com/pennam/Arduino_ConnectionHandler.git + version: 0f0f4a4ce718fcf2066a092a92cc2fdcd4d8bedd + - name: Arduino_SecureElement + version: 0.4.0 + - name: Arduino_CloudUtils + version: 1.1.1 + - source-url: https://github.com/arduino-libraries/Arduino_UniqueHWId.git + version: 7e1bfeb586cac00f043c39997a1e9937ed8152b0 + - source-url: https://github.com/arduino-libraries/Arduino_NetworkConfigurator.git + version: 27f57ba238cc48ca5e54b904175bd5e106f661db + # sketch paths to compile (recursive) for all boards + UNIVERSAL_SKETCH_PATHS: | + - examples/utility/Provisioning_2.0 + SKETCHES_REPORTS_PATH: sketches-reports + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:samd:mkrwifi1010 + type: nina + artifact-name-suffix: arduino-samd-mkrwifi1010 + - fqbn: arduino:samd:nano_33_iot + type: nina + artifact-name-suffix: arduino-samd-nano_33_iot + - fqbn: arduino:mbed_portenta:envie_m7:split=100_0 + type: mbed_portenta + artifact-name-suffix: arduino-mbed_portenta-envie_m7 + - fqbn: arduino:mbed_nano:nanorp2040connect + type: nina + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect + - fqbn: arduino:mbed_nicla:nicla_vision + type: mbed_nicla + artifact-name-suffix: arduino-mbed_nicla-nicla_vision + - fqbn: arduino:mbed_opta:opta + type: mbed_opta + artifact-name-suffix: arduino-mbed_opta-opta + - fqbn: arduino:mbed_giga:giga + type: mbed_giga + artifact-name-suffix: arduino-mbed_giga-giga + - fqbn: arduino:renesas_portenta:portenta_c33 + type: renesas_portenta + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 + - fqbn: arduino:renesas_uno:unor4wifi + type: renesas_uno + artifact-name-suffix: arduino-renesas_uno-unor4wifi + + # make board type-specific customizations to the matrix jobs + include: + # MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect + - board: + type: nina + platforms: | + # Install samd and mbed_nano platform via Boards Manager + - name: arduino:samd + version: 1.8.14 + - name: arduino:mbed_nano + version: 4.3.1 + libraries: | + - name: RTCZero + version: 1.6.0 + - name: ArduinoECCX08 + version: 1.3.9 + - name: Adafruit SleepyDog Library + version: 1.6.5 + - name: ArduinoBearSSL + version: 1.7.6 + - source-url: https://github.com/arduino-libraries/WiFiNINA.git + version: 69e786c5c73fe94b7f408853550f6f151cfc58b0 + # Portenta + - board: + type: mbed_portenta + platforms: | + # Install mbed_portenta platform via Boards Manager + - name: arduino:mbed_portenta + version: 4.3.1 + libraries: | + - source-url: https://github.com/pennam/Arduino_Cellular.git + version: bfbd25791d200b113d640e16eed43ce547ab0b0c + - name: ArduinoECCX08 + version: 1.3.9 + - name: StreamDebugger + version: 1.0.1 + - name: TinyGsm + version: 0.12.0 + - name: ArduinoBearSSL + version: 1.7.6 + # Nicla Vision + - board: + type: mbed_nicla + platforms: | + # Install mbed_nicla platform via Boards Manager + - name: arduino:mbed_nicla + version: 4.3.1 + # Opta + - board: + type: mbed_opta + platforms: | + # Install mbed_opta platform via Boards Manager + - name: arduino:mbed_opta + version: 4.3.1 + libraries: | + - name: ArduinoECCX08 + version: 1.3.9 + - name: ArduinoBearSSL + version: 1.7.6 + # GIGA + - board: + type: mbed_giga + platforms: | + # Install mbed_giga platform via Boards Manager + - name: arduino:mbed_giga + version: 4.3.1 + libraries: | + - name: ArduinoECCX08 + version: 1.3.9 + - name: ArduinoBearSSL + version: 1.7.6 + # Portenta C33 + - board: + type: renesas_portenta + platforms: | + # Install renesas_portenta platform via Boards Manager + - name: arduino:renesas_portenta + version: 1.4.1 + libraries: | + - source-url: https://github.com/pennam/Arduino_Cellular.git + version: bfbd25791d200b113d640e16eed43ce547ab0b0c + - name: StreamDebugger + version: 1.0.1 + - name: TinyGsm + version: 0.12.0 + # UNO R4 WiFi + - board: + type: renesas_uno + platforms: | + # Install renesas_uno platform via Boards Manager + - name: arduino:renesas_uno + version: 1.4.1 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Clear cache + run: | + rm -rf ~/.cache + - name: Compile production provisioning sketch + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + platforms: ${{ matrix.platforms }} + fqbn: ${{ matrix.board.fqbn }} + libraries: | + ${{ env.UNIVERSAL_LIBRARIES }} + ${{ matrix.libraries }} + sketch-paths: | + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.sketch-paths }} + enable-deltas-report: "false" + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + cli-compile-flags: | + - --clean + - --verbose + - --output-dir + - ${{ runner.temp }}/provisioning-prod + - name: Compile staging provisioning sketch + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + platforms: ${{ matrix.platforms }} + fqbn: ${{ matrix.board.fqbn }} + libraries: | + ${{ env.UNIVERSAL_LIBRARIES }} + ${{ matrix.libraries }} + sketch-paths: | + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.sketch-paths }} + enable-deltas-report: "false" + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + cli-compile-flags: | + - --clean + - --verbose + - --build-property + - "build.extra_flags=-DCOMPILE_TEST=1" + - --output-dir + - ${{ runner.temp }}/provisioning-staging + - name: Write data to size trends report spreadsheet + # Update report on every push to the master branch + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + uses: arduino/report-size-trends@main + with: + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + google-key-file: ${{ secrets.GOOGLE_KEY_FILE }} + spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4 + + - name: Save memory usage change report as artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: sketches-report-${{ matrix.board.artifact-name-suffix }} + path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save production artifact + uses: actions/upload-artifact@v4 + with: + name: provisioning-prod-${{ matrix.board.artifact-name-suffix }} + path: ${{ runner.temp }}/provisioning-prod/ + + - name: Save staging artifact + uses: actions/upload-artifact@v4 + with: + name: provisioning-staging-${{ matrix.board.artifact-name-suffix }} + path: ${{ runner.temp }}/provisioning-staging/ From e289ae5d08be7689a347693d0d65878de26e9088 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Tue, 19 Aug 2025 16:55:21 +0200 Subject: [PATCH 5/6] update NetworkConfigurator version for fixing leds of opta lite --- .github/workflows/compile-provisioning.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-provisioning.yml b/.github/workflows/compile-provisioning.yml index 1bbbccf5a..d18bbd719 100644 --- a/.github/workflows/compile-provisioning.yml +++ b/.github/workflows/compile-provisioning.yml @@ -40,7 +40,7 @@ jobs: - source-url: https://github.com/arduino-libraries/Arduino_UniqueHWId.git version: 7e1bfeb586cac00f043c39997a1e9937ed8152b0 - source-url: https://github.com/arduino-libraries/Arduino_NetworkConfigurator.git - version: 27f57ba238cc48ca5e54b904175bd5e106f661db + version: 32eef45a907bc887f1ba2ed6e758bc21576a9dea # sketch paths to compile (recursive) for all boards UNIVERSAL_SKETCH_PATHS: | - examples/utility/Provisioning_2.0 From 881a4b4facee3defdc8d538d02c93f2f22d20e52 Mon Sep 17 00:00:00 2001 From: fabik111 Date: Tue, 19 Aug 2025 16:56:16 +0200 Subject: [PATCH 6/6] Provisioning v0.3.4 --- examples/utility/Provisioning_2.0/Provisioning_2.0.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/utility/Provisioning_2.0/Provisioning_2.0.ino b/examples/utility/Provisioning_2.0/Provisioning_2.0.ino index 7f8f44ceb..af5e47901 100644 --- a/examples/utility/Provisioning_2.0/Provisioning_2.0.ino +++ b/examples/utility/Provisioning_2.0/Provisioning_2.0.ino @@ -15,7 +15,7 @@ #include #include "utility/LEDFeedback.h" -const char *SKETCH_VERSION = "0.3.3"; +const char *SKETCH_VERSION = "0.3.4"; enum class DeviceState { HARDWARE_CHECK,