From 55336434a859ccfc830379f56297a9e6f17a6ee0 Mon Sep 17 00:00:00 2001 From: Sandeep Mistry Date: Wed, 18 Sep 2019 12:15:20 -0400 Subject: [PATCH 01/13] Fix for advertised service data not working --- src/utility/GAP.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utility/GAP.cpp b/src/utility/GAP.cpp index ae2e90cd..e0646c2f 100644 --- a/src/utility/GAP.cpp +++ b/src/utility/GAP.cpp @@ -79,7 +79,7 @@ int GAPClass::advertise() uint8_t type = (_connectable) ? 0x00 : (_localName ? 0x02 : 0x03); - _advertising = false; + stopAdvertise(); if (HCI.leSetAdvertisingParameters(_advertisingInterval, _advertisingInterval, type, 0x00, 0x00, directBdaddr, 0x07, 0) != 0) { return 0; @@ -110,7 +110,7 @@ int GAPClass::advertise() advertisingDataLen += (2 + _manufacturerDataLength); } - if (_serviceData && _serviceDataLength > 0 && advertisingDataLen >= (_serviceDataLength + 4)) { + if (_serviceData && _serviceDataLength > 0 && (sizeof(advertisingData) - advertisingDataLen) >= (_serviceDataLength + 4)) { advertisingData[advertisingDataLen++] = _serviceDataLength + 3; advertisingData[advertisingDataLen++] = 0x16; @@ -153,7 +153,7 @@ int GAPClass::advertise() return 0; } - _advertising = false; + _advertising = true; return 1; } From 097043ab28822bb01cae663a2dbf5da7ca8dabd8 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 23 Mar 2020 15:33:51 +0100 Subject: [PATCH 02/13] setManufacturerData: allocate tmpManufacturerData in the heap --- src/utility/GAP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/GAP.cpp b/src/utility/GAP.cpp index ae2e90cd..c88e6448 100644 --- a/src/utility/GAP.cpp +++ b/src/utility/GAP.cpp @@ -56,7 +56,7 @@ void GAPClass::setManufacturerData(const uint8_t manufacturerData[], int manufac void GAPClass::setManufacturerData(const uint16_t companyId, const uint8_t manufacturerData[], int manufacturerDataLength) { - uint8_t tmpManufacturerData[manufacturerDataLength + 2]; + uint8_t* tmpManufacturerData = (uint8_t*)malloc(manufacturerDataLength + 2); tmpManufacturerData[0] = companyId & 0xff; tmpManufacturerData[1] = companyId >> 8; memcpy(&tmpManufacturerData[2], manufacturerData, manufacturerDataLength); From e83c3ce219ef2d3d29183bccdd673c730343369b Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 23 Mar 2020 15:34:13 +0100 Subject: [PATCH 03/13] Make advertisingData creation more generic This commit prepares for sending manufacturerData and ServiceUuid in the same advertisement (not sure if possible, anyway) --- src/utility/GAP.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/utility/GAP.cpp b/src/utility/GAP.cpp index c88e6448..e3d2f206 100644 --- a/src/utility/GAP.cpp +++ b/src/utility/GAP.cpp @@ -97,17 +97,17 @@ int GAPClass::advertise() BLEUuid uuid(_advertisedServiceUuid); int uuidLen = uuid.length(); - advertisingData[3] = 1 + uuidLen; - advertisingData[4] = (uuidLen > 2) ? 0x06 : 0x02; - memcpy(&advertisingData[5], uuid.data(), uuidLen); + advertisingData[advertisingDataLen++] = 1 + uuidLen; + advertisingData[advertisingDataLen++] = (uuidLen > 2) ? 0x06 : 0x02; + memcpy(&advertisingData[advertisingDataLen], uuid.data(), uuidLen); - advertisingDataLen += (2 + uuidLen); + advertisingDataLen += uuidLen; } else if (_manufacturerData && _manufacturerDataLength) { - advertisingData[3] = 1 + _manufacturerDataLength; - advertisingData[4] = 0xff; - memcpy(&advertisingData[5], _manufacturerData, _manufacturerDataLength); + advertisingData[advertisingDataLen++] = 1 + _manufacturerDataLength; + advertisingData[advertisingDataLen++] = 0xff; + memcpy(&advertisingData[advertisingDataLen], _manufacturerData, _manufacturerDataLength); - advertisingDataLen += (2 + _manufacturerDataLength); + advertisingDataLen += _manufacturerDataLength; } if (_serviceData && _serviceDataLength > 0 && advertisingDataLen >= (_serviceDataLength + 4)) { From 8a49b8c1e0ac195db38a0639378a1b50b7bdd566 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Fri, 8 May 2020 16:48:49 +0200 Subject: [PATCH 04/13] Adapt to Portenta H7 via HCI --- src/local/BLELocalDevice.cpp | 13 +++++++++++++ src/utility/ATT.h | 4 +++- src/utility/HCICordioTransport.cpp | 8 ++++---- src/utility/HCIUartTransport.cpp | 8 +++++++- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/local/BLELocalDevice.cpp b/src/local/BLELocalDevice.cpp index d2c8a1b3..57477e23 100644 --- a/src/local/BLELocalDevice.cpp +++ b/src/local/BLELocalDevice.cpp @@ -25,6 +25,12 @@ #include "BLELocalDevice.h" +#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +#ifndef BT_REG_ON +#define BT_REG_ON PJ_12 +#endif +#endif + BLELocalDevice::BLELocalDevice() { } @@ -54,6 +60,10 @@ int BLELocalDevice::begin() delay(100); digitalWrite(NINA_RESETN, HIGH); delay(750); +#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) + // BT_REG_ON -> HIGH + pinMode(BT_REG_ON, OUTPUT); + digitalWrite(BT_REG_ON, HIGH); #endif @@ -123,6 +133,9 @@ void BLELocalDevice::end() #elif defined(ARDUINO_SAMD_NANO_33_IOT) // disable the NINA digitalWrite(NINA_RESETN, LOW); +#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) + // BT_REG_ON -> LOW + digitalWrite(BT_REG_ON, LOW); #endif } diff --git a/src/utility/ATT.h b/src/utility/ATT.h index 2d006841..6a1611aa 100644 --- a/src/utility/ATT.h +++ b/src/utility/ATT.h @@ -26,7 +26,9 @@ #define ATT_CID 0x0004 -#ifdef DM_CONN_MAX +#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +#define ATT_MAX_PEERS 7 +#elif DM_CONN_MAX #define ATT_MAX_PEERS DM_CONN_MAX // Mbed + Cordio #else #define ATT_MAX_PEERS 3 diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index f2a83d97..255d4c14 100644 --- a/src/utility/HCICordioTransport.cpp +++ b/src/utility/HCICordioTransport.cpp @@ -17,12 +17,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef ARDUINO_ARCH_MBED +#if defined(ARDUINO_ARCH_MBED) && defined(CORDIO_ZERO_COPY_HCI) #include #include -#include +#include // Parts of this file are based on: https://github.com/ARMmbed/mbed-os-cordio-hci-passthrough/pull/2 // With permission from the Arm Mbed team to re-license @@ -155,7 +155,7 @@ static void bleLoop() } #else while(true) { - rtos::Thread::wait(osWaitForever); + rtos::ThisThread::sleep_for(osWaitForever); } #endif // CORDIO_ZERO_COPY_HCI } @@ -242,7 +242,7 @@ size_t HCICordioTransportClass::write(const uint8_t* data, size_t length) return CordioHCIHook::getTransportDriver().write(packetType, packetLength, packet); #else - return CordioHCIHook::.getTransportDriver().write(packetType, packetLength, &data[1]); + return CordioHCIHook::getTransportDriver().write(packetType, packetLength, (uint8_t*)&data[1]); #endif } diff --git a/src/utility/HCIUartTransport.cpp b/src/utility/HCIUartTransport.cpp index 6f33e2ef..50b42df2 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 */ -#ifndef ARDUINO_ARCH_MBED +#if !defined(ARDUINO_ARCH_MBED) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) #include "HCIUartTransport.h" @@ -25,6 +25,10 @@ #define SerialHCI Serial2 #elif defined(ARDUINO_SAMD_NANO_33_IOT) // SerialHCI is already defined in the variant +#elif defined(ARDUINO_PORTENTA_H7_M4) +// SerialHCI is already defined in the variant +#elif defined(ARDUINO_PORTENTA_H7_M7) +#define SerialHCI Serial2 #else #error "Unsupported board selected!" #endif @@ -91,6 +95,8 @@ size_t HCIUartTransportClass::write(const uint8_t* data, size_t length) #ifdef ARDUINO_AVR_UNO_WIFI_REV2 HCIUartTransportClass HCIUartTransport(SerialHCI, 119600); +#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +HCIUartTransportClass HCIUartTransport(SerialHCI, 115200); #else HCIUartTransportClass HCIUartTransport(SerialHCI, 912600); #endif From d435309d3da0a3b804e085b905e1a2152f680751 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 18 May 2020 17:29:27 +0200 Subject: [PATCH 05/13] Portenta: use Cordio HCI wrapper --- src/utility/HCICordioTransport.cpp | 4 +++- src/utility/HCIUartTransport.cpp | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index 255d4c14..366eced8 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) && defined(CORDIO_ZERO_COPY_HCI) +#if defined(ARDUINO_ARCH_MBED) #include #include @@ -183,6 +183,8 @@ int HCICordioTransportClass::begin() #endif CordioHCIHook::getDriver().initialize(); + CordioHCIHook::getDriver().start_reset_sequence(); + bleLoopThread.start(bleLoop); CordioHCIHook::setDataReceivedHandler(HCICordioTransportClass::onDataReceived); diff --git a/src/utility/HCIUartTransport.cpp b/src/utility/HCIUartTransport.cpp index 50b42df2..9a5f4087 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) || defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +#if !defined(ARDUINO_ARCH_MBED) #include "HCIUartTransport.h" @@ -95,8 +95,6 @@ size_t HCIUartTransportClass::write(const uint8_t* data, size_t length) #ifdef ARDUINO_AVR_UNO_WIFI_REV2 HCIUartTransportClass HCIUartTransport(SerialHCI, 119600); -#elif defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) -HCIUartTransportClass HCIUartTransport(SerialHCI, 115200); #else HCIUartTransportClass HCIUartTransport(SerialHCI, 912600); #endif From 3b228dc90262751bdac97712a6c7bda95fcf3a5c Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Wed, 3 Jun 2020 14:50:04 +0200 Subject: [PATCH 06/13] Restore functionality on Nano33BLE - core 1.1.4 --- src/utility/HCICordioTransport.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index 366eced8..1de5b4ce 100644 --- a/src/utility/HCICordioTransport.cpp +++ b/src/utility/HCICordioTransport.cpp @@ -22,6 +22,7 @@ #include #include +#include #include // Parts of this file are based on: https://github.com/ARMmbed/mbed-os-cordio-hci-passthrough/pull/2 From 693268ddbceaee0c60dafab806560f59087ac940 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Mon, 29 Jun 2020 10:28:56 +0200 Subject: [PATCH 07/13] Update to 1.1.3 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 57b7877c..2d531f3a 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ArduinoBLE -version=1.1.2 +version=1.1.3 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 e815be36e76fd55a9e6cd18c6bdcbda3b63408b0 Mon Sep 17 00:00:00 2001 From: Martino Facchin Date: Thu, 2 Jul 2020 15:55:04 +0200 Subject: [PATCH 08/13] CordioHCILoop: properly terminate bleLoop thread Fixes https://github.com/arduino-libraries/ArduinoBLE/issues/65 --- src/utility/HCICordioTransport.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index 1de5b4ce..15f0e128 100644 --- a/src/utility/HCICordioTransport.cpp +++ b/src/utility/HCICordioTransport.cpp @@ -162,7 +162,7 @@ static void bleLoop() } static rtos::EventFlags bleEventFlags; -static rtos::Thread bleLoopThread; +static rtos::Thread* bleLoopThread = NULL; HCICordioTransportClass::HCICordioTransportClass() : @@ -186,7 +186,10 @@ int HCICordioTransportClass::begin() CordioHCIHook::getDriver().initialize(); CordioHCIHook::getDriver().start_reset_sequence(); - bleLoopThread.start(bleLoop); + if (bleLoopThread == NULL) { + bleLoopThread = new rtos::Thread(); + bleLoopThread->start(bleLoop); + } CordioHCIHook::setDataReceivedHandler(HCICordioTransportClass::onDataReceived); @@ -197,7 +200,11 @@ int HCICordioTransportClass::begin() void HCICordioTransportClass::end() { - bleLoopThread.terminate(); + if (bleLoopThread != NULL) { + bleLoopThread->terminate(); + delete bleLoopThread; + bleLoopThread = NULL; + } CordioHCIHook::getDriver().terminate(); From 4e5dccda2b29a3e823079ecdc194274e70a114b4 Mon Sep 17 00:00:00 2001 From: RobVS Date: Mon, 13 Jul 2020 20:51:10 -0400 Subject: [PATCH 09/13] PDU rejected due to wrong opcode set in 'Request Opcode In Error' 3.4.1.1 of ATT protocol spec suggests that in the ATT_ERROR_RSP, the Request Opcode In Error should be set to the request that generated the error. In this case it looks like it should actually be ATT_FIND_BY_TYPE_VALUE_REQ (ATT_OP_READ_BY_GROUP_REQ) --- src/utility/ATT.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utility/ATT.cpp b/src/utility/ATT.cpp index 2696960e..8c8c20c0 100644 --- a/src/utility/ATT.cpp +++ b/src/utility/ATT.cpp @@ -756,7 +756,7 @@ void ATTClass::findByTypeReq(uint16_t connectionHandle, uint16_t mtu, uint8_t dl } *findByTypeReq = (FindByTypeReq*)data; if (dlen < sizeof(FindByTypeReq)) { - sendError(connectionHandle, ATT_OP_FIND_BY_TYPE_RESP, findByTypeReq->startHandle, ATT_ECODE_INVALID_PDU); + sendError(connectionHandle, ATT_OP_FIND_BY_TYPE_REQ, findByTypeReq->startHandle, ATT_ECODE_INVALID_PDU); return; } @@ -794,7 +794,7 @@ void ATTClass::findByTypeReq(uint16_t connectionHandle, uint16_t mtu, uint8_t dl } if (responseLength == 1) { - sendError(connectionHandle, ATT_OP_FIND_BY_TYPE_RESP, findByTypeReq->startHandle, ATT_ECODE_ATTR_NOT_FOUND); + sendError(connectionHandle, ATT_OP_FIND_BY_TYPE_REQ, findByTypeReq->startHandle, ATT_ECODE_ATTR_NOT_FOUND); } else { HCI.sendAclPkt(connectionHandle, ATT_CID, responseLength, response); } From 3074107d6ea9f9d85825acf90219987ed8dd793e Mon Sep 17 00:00:00 2001 From: Paolo Calao Date: Tue, 21 Jul 2020 21:12:37 +0200 Subject: [PATCH 10/13] Fix discovery of descriptors The 'nextCharacteristic' selection was wrong. Thus, when using nextCharacteristic for taking the end handle for the request, the end handle of the current characteristic was taken. This resulted in the following condition to be true: (reqStartHandle > reqEndHandle) For such reason, in many cases the descriptors were not retrieved. Specifically, all the characteristics of a service, except the last one, will result without descriptors. This will result in an error where trying to subscribe to a characteristic which has a descriptor before the CCCD one. (for instance the User Description Descriptor) In case the subscription is made on a characteristic having the CCCD as first descriptor there are no errors, because if no descriptors are found the write request, needed for the subscription, will be made to the char value handle + 1. --- src/utility/ATT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/ATT.cpp b/src/utility/ATT.cpp index 8c8c20c0..296caeee 100644 --- a/src/utility/ATT.cpp +++ b/src/utility/ATT.cpp @@ -1561,7 +1561,7 @@ bool ATTClass::discoverDescriptors(uint16_t connectionHandle, BLERemoteDevice* d for (int j = 0; j < characteristicCount; j++) { BLERemoteCharacteristic* characteristic = service->characteristic(j); - BLERemoteCharacteristic* nextCharacteristic = (j == (characteristicCount - 1)) ? NULL : service->characteristic(j); + BLERemoteCharacteristic* nextCharacteristic = (j == (characteristicCount - 1)) ? NULL : service->characteristic(j + 1); reqStartHandle = characteristic->valueHandle() + 1; reqEndHandle = nextCharacteristic ? nextCharacteristic->valueHandle() : serviceEndHandle; From 405c59feb2b174cb6ddb19d59c70fb88b826b1ad Mon Sep 17 00:00:00 2001 From: Kris Dunning Date: Mon, 8 Jun 2020 13:49:31 +0100 Subject: [PATCH 11/13] Fix spelling mistake in scan examples --- examples/Central/Scan/Scan.ino | 2 +- examples/Central/ScanCallback/ScanCallback.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/Central/Scan/Scan.ino b/examples/Central/Scan/Scan.ino index 784f3058..3126d1a6 100644 --- a/examples/Central/Scan/Scan.ino +++ b/examples/Central/Scan/Scan.ino @@ -2,7 +2,7 @@ Scan This example scans for BLE peripherals and prints out their advertising details: - address, local name, adverised service UUID's. + address, local name, advertised service UUID's. The circuit: - Arduino MKR WiFi 1010, Arduino Uno WiFi Rev2 board, Arduino Nano 33 IoT, diff --git a/examples/Central/ScanCallback/ScanCallback.ino b/examples/Central/ScanCallback/ScanCallback.ino index 9583079c..28ab9e9e 100644 --- a/examples/Central/ScanCallback/ScanCallback.ino +++ b/examples/Central/ScanCallback/ScanCallback.ino @@ -2,7 +2,7 @@ Scan Callback This example scans for BLE peripherals and prints out their advertising details: - address, local name, adverised service UUIDs. Unlike the Scan example, it uses + address, local name, advertised service UUIDs. Unlike the Scan example, it uses the callback style APIs and disables filtering so the peripheral discovery is reported for every single advertisement it makes. From de44016689091c99425f671082ba65495f5e962a Mon Sep 17 00:00:00 2001 From: Paolo Calao Date: Wed, 2 Sep 2020 10:46:28 +0200 Subject: [PATCH 12/13] [portenta] Send service pack updates through mbed initialization The mbed ble stack is initialized at the beginning in order to exploit the service pack transfer. Once it has been initialized, the queue used to dispatch the ble events is stopped. At this point the mbed stack is no more used and ArduinoBLE exploits directly the low level uart transport layer. --- src/utility/HCICordioTransport.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/utility/HCICordioTransport.cpp b/src/utility/HCICordioTransport.cpp index 15f0e128..ab92818b 100644 --- a/src/utility/HCICordioTransport.cpp +++ b/src/utility/HCICordioTransport.cpp @@ -25,6 +25,11 @@ #include #include +#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +#include "ble/BLE.h" +#include +#endif + // Parts of this file are based on: https://github.com/ARMmbed/mbed-os-cordio-hci-passthrough/pull/2 // With permission from the Arm Mbed team to re-license @@ -174,6 +179,17 @@ HCICordioTransportClass::~HCICordioTransportClass() { } +#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) +events::EventQueue eventQueue(10 * EVENTS_EVENT_SIZE); +void scheduleMbedBleEvents(BLE::OnEventsToProcessCallbackContext *context) { + eventQueue.call(mbed::Callback(&context->ble, &BLE::processEvents)); +} + +void completeCallback(BLE::InitializationCompleteCallbackContext *context) { + eventQueue.break_dispatch(); +} +#endif + int HCICordioTransportClass::begin() { _rxBuf.clear(); @@ -183,8 +199,20 @@ int HCICordioTransportClass::begin() init_wsf(bufPoolDesc); #endif +#if defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) + BLE &ble = BLE::Instance(); + ble.onEventsToProcess(scheduleMbedBleEvents); + + ble.init(completeCallback); + eventQueue.dispatch(10000); + + if (!ble.hasInitialized()){ + return 0; + } +#else CordioHCIHook::getDriver().initialize(); CordioHCIHook::getDriver().start_reset_sequence(); +#endif if (bleLoopThread == NULL) { bleLoopThread = new rtos::Thread(); @@ -205,7 +233,6 @@ void HCICordioTransportClass::end() delete bleLoopThread; bleLoopThread = NULL; } - CordioHCIHook::getDriver().terminate(); _begun = false; From 14fd996cf56952864e2b9860e04bbe379cb4e169 Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Thu, 24 Sep 2020 15:20:31 +0200 Subject: [PATCH 13/13] Fix compilation warning --- src/utility/GAP.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/GAP.h b/src/utility/GAP.h index b1b1cf48..cc64aab5 100644 --- a/src/utility/GAP.h +++ b/src/utility/GAP.h @@ -77,7 +77,7 @@ class GAPClass { uint16_t _serviceDataUuid; const uint8_t* _serviceData; - int _serviceDataLength; + uint32_t _serviceDataLength; BLEDeviceEventHandler _discoverEventHandler; BLELinkedList _discoveredDevices;