From 618fd8e8d509f7d9aacd66bd707434ec1153757f Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 1 Mar 2021 13:11:06 +0100 Subject: [PATCH 01/11] Support Nano RP2040 Connect --- src/local/BLELocalDevice.cpp | 6 +++--- src/utility/HCIUartTransport.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/local/BLELocalDevice.cpp b/src/local/BLELocalDevice.cpp index 0ca0220f..45d975a5 100644 --- a/src/local/BLELocalDevice.cpp +++ b/src/local/BLELocalDevice.cpp @@ -42,7 +42,7 @@ BLELocalDevice::~BLELocalDevice() int BLELocalDevice::begin() { -#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT) // reset the NINA in BLE mode pinMode(SPIWIFI_SS, OUTPUT); pinMode(NINA_RESETN, OUTPUT); @@ -55,7 +55,7 @@ int BLELocalDevice::begin() delay(100); digitalWrite(NINA_RESETN, LOW); delay(750); -#elif defined(ARDUINO_SAMD_NANO_33_IOT) +#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT) // inverted reset digitalWrite(NINA_RESETN, LOW); delay(100); @@ -131,7 +131,7 @@ void BLELocalDevice::end() #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) // disable the NINA digitalWrite(NINA_RESETN, HIGH); -#elif defined(ARDUINO_SAMD_NANO_33_IOT) +#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT) // disable the NINA digitalWrite(NINA_RESETN, LOW); #elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) diff --git a/src/utility/HCIUartTransport.cpp b/src/utility/HCIUartTransport.cpp index 9a5f4087..ed7b2e59 100644 --- a/src/utility/HCIUartTransport.cpp +++ b/src/utility/HCIUartTransport.cpp @@ -23,7 +23,7 @@ #if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_AVR_UNO_WIFI_REV2) #define SerialHCI Serial2 -#elif defined(ARDUINO_SAMD_NANO_33_IOT) +#elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_NANO_RP2040_CONNECT) // SerialHCI is already defined in the variant #elif defined(ARDUINO_PORTENTA_H7_M4) // SerialHCI is already defined in the variant @@ -93,7 +93,7 @@ size_t HCIUartTransportClass::write(const uint8_t* data, size_t length) return result; } -#ifdef ARDUINO_AVR_UNO_WIFI_REV2 +#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_NANO_RP2040_CONNECT) HCIUartTransportClass HCIUartTransport(SerialHCI, 119600); #else HCIUartTransportClass HCIUartTransport(SerialHCI, 912600); From 2ccd5ecfea81c87d5c5de2ab45906c32faa2562d Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 8 Mar 2021 13:01:42 +0100 Subject: [PATCH 02/11] RP2040: enable BLE on mbed based core --- src/utility/HCICordioTransport.cpp | 2 +- src/utility/HCIUartTransport.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index 3363877e..01788238 100644 --- a/src/utility/HCICordioTransport.cpp +++ b/src/utility/HCICordioTransport.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#if defined(ARDUINO_ARCH_MBED) +#if defined(ARDUINO_ARCH_MBED) && !defined(TARGET_NANO_RP2040_CONNECT) #include #include diff --git a/src/utility/HCIUartTransport.cpp b/src/utility/HCIUartTransport.cpp index ed7b2e59..67bc173f 100644 --- a/src/utility/HCIUartTransport.cpp +++ b/src/utility/HCIUartTransport.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#if !defined(ARDUINO_ARCH_MBED) +#if !defined(ARDUINO_ARCH_MBED) || defined(TARGET_NANO_RP2040_CONNECT) #include "HCIUartTransport.h" From 425e62d6cd1becc0da188850ca1c2eacc7f0c9e1 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Sep 2020 16:13:57 -0700 Subject: [PATCH 03/11] Update version of actions/checkout action used in Compile Examples CI workflow The action now has a default fetch-depth value of 1, so there is no need to specify this input. --- .github/workflows/compile-examples.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 011d2f1e..c191eadc 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -14,9 +14,7 @@ jobs: ] steps: - - uses: actions/checkout@v1 - with: - fetch-depth: 1 + - uses: actions/checkout@v2 - uses: arduino/actions/libraries/compile-examples@master with: github-token: ${{ secrets.GITHUB_TOKEN }} From 3f706db4d6496047c38ead5c78e5eac2119a64b2 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Sep 2020 16:15:51 -0700 Subject: [PATCH 04/11] Update name of action used to compile examples in CI workflow The action has been moved to a dedicated repository, where all future development work will happen. --- .github/workflows/compile-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index c191eadc..eeef3302 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: arduino/actions/libraries/compile-examples@master + - uses: arduino/compile-sketches@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} fqbn: ${{ matrix.fqbn }} From 07965268a6cd5b4945fc212e850ae7038ae933d2 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Sep 2020 16:18:05 -0700 Subject: [PATCH 05/11] Use consistent formatting style in Compile Examples CI action The previous inconsistent markup style, although perfectly valid, made the workflow harder to understand. --- .github/workflows/compile-examples.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index eeef3302..43a87a57 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -1,17 +1,19 @@ name: Compile Examples -on: [push, pull_request] +on: + - push + - pull_request + jobs: build: runs-on: ubuntu-latest strategy: matrix: - fqbn: [ - "arduino:samd:mkrwifi1010", - "arduino:samd:nano_33_iot", - "arduino:megaavr:uno2018:mode=on", - "arduino:mbed:nano33ble" - ] + fqbn: + - arduino:samd:mkrwifi1010 + - arduino:samd:nano_33_iot + - arduino:megaavr:uno2018:mode=on + - arduino:mbed:nano33ble steps: - uses: actions/checkout@v2 From 489830abebfa5b7fffe8f60464af9a084934dd3c Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 26 Sep 2020 16:19:50 -0700 Subject: [PATCH 06/11] Use consistent indent size in Compile Examples workflow The initial single space indent made the workflow difficult to edit and harmed readability. --- .github/workflows/compile-examples.yml | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 43a87a57..abb566da 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -4,20 +4,20 @@ on: - pull_request jobs: - build: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-latest - strategy: - matrix: - fqbn: - - arduino:samd:mkrwifi1010 - - arduino:samd:nano_33_iot - - arduino:megaavr:uno2018:mode=on - - arduino:mbed:nano33ble + strategy: + matrix: + fqbn: + - arduino:samd:mkrwifi1010 + - arduino:samd:nano_33_iot + - arduino:megaavr:uno2018:mode=on + - arduino:mbed:nano33ble - steps: - - uses: actions/checkout@v2 - - uses: arduino/compile-sketches@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - fqbn: ${{ matrix.fqbn }} + steps: + - uses: actions/checkout@v2 + - uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + fqbn: ${{ matrix.fqbn }} From d59eb8c454c91b7a62b87dc538ca0250cb076b82 Mon Sep 17 00:00:00 2001 From: Paolo Calao Date: Mon, 12 Apr 2021 10:26:23 +0200 Subject: [PATCH 07/11] Update architecture support property --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index ef53d710..77c7013e 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Enables BLE connectivity on the Arduino MKR WiFi 1010, Arduino UNO WiFi paragraph=This library supports creating a BLE peripheral and BLE central mode. category=Communication url=https://www.arduino.cc/en/Reference/ArduinoBLE -architectures=samd,megaavr,mbed,apollo3 +architectures=samd,megaavr,mbed,apollo3,mbed_nano,mbed_portenta includes=ArduinoBLE.h From 23053fbc16d9dd69e5fc9902d764530cfac3cb66 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 5 May 2021 15:17:35 +0200 Subject: [PATCH 08/11] Update library.properties --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index f50f1b3c..58ac0226 100644 --- a/library.properties +++ b/library.properties @@ -2,7 +2,7 @@ name=STM32duinoBLE version=1.2.0 author=Arduino, SRA maintainer=stm32duino -sentence=Fork of ArduinoBLE library to add the support of SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP and BLUENRG-M0 BLE modules. +sentence=Fork of ArduinoBLE library to add the support of STM32WB, SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP and BLUENRG-M0 BLE modules. paragraph=This library supports creating a BLE peripheral and BLE central mode. category=Communication url=https://github.com/stm32duino/STM32duinoBLE From b22266fb1af7b16b26a86ebe41bcb68375a53f36 Mon Sep 17 00:00:00 2001 From: Paolo Calao Date: Tue, 18 May 2021 10:13:51 +0200 Subject: [PATCH 09/11] release 1.2.1 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 77c7013e..b6d464cc 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ArduinoBLE -version=1.2.0 +version=1.2.1 author=Arduino maintainer=Arduino sentence=Enables BLE connectivity on the Arduino MKR WiFi 1010, Arduino UNO WiFi Rev.2, Arduino Nano 33 IoT, and Arduino Nano 33 BLE. From ac6431e9e3c83f137defe794dc2bcdfe51ef83ad Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 8 Jul 2021 14:31:58 +0200 Subject: [PATCH 10/11] fix: remove specific include Correct CMSIS devide header already included by the core. Signed-off-by: Frederic Pillon --- src/utility/HCISharedMemTransport.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utility/HCISharedMemTransport.h b/src/utility/HCISharedMemTransport.h index e4bd6ed6..464a24f6 100644 --- a/src/utility/HCISharedMemTransport.h +++ b/src/utility/HCISharedMemTransport.h @@ -23,7 +23,6 @@ #include "HCITransport.h" /* STM32WB include files */ -#include "stm32wb55xx.h" #include "stm32wbxx_ll_rcc.h" #include "stm32wbxx_ll_ipcc.h" #include "stm32wbxx_ll_system.h" From faffc11b61b3b56e91914c0f9accba11c7fcac97 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Thu, 8 Jul 2021 14:33:34 +0200 Subject: [PATCH 11/11] examples: add STM32WB5MM-DK support Signed-off-by: Frederic Pillon --- examples/Central/LedControl/LedControl.ino | 3 +-- examples/Central/PeripheralExplorer/PeripheralExplorer.ino | 3 +-- examples/Central/Scan/Scan.ino | 3 +-- examples/Central/ScanCallback/ScanCallback.ino | 3 +-- examples/Central/SensorTagButton/SensorTagButton.ino | 3 +-- examples/Peripheral/ButtonLED/ButtonLED.ino | 3 +-- examples/Peripheral/CallbackLED/CallbackLED.ino | 3 +-- examples/Peripheral/LED/LED.ino | 3 +-- 8 files changed, 8 insertions(+), 16 deletions(-) diff --git a/examples/Central/LedControl/LedControl.ino b/examples/Central/LedControl/LedControl.ino index c1fc972c..2f64bc28 100644 --- a/examples/Central/LedControl/LedControl.ino +++ b/examples/Central/LedControl/LedControl.ino @@ -34,8 +34,7 @@ BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif const int buttonPin = PC13; // set buttonPin to digital pin PC13 -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Central/PeripheralExplorer/PeripheralExplorer.ino b/examples/Central/PeripheralExplorer/PeripheralExplorer.ino index 5bf1b2af..e5461fa5 100644 --- a/examples/Central/PeripheralExplorer/PeripheralExplorer.ino +++ b/examples/Central/PeripheralExplorer/PeripheralExplorer.ino @@ -31,8 +31,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Central/Scan/Scan.ino b/examples/Central/Scan/Scan.ino index eadadd46..bf1bef5f 100644 --- a/examples/Central/Scan/Scan.ino +++ b/examples/Central/Scan/Scan.ino @@ -28,8 +28,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Central/ScanCallback/ScanCallback.ino b/examples/Central/ScanCallback/ScanCallback.ino index c821a7fd..4d9bbc77 100644 --- a/examples/Central/ScanCallback/ScanCallback.ino +++ b/examples/Central/ScanCallback/ScanCallback.ino @@ -30,8 +30,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Central/SensorTagButton/SensorTagButton.ino b/examples/Central/SensorTagButton/SensorTagButton.ino index 714036df..c6377f9f 100644 --- a/examples/Central/SensorTagButton/SensorTagButton.ino +++ b/examples/Central/SensorTagButton/SensorTagButton.ino @@ -32,8 +32,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Peripheral/ButtonLED/ButtonLED.ino b/examples/Peripheral/ButtonLED/ButtonLED.ino index b9708986..c3f777d4 100644 --- a/examples/Peripheral/ButtonLED/ButtonLED.ino +++ b/examples/Peripheral/ButtonLED/ButtonLED.ino @@ -35,8 +35,7 @@ BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif const int buttonPin = PC13; // set buttonPin to digital pin PC13 -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Peripheral/CallbackLED/CallbackLED.ino b/examples/Peripheral/CallbackLED/CallbackLED.ino index beaa8868..28bf40a8 100644 --- a/examples/Peripheral/CallbackLED/CallbackLED.ino +++ b/examples/Peripheral/CallbackLED/CallbackLED.ino @@ -33,8 +33,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport); diff --git a/examples/Peripheral/LED/LED.ino b/examples/Peripheral/LED/LED.ino index aa39ebd3..2ea0e5ae 100644 --- a/examples/Peripheral/LED/LED.ino +++ b/examples/Peripheral/LED/LED.ino @@ -31,8 +31,7 @@ HCISpiTransportClass HCISpiTransport(SpiHCI, SPBTLE_RF, PD13, PE6, PA8, 8000000, BLELocalDevice BLEObj(&HCISpiTransport); BLELocalDevice& BLE = BLEObj; #endif -#elif defined(ARDUINO_P_NUCLEO_WB55RG) -/* PNUCLEO_WB55RG */ +#elif defined(ARDUINO_P_NUCLEO_WB55RG) || defined(ARDUINO_STM32WB5MM_DK) HCISharedMemTransportClass HCISharedMemTransport; #if !defined(FAKE_BLELOCALDEVICE) BLELocalDevice BLEObj(&HCISharedMemTransport);