ArduinoBLE library for Arduino

Related tags

Arduino ArduinoBLE
Overview

ArduinoBLE

Compile Examples Status Spell Check Status

Enables BLE connectivity on the Arduino MKR WiFi 1010, Arduino UNO WiFi Rev.2, Arduino Nano 33 IoT, and Arduino Nano 33 BLE.

This library supports creating a BLE peripheral and BLE central mode.

For the Arduino MKR WiFi 1010, Arduino UNO WiFi Rev.2, and Arduino Nano 33 IoT boards, it requires the NINA module to be running Arduino NINA-W102 firmware v1.2.0 or later.

For more information about this library please visit us at: https://www.arduino.cc/en/Reference/ArduinoBLE

License

Copyright (c) 2019 Arduino SA. All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Comments
  • Encryption at connection level?

    Encryption at connection level?

    I know ble works by broadcasting and that methods like ccm are available.

    In cryptography, a cipher block chaining message authentication code (CBC-MAC) is a technique for constructing a message authentication code from a block cipher. The message is encrypted with some block cipher algorithm in CBC mode to create a chain of blocks such that each block depends on the proper encryption of the previous block. This interdependence ensures that a change to any of the plaintext bits will cause the final encrypted block to change in a way that cannot be predicted or counteracted without knowing the key to the block cipher.

    The trouble with that is that anyone could publish a message and it would mess up the next block process of decryption, effectively rendering the encryption and communication useless and still be legal as defined by fcc part 15.

    Doesn’t this practically make ble useless as a protocol if there is no connection state tracking and layered encryption?

    type: enhancement conclusion: resolved topic: code 
    opened by andrewhodel 56
  • BLE.begin() -> BLE.end() -> BLE.begin() [again]

    BLE.begin() -> BLE.end() -> BLE.begin() [again]

    Hi guys,

    I am wondering if it is possible to turn off BLE when I do not need to send some data, and turn it on again when data is ready to be sent? I am trying to enable that part, but every time when BLE.end() function is called seems that I am not able to start the BLE again after some sleep time. In my case, I want to send the simple message from Arduino to my PC, and it works when BLE is constantly ON, but I want to turn it off in order to keep my device in a sleep state, and in that case, decrease the current consumption. Is this implementation possible with the Arduino BLE library?

    P.S. In my case, the BLE service, characteristics, advertising,... are defined in the setup function. Thanks in advance. Cheers! :)

    type: imperfection conclusion: resolved topic: code 
    opened by ASabovic 34
  • BLE Pairing and Encryption

    BLE Pairing and Encryption

    This pull request is for an implementation of the BLE Security Manager which allows arduino devices to pair & encrypt connections using the HCI specification. Specifically, it implements Secure Connect / Numeric comparison.

    The branch appears stable but I'm aware it may need some refactoring. An example sketch is included to show how to pair devices.

    The branch supports encryption instigated by the central when the arduino is the peripheral.

    type: enhancement topic: code 
    opened by unknownconstant 25
  • add esp32 support

    add esp32 support

    Added support for the esp32 chip using the virtual HCI. This has been tested on real hardware with "Arduino core for the ESP32" version 2.0.0.

    conclusion: duplicate type: enhancement topic: code 
    opened by dominsch 20
  • cordio: lower power polling with timeout

    cordio: lower power polling with timeout

    I've been testing this with the Examples -> Peripheral -> LEDCallback example, with two changes:

    1. Removing: while (!Serial); from setup()
    2. Changing BLE.poll(); in loop() to BLE.poll(60000);

    Unfortunately, in my brief testing it doesn't seem to be lower power (using a USB supply input).

    @facchinm any thoughts on this?

    opened by sandeepmistry 19
  • BLE nano 33 does not report or disconnect from centra

    BLE nano 33 does not report or disconnect from centra

    When using for example the button peripheral and central examples in the arduinoBLE library If for example the central is a MKR1010 powered by usb and the peripheral is a nanoBLE 33 then if I remove the power from the central the peripheral still reports it as connected.

    If instead of a Nano BLE 33 I use a Nano IOT33 then when the central is de powered the peripheral reports it as being disconnected.

    there are several issues regarding disconnection & this library when using the Nana BLe 33.

    Arduino support said the following

    ================================================================

    Hello Russell,

    Thank you for reporting us this issue,

    We request you to open an issue on Github here and our developers will provide you further guidance.

    Have a nice day!

    Best Regards, Sravya Amirisetti

    type: imperfection 
    opened by Russell108 17
  • What is the correct approach to transmit rapidly changing real-time data?

    What is the correct approach to transmit rapidly changing real-time data?

    I have modified the BatteryMonitor example to send the accelerometer data instead - by removing the map function and the 200ms timer. It seems to work. And when I write the float values of accelerometer values to the characteristic using writeValue(x); I don't get any errors HOWEVER the value received on the other side i.e a central device like my App or WebBluetooth is always integer and positive. Any idea why that is happening?

    More importantly is this the correct way to send float values?

    I am also thinking if modifying the BatteryMonitor example is the correct approach to transmit rapidly changing real-time data. If it isn't then could you please guide me/point me to some resources so that I can contribute an example for the official library?

    opened by armsp 16
  • begin() doesn't work after end() on Nano BLE 33, have to power cycle

    begin() doesn't work after end() on Nano BLE 33, have to power cycle

    Hi,

    The begin() function does not behave as expected following an end() and instead I have to power cycle. This is similar to #33

    I've created two minimal examples for people to try below:

    Example 1:

    1. Initialise BLE
    2. Call BLE.disconnect() 10 seconds after connected to central
    3. Re-advertise 15 seconds later to allow reconnection

    Expected behaviour - disconnect from central and allow reconnection after re-advertising Actual behaviour - works as expected

    #include <ArduinoBLE.h>
    
    BLEService TestService("DEAD");
    BLECharacteristic TestData("BEEF", BLEIndicate | BLENotify, 2, true);
    BLEDescriptor TestDescriptor("BEEF", "Test");
    
    uint32_t genericTimer = 0;
    bool wasConnected = false;
    
    void setup(){
        initBLE();
    }
    
    void loop(){
        BLEDevice central = BLE.central(); // begin listening for centrals to connect
    
        if(central){
            genericTimer = millis();
            while(central.connected()){
                if(millis() - genericTimer >= 10000){ // Wait 10 seconds after connect
                    BLE.disconnect(); // Disconnect BLE
                    wasConnected = true;
                }
            }
        }
    
        if(wasConnected){
            genericTimer = millis();
            while(millis() - genericTimer <= 15000){} // Wait 15 seconds after disconnect
            wasConnected = false;
            BLE.advertise();
        }
    }
    
    void initBLE(void){
        BLE.begin();
        BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler);
        BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler);
        BLE.setLocalName("TestName");
        BLE.setDeviceName("Test Device Name");
        TestService.addCharacteristic(TestData);
        TestData.addDescriptor(TestDescriptor);
        BLE.addService(TestService);
        BLE.setAdvertisedService(TestService);
        BLE.advertise();
    }
    

    Example 2:

    1. Initialise BLE
    2. Disconnect and end() after 10 seconds of connection to central
    3. Wait 15 seconds and try to re-start BLE system again

    Expected behaviour - system disconnects, then ends BLE service, and restarts it correctly Actual behaviour - unable to restart BLE with begin() after calling end()

    #include <ArduinoBLE.h>
    
    BLEService TestService("DEAD");
    BLECharacteristic TestData("BEEF", BLEIndicate | BLENotify, 2, true);
    BLEDescriptor TestDescriptor("BEEF", "Test");
    
    uint32_t genericTimer = 0;
    bool wasConnected = false;
    
    void setup(){
        initBLE();
    }
    
    void loop(){
        BLEDevice central = BLE.central(); // begin listening for centrals to connect
    
        if(central){
            genericTimer = millis();
            while(central.connected()){
                if(millis() - genericTimer >= 10000){ // Wait 10 seconds after connect
                    BLE.disconnect(); // Disconnect BLE
                    BLE.end(); // End BLE service
                    wasConnected = true;
                }
            }
        }
    
        if(wasConnected){
            genericTimer = millis();
            while(millis() - genericTimer <= 15000){} // Wait 15 seconds after disconnect
            wasConnected = false;
            initBLE();
        }
    }
    
    void initBLE(void){
        BLE.begin();
        BLE.setEventHandler(BLEConnected, blePeripheralConnectHandler);
        BLE.setEventHandler(BLEDisconnected, blePeripheralDisconnectHandler);
        BLE.setLocalName("TestName");
        BLE.setDeviceName("Test Device Name");
        TestService.addCharacteristic(TestData);
        TestData.addDescriptor(TestDescriptor);
        BLE.addService(TestService);
        BLE.setAdvertisedService(TestService);
        BLE.advertise();
    }
    
    type: imperfection conclusion: resolved topic: code 
    opened by rmlearney-digicatapult 14
  • Communication of One  Central Device and More than One  Peripheral Device

    Communication of One Central Device and More than One Peripheral Device

    Does the library support connection and communication between one central device and more than one peripheral device? And how could it be implemented?

    status: waiting for information 
    opened by vyohai 13
  • ArduinoBLE crashes when BLE.begin BLE.end is called multiple times (possible solution included)

    ArduinoBLE crashes when BLE.begin BLE.end is called multiple times (possible solution included)

    The issue was reported by a user in the Arduino forum, who wants to switch between BLE and WiFi on a regular basis.

    https://forum.arduino.cc/t/repeated-ble-begin-end-crashes-board/885009

    I wrote the following sketch for testing and it crashes after 50 loops.

    #include <ArduinoBLE.h>
    
    void setup()
    {
      Serial.begin( 9600 );
      while ( !Serial );
      Serial.println( "ArduinoBLE memory leak test" );
    }
    
    void loop()
    {
      static uint32_t counter = 0;
    
      BLE.begin();
      counter++;
      Serial.print( "C: " );
      Serial.println( counter );
      BLE.end();
    }
    
    

    With my limited C++ knowledge I found in void GATTClass::begin() a couple of objects are created with new. They are not deleted in void GATTClass::end().

    Adding the 5 deletes to GATTClass::end seems to fix the issue. Can you confirm this is the right way to fix this and implement this in the next version of the library?

    void GATTClass::end()
    {
      delete( _genericAccessService );
      delete( _deviceNameCharacteristic );
      delete( _appearanceCharacteristic );
      delete( _genericAttributeService );
      delete( _servicesChangedCharacteristic );
     _attributes.clear();
    }
    
    type: imperfection conclusion: resolved topic: code 
    opened by Klaus-KK 12
  • Nano 33 BLE in bootmode after disconnect

    Nano 33 BLE in bootmode after disconnect

    Hi, I have successfully paired an AcgamR1 clone remote control with the nano 33 ble. But after 45 seconds the remote control disconnects. Probably to save energy. Now the nano hangs up and does nothing more. No serial monitor and the Builtin LED is blinking 5 quick, 3 slow, 5 quick, 3 slow... I think the nano is in bootmode. (https://forum.arduino.cc/index.php?topic=630834.0)

    Code is from here: https://github.com/bitbank2/Nano_33_Gamepad

    Does anyone have a solution for this?

    Software: Arduino IDE 1.8.13 <ArduinoBLE.h> 1.2.0 Arduino mbed -enabled Boards V2.0.0 and same issue with 1.3.2 Hardware: Nano 33 BLE Original not a clone BLE Remote: https://www.amazon.de/magicsee-R1-Bluetooth-Wireless-Controller-Joystick/dp/B01MDM48W9

    type: imperfection status: waiting for information 
    opened by cansimkp 11
  • XBox One controller - current firmware (BLE) - (peripheral.discoverAttributes fails

    XBox One controller - current firmware (BLE) - (peripheral.discoverAttributes fails

    If you update an XBox One controller to the latest firmware, the update will convert the controller to running using BLE. Microsoft shows a few different ways to do the update, including I believe simply plug it into USB to XBox One that is running the latest stuff. I updated one of mine using the Windows XBox Accessories App.

    Side note: trying to add BLE support to our Teensy USBHost_t36 code base. We already have some bluetooth support, and for example we can connect and use an XBox one controller, with the original firmware, but not after they are updated.

    So I thought I would experiment using the ArduinoBLE library, and first tried on Arduino Nano 33 IOT as well as BLE and this call fails. Note: I now also have a fork/branch of this library that runs on Teensy boards (T3.6 and 4.x) and right now doing most of my stuff I am using a bluetooth dongle plugged into an USBHost connector on either a 4.1 or a Micromod.

    In order for BLE to see this you need to put the controller into pairing mode. Hopefully after I figure out this part will then figure out how to do an actual BLE pairing (Again sort of outside of this issue).

    When in pairing mode I found a windows App, that can talk to the device. image

    Note: I posted Some of these details up on both a PJRC forum thread as well as an Arduino one: https://forum.arduino.cc/t/arduinoble-trying-to-connect-to-xbox-one-controller-and-other-ble-devices/1054844/3 https://forum.pjrc.com/threads/71503-USBHost-Bluetooth-gt-BLE-gt-ArduinoBLE

    As the title mentioned, the discoverAttributes call fails. I have added a lot of debug outputs and the like to code including into my TeensyTransport code. This includes doing some decoding of the data that is sent back and forth with the ATT messages.

    It looks like the code is properly enumerating the Services and the Characteristics and then fails after that:

    From my debug output: first enumerating the Services: Pardon some of my cryptic outputs:

    >>(ACLDATA, 0):40 00 07 00 03 00 04 00 02 12 00 
    	** MTU_REQ **: MTU: 12
    <<(ACLDATA, 5183):40 20 07 00 03 00 04 00 03 12 00 
    	** MTU_RESP **: MTU: 12
    >>(ACLDATA, 42):40 00 0B 00 07 00 04 00 10 01 00 FF FF 00 28 
    	** READ_BY_GROUP_REQ **: Starting handle:0001 ending handle:ffff Group Type:2800
    <<(ACLDATA, 45):40 20 12 00 0E 00 04 00 11 06 01 00 07 00 00 18 08 00 08 00 01 18 
    	** READ_MULTI_RESP **: len per:06
    		Atr Handle:0001 End Group Handle:0012 Data: 00 18
    		Atr Handle:0008 End Group Handle:0012 Data: 01 18
    >>(ACLDATA, 29):40 00 0B 00 07 00 04 00 10 09 00 FF FF 00 28 
    	** READ_BY_GROUP_REQ **: Starting handle:0009 ending handle:ffff Group Type:2800
    <<(ACLDATA, 30):40 20 12 00 0E 00 04 00 11 06 09 00 11 00 0A 18 12 00 15 00 0F 18 
    	** READ_MULTI_RESP **: len per:06
    		Atr Handle:0009 End Group Handle:0012 Data: 0a 18
    		Atr Handle:0012 End Group Handle:0012 Data: 0f 18
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 10 16 00 FF FF 00 28 
    	** READ_BY_GROUP_REQ **: Starting handle:0016 ending handle:ffff Group Type:2800
    <<(ACLDATA, 30):40 20 0C 00 08 00 04 00 11 06 16 00 23 00 12 18 
    	** READ_MULTI_RESP **: len per:06
    		Atr Handle:0016 End Group Handle:000c Data: 12 18
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 10 24 00 FF FF 00 28 
    	** READ_BY_GROUP_REQ **: Starting handle:0024 ending handle:ffff Group Type:2800
    <<(ACLDATA, 45):40 20 09 00 05 00 04 00 01 10 24 00 80 
    	** ATT_ERROR **: OP:10 handle:24 error:80 
    
    	After discoverServices
    

    But it looks here like it found: Handle:0001 ID: 1800 0008 ID: 1801 0009 180a 0012 180f 0016 1812

    Which map to:

          case 0x1800: return "Generic Access service";
          case 0x1801: return "Generic Attribute service";
          case 0x180A: return "Device Information service";
          case 0x1812: return "Human Interface Device service";
    
    

    It then goes through all 5 of these Services looking for Characteristics:

    >>(ACLDATA, 45):40 00 0B 00 07 00 04 00 08 01 00 07 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0001 ending handle:0007 Attribute Type:2803
    <<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 02 00 02 03 00 00 2A 04 00 02 05 00 01 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0002 Data: 02 03 00 00 2a
    		Atr Handle:0004 Data: 02 05 00 01 2a
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 06 00 07 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0006 ending handle:0007 Attribute Type:2803
    <<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 06 00 02 07 00 04 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0006 Data: 02 07 00 04 2a
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 08 00 07 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0008 ending handle:0007 Attribute Type:2803
    <<(ACLDATA, 45):40 20 09 00 05 00 04 00 01 08 08 00 01 
    	** ATT_ERROR **: OP:8 handle:8 error:01 - INVALID_HANDLE
    
    >>(ACLDATA, 29):40 00 0B 00 07 00 04 00 08 08 00 08 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0008 ending handle:0008 Attribute Type:2803
    <<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 08 00 0A 
    	** ATT_ERROR **: OP:8 handle:8 error:0a - ATTR_NOT_FOUND
    
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 09 00 11 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0009 ending handle:0011 Attribute Type:2803
    <<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 0A 00 02 0B 00 29 2A 0C 00 02 0D 00 50 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:000a Data: 02 0b 00 29 2a
    		Atr Handle:000c Data: 02 0d 00 50 2a
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 0E 00 11 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:000e ending handle:0011 Attribute Type:2803
    <<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 0E 00 02 0F 00 26 2A 10 00 02 11 00 25 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:000e Data: 02 0f 00 26 2a
    		Atr Handle:0010 Data: 02 11 00 25 2a
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 12 00 11 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0012 ending handle:0011 Attribute Type:2803
    <<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 12 00 01 
    	** ATT_ERROR **: OP:8 handle:12 error:01 - INVALID_HANDLE
    
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 12 00 15 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0012 ending handle:0015 Attribute Type:2803
    <<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 13 00 12 14 00 19 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0013 Data: 12 14 00 19 2a
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 15 00 15 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0015 ending handle:0015 Attribute Type:2803
    <<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 15 00 0A 
    	** ATT_ERROR **: OP:8 handle:15 error:0a - ATTR_NOT_FOUND
    
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 16 00 23 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0016 ending handle:0023 Attribute Type:2803
    <<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 17 00 02 18 00 4A 2A 19 00 04 1A 00 4C 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0017 Data: 02 18 00 4a 2a
    		Atr Handle:0019 Data: 04 1a 00 4c 2a
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 1B 00 23 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:001b ending handle:0023 Attribute Type:2803
    <<(ACLDATA, 30):40 20 14 00 10 00 04 00 09 07 1B 00 02 1C 00 4B 2A 1D 00 12 1E 00 4D 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:001b Data: 02 1c 00 4b 2a
    		Atr Handle:001d Data: 12 1e 00 4d 2a
    >>(ACLDATA, 14):40 00 0B 00 07 00 04 00 08 1F 00 23 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:001f ending handle:0023 Attribute Type:2803
    <<(ACLDATA, 30):40 20 0D 00 09 00 04 00 09 07 21 00 0E 22 00 4D 2A 
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0021 Data: 0e 22 00 4d 2a
    >>(ACLDATA, 30):40 00 0B 00 07 00 04 00 08 23 00 23 00 03 28 
    	** READ_BY_TYPE_REQ **: Starting handle:0023 ending handle:0023 Attribute Type:2803
    <<(ACLDATA, 30):40 20 09 00 05 00 04 00 01 08 23 00 0A 
    	** ATT_ERROR **: OP:8 handle:23 error:0a - ATTR_NOT_FOUND
    
    	After discoverCharacteristics
    

    I won't go through all 5 groups here to decode. But looking at the first we see:

    	** READ_BY_TYPE_REQ **: Starting handle:0001 ending handle:0007 Attribute Type:2803
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0002 Data: 02 03 00 00 2a
    		Atr Handle:0004 Data: 02 05 00 01 2a
    	** READ_BY_TYPE_REQ **: Starting handle:0006 ending handle:0007 Attribute Type:2803
    	** READ_BY_TYPE_RESP **: len per:07
    		Atr Handle:0006 Data: 02 07 00 04 2a
    	** READ_BY_TYPE_REQ **: Starting handle:0008 ending handle:0007 Attribute Type:2803
    	** ATT_ERROR **: OP:8 handle:8 error:01 - INVALID_HANDLE
    

    So as I read this, the first group should have 3 handles 2, 4 and 6 I have not fully decoded the 5 bytes, but it looks like 2 goes to UUID 0x2A00 and likewise and 04->0x2A01 Which maps to: case 0x2A00: return "Device Name"; case 0x2A01: return "Appearance"; Which again matches the data I see with the Windows app.

    Again the call discoverCharacteristics works, but then the call to: bool ATTClass::discoverDescriptors(uint16_t connectionHandle, BLERemoteDevice* device) Fails on the first items. That is i=0 and j=0;

    If fails in the while(1) { loop. Some debug from that part:

    `ATTClass::discoverDescriptors(64, 0x20203338)
    	Service Count:5
    	0 Service: 1800 #characteristic:3
    	**(0, 0) characteristic: 2a00 0x20203590, range: 4 5**
    ATTClass::findInfoReq(64, 4, 5, 0x20067e80)
    
    >>(ACLDATA, 14):40 00 09 00 05 00 04 00 04 04 00 05 00 
    	** FIND_INFO_REQ **: Starting handle:0004 ending handle:0005
    <<(ACLDATA, 30):40 20 0A 00 06 00 04 00 05 01 04 00 03 28 
    	** FIND_INFO_RESP **: Format:1
    		**Handle:04 UUID:280a**
    >>(ACLDATA, 30):40 00 09 00 05 00 04 00 04 05 00 05 00 
    	**** FIND_INFO_REQ **: Starting handle:0005 ending handle:0005**
    tx_data callback (bluetooth):40 00 09 00 05 00 04 00 04 05 00 05 00 
    <<(EVT, 16, H:163 T:163)13 05 01 40 00 02 00 
    
    HCI event: 13
    Outstanding packets: 0
    Data[0]: 0x64
    Data[1]: 0x2
    	0 0 respLength:0
    Attribute discovery failed!
    Command tx ->  0x1 0x6 0x4 0x3 0x40 0x0 0x13
    >>(CMD, 4984):06 04 03 40 00 13 
        Control callback (bluetooth): 0 : 06 04 03 40 00 13 
    <<(EVT, 2, H:171 T:171)0F 04 00 01 06 04 
    HCI event: F
    F n cmd:  0x1
    F status: 0x0
    F opcode: 0x406
    <<(EVT, 1899, H:178 T:178)05 04 00 40 00 22 
    HCI event: 5
    Command tx ->  0x1 0xA 0x20 0x1 0x1
    >>(CMD, 0):0A 20 01 01 
        Control callback (bluetooth): 0 : 0a 20 01 01 
    <<(EVT, 2, H:185 T:185)0E 04 01 0A 20 00 
    HCI event: E
    E ncmd:   0x1
    E opcode: 0x200A
    E status: 0x0
    `
    

    Something that does not feel right here is: As I mentioned earlier is it looks like the first one has handle 2 but it is searching for it with the range 4,5? It finds the 2nd one with ID 4, It then tries a search on 5-5 which then bails with an error and I don't see any response on the ACLDATA for it.

    Still investigating

    opened by KurtE 3
  • Lots of Compiler Warnings - At least if I build for a Teensy 4.1 or Micromod

    Lots of Compiler Warnings - At least if I build for a Teensy 4.1 or Micromod

    As I mentioned on a PJRC forum post, I have a version of this library building and running on Teensy 4.1 and Micromod using the USBHost_T36 library and a couple of edits to this library. In particular disable the Serial transport and code for its own Transport. Which now appears to be working. At least with a few of your examples. Like the ones to do with LEDs.

    While doing this, I am seeing a lot of compiler warnings in the code. And I believe most of them are not Teensy specific. Note: I am using the latest Teensyduino IDE beta which we are trying a more recent version of GCC which is showing up a lot more compiler warning than earlier ones.

    Some of the warnings:

    "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1-beta1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=158 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4/pch" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\cores\\teensy4" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\USBHost_T36" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\SDFat\\src" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\SPI" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\EEPROM" "c:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src\\remote\\BLERemoteService.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4\\libraries\\ArduinoBLE\\remote\\BLERemoteService.cpp.o"
    In file included from c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src/utility/GATT.h:26,
                     from c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\local\BLELocalCharacteristic.cpp:25:
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src/local/BLELocalCharacteristic.h: In constructor 'BLELocalCharacteristic::BLELocalCharacteristic(const char*, uint16_t, int, bool)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src/local/BLELocalCharacteristic.h:90:12: warning: 'BLELocalCharacteristic::_cccdValue' will be initialized after [-Wreorder]
       90 |   uint16_t _cccdValue;
          |            ^~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src/local/BLELocalCharacteristic.h:79:12: warning:   'uint8_t BLELocalCharacteristic::_permissions' [-Wreorder]
       79 |   uint8_t  _permissions;
          |            ^~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\local\BLELocalCharacteristic.cpp:32:1: warning:   when initialized here [-Wreorder]
       32 | BLELocalCharacteristic::BLELocalCharacteristic(const char* uuid, uint16_t permissions, int valueSize, bool fixedLength) :
          | ^~~~~~~~~~~~~~~~~~~~~~
    "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1-beta1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=158 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4/pch" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\cores\\teensy4" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\USBHost_T36" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\SDFat\\src" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\SPI" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\EEPROM" "c:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src\\utility\\GATT.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4\\libraries\\ArduinoBLE\\utility\\GATT.cpp.o"
    

    And:

    "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1-beta1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=158 -DARDUINO=10607 -DARDUINO_TEENSY_MICROMOD -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4/pch" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\cores\\teensy4" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\USBHost_T36" "-Ic:\\Users\\kurte\\Documents\\Arduino\\libraries\\SDFat\\src" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\SPI" "-IC:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.58.2\\libraries\\EEPROM" "c:\\Users\\kurte\\Documents\\Arduino\\libraries\\ArduinoBLE\\src\\utility\\keyDistribution.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino-sketch-43071A1C59D1A4F494A82C8D8FA363A4\\libraries\\ArduinoBLE\\utility\\keyDistribution.cpp.o"
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual void HCIClass::poll(long unsigned int)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:141:20: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
      141 |     if (_recvIndex >= sizeof(_recvBuffer)) {
          |         ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual int HCIClass::tryResolveAddress(uint8_t*, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:565:14: warning: unused variable 'memcheck' [-Wunused-variable]
      565 |     uint8_t* memcheck;
          |              ^~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:557:11: warning: variable 'irk' set but not used [-Wunused-but-set-variable]
      557 |   uint8_t irk[16];
          |           ^~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::handleSecurityData(uint16_t, uint8_t, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp:271:8: warning: unused variable 'pairingFailed' [-Wunused-variable]
      271 |     } *pairingFailed = (PairingFailed*)data;
          |        ^~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp:320:7: warning: unused variable 'readPublicKeyCommand' [-Wunused-variable]
      320 |     } readPublicKeyCommand = {
          |       ^~~~~~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::smCalculateLTKandConfirm(uint16_t, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp:421:19: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
      421 |     for(int i=0; i<sizeof(Eb); i++){
          |                  ~^~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp: In member function 'virtual void HCIClass::handleEventPkt(uint8_t, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:979:13: warning: unused variable 'BD_ADDRs' [-Wunused-variable]
      979 |     uint8_t BD_ADDRs[num_keys][6];
          |             ^~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:980:13: warning: unused variable 'LKs' [-Wunused-variable]
      980 |     uint8_t LKs[num_keys][16];
          |             ^~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:981:10: warning: variable 'nAddresss' set but not used [-Wunused-but-set-variable]
      981 |     auto nAddresss = [pdata](uint8_t nAddr)->uint8_t*{
          |          ^~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:984:10: warning: variable 'nLK' set but not used [-Wunused-but-set-variable]
      984 |     auto nLK = [pdata](uint8_t nLK)->uint8_t*{
          |          ^~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:999:8: warning: unused variable 'cmdHardwareError' [-Wunused-variable]
      999 |     } *cmdHardwareError = (CmdHardwareError*)&pdata[sizeof(HCIEventHdr)];
          |        ^~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1099:17: warning: unused variable 'address' [-Wunused-variable]
     1099 |         uint8_t address[6];
          |                 ^~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1100:17: warning: variable 'BDAddr' set but not used [-Wunused-but-set-variable]
     1100 |         uint8_t BDAddr[6];
          |                 ^~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1320:25: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
     1320 |           for(int i=0; i<sizeof(pairingConfirm.cb);i++){
          |                        ~^~~~~~~~~~~~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1330:25: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
     1330 |           for(int i=0; i<sizeof(HCI.remotePublicKeyBuffer); i++){
          |                        ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1329:19: warning: variable 'remotePublicKeyReversed' set but not used [-Wunused-but-set-variable]
     1329 |           uint8_t remotePublicKeyReversed[sizeof(HCI.remotePublicKeyBuffer)];
          |                   ^~~~~~~~~~~~~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\HCI.cpp:1016:7: warning: case value '10' not in enumerated type 'LE_META_EVENT' [-Wswitch]
     1016 |       case 0x0A:{
          |       ^~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp: In member function 'int BluetoothCryptoToolbox::f5(uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp:63:13: warning: variable 'ADD_M' set but not used [-Wunused-but-set-variable]
       63 |     uint8_t ADD_M[7];
          |             ^~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp:64:13: warning: variable 'ADD_S' set but not used [-Wunused-but-set-variable]
       64 |     uint8_t ADD_S[7];
          |             ^~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp: In member function 'void BluetoothCryptoToolbox::testAh()':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp:138:13: warning: variable 'r' set but not used [-Wunused-but-set-variable]
      138 |     uint8_t r[3]   = {0x70,0x81,0x94};
          |             ^
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp:139:13: warning: unused variable 'expected_AES' [-Wunused-variable]
      139 |     uint8_t expected_AES[16] = {0x15,0x9d,0x5f,0xb7,0x2e,0xbe,0x23,0x11,0xa4,0x8c,0x1b,0xdc,0xc4,0x0d,0xfb,0xaa};
          |             ^~~~~~~~~~~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp: In member function 'void BluetoothCryptoToolbox::testg2()':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\btct.cpp:173:13: warning: unused variable 'AES' [-Wunused-variable]
      173 |     uint8_t AES[16] = {0x15,0x36,0xd1,0x8d,0xe3,0xd2,0x0d,0xf9,0x9b,0x70,0x44,0xc1,0x2f,0x9e,0xd5,0xba};
          |             ^~~
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp: In member function 'virtual void L2CAPSignalingClass::handleSecurityData(uint16_t, uint8_t, uint8_t*)':
    c:\Users\kurte\Documents\Arduino\libraries\ArduinoBLE\src\utility\L2CAPSignaling.cpp:296:13: warning: 'i' may be used uninitialized [-Wmaybe-uninitialized]
      296 |     for(int i; i<6; i++) peerAddress[5-i] = identityAddress->address[i];
          |             ^
    Compiling library "USBHost_t36"
    

    Note: the last one does look like a bug, as the initial value of i is not set...

    Now back to experimenting. Right now, trying to figure out why the Peripheral Explorer example, when modified to look at some real hardware, like:
    Xbox One controller updated to current firmware (BLE) cannot discover attributes.

    Likewise for Microsoft Surface Arc Mouse. like:

    Bluetooth® Low Energy Central - Peripheral Explorer
    Found e1:1b:54:3b:1b:21 '' 
    Found 20:24:93:53:d2:12 '' 
    Found 40:ae:a8:59:63:5b '' 
    Found 4d:82:4e:f5:6c:96 '' 
    Found 22:7c:49:50:eb:21 '' fd6f
    Found 78:ca:b4:94:96:d6 '' 
    Found 67:12:a5:9c:57:ad '' 
    Found d8:ec:5e:82:11:30 'Linksys' 00002080-8eab-46c2-b788-0e9440016fd1
    Found e1:59:47:79:f2:be 'Surface Arc Mouse' 1812
    Connecting ...
    Connected
    Discovering attributes ...
    Attribute discovery failed!
    
    Device name: 
    Appearance: 0x0
    
    Service Count: 0
    
    Disconnecting ...
    Disconnected
    

    But that is probably outside of this issue.

    type: imperfection topic: code 
    opened by KurtE 0
  • esp32 resets to bootloader when calling BLE.end() before BLE.begin()

    esp32 resets to bootloader when calling BLE.end() before BLE.begin()

    Thanks for adding ESP32 support! There seems to be one quirk: When calling BLE.end() before BLE.begin(), the whole device resets and starts the bootloader. Tested on a Beetle-ESP2-C3 from DF-Robot.

    On an Arduino this does not seem to cause any issues and BLE gets reset (when BLE.begin() had been called before)/or nothing noticeable happens (when BLE.begin()).

    I do not know if BLE.end() also resets the device when BLE.end() is called after BLE.begin(), since I loose the USB Serial connection after BLE has been initialized.

    Thanks for looking into this.

    opened by mvandeg-git 3
  • BLERead event handler called twice?

    BLERead event handler called twice?

    I'm using an Arduino Nano RP2040 Connect with the NINA module. I've got a service that exposes some string characteristics that I want to feed a different value to each time they're read. I've set an eventhandler for BLERead, which is called. However, it seems to always be called twice on each read. I thought maybe this was a problem with the mobile app I'm writing, but I tried a BLE test/scanner app and each time I read the characteristic, the event handler is called twice.

    Surely this is not intentional right? Am I doing something wrong that causes me to be called twice? I've looked through the AndroidBLE code a bit and I don't see any indication that I should be called twice. Even if I don't change the value, the handler is called twice.

    Here's roughly what I'm doing:

    void iter_temp_log(BLEDevice *central, BLECharacteristic c) {
        Serial.println("CALLED!");
    }
    
    void setup() {
        BLE.setLocalName("Remote Level");
        BLE.setAdvertisedService(levelservice);
        levelservice.addCharacteristic(templog);
        BLE.addService(levelservice);
        BLE.advertise();
        templog.setEventHandler(BLERead, iter_temp_log);
    }
    
    type: imperfection 
    opened by kk7ds 29
  • Disconnected Event does not fire

    Disconnected Event does not fire

    Hi everyone. This is my setup.

    An ESP32 running as BLE Server An nRF52840 mbed board (XIAO BLE Sense) running as BLE Client Everything seems to work apart for the Disconnected event...

    this is the code I almost copy/pasted from the documentation:

      // BLE initialization
      if (!BLE.begin()) {
        Serial.println("Starting Bluetooth® Low Energy module failed!");
        while (1);
      }
      MAC = BLE.address().c_str();
      Serial.print("BLE MAC: "); Serial.println(MAC.c_str());
      BLE.setEventHandler(BLEConnected, bleCentralConnectHandler);
      BLE.setEventHandler(BLEDisconnected, bleCentralDisconnectHandler);
    
    void bleCentralConnectHandler(BLEDevice peripheral) {
      // central connected event handler
      Serial.print("Connected event, peripheral: ");
      Serial.println(peripheral.address());
    }
    void bleCentralDisconnectHandler(BLEDevice peripheral) {
      // central disconnected event handler
      Serial.print("Disconnected event, peripheral: ");
      Serial.println(peripheral.address());
      startScanning();
    }
    

    I let them connect and then powering off the ESP32... I expected to see "Disconnected event, peripheral:...." but nothing shows up...

    P.S. The connected event fires correctly

    What could be ?

    type: imperfection 
    opened by Sladerix 0
  • mouse keyboard BLE example

    mouse keyboard BLE example

    It would be really lovely to include a classic bluetooth Mouse Keyboard example as BLE peripherical! I tried to make it, but after many hours trying I gave it up. Thanks a lot for your work!

    type: enhancement topic: documentation 
    opened by dartecne 0
Releases(1.3.2)
  • 1.3.2(Sep 5, 2022)

    What's Changed

    • Support esp32, esp32-C3, esp32-S3 by @dominsch in https://github.com/arduino-libraries/ArduinoBLE/pull/252
    • Fix hard fault when str is NULL by @grobx in https://github.com/arduino-libraries/ArduinoBLE/pull/259
    • Fix memory leak on end() -> begin() -> end() by @facchinm in https://github.com/arduino-libraries/ArduinoBLE/pull/260

    New Contributors

    • @laviator98 made their first contribution in https://github.com/arduino-libraries/ArduinoBLE/pull/242
    • @dominsch made their first contribution in https://github.com/arduino-libraries/ArduinoBLE/pull/251
    • @grobx made their first contribution in https://github.com/arduino-libraries/ArduinoBLE/pull/259

    Full Changelog: https://github.com/arduino-libraries/ArduinoBLE/compare/1.3.1...1.3.2

    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Jun 1, 2022)

  • 1.2.1(May 18, 2021)

Owner
Arduino Libraries
This org contains the official Arduino Libraries. See @arduino for the tools (IDE, Pro IDE, CLI...)
Arduino Libraries
Arduino library for making an IHC in or output module using an Arduino

Introduction This is an Arduino library for making an IHC in or output module using an Arduino. (IHC controller is a home automation controller made b

Jens Østergaard Nielsen 2 Mar 26, 2020
ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT Cloud

ArduinoIoTCloud What? The ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT

Arduino Libraries 64 Dec 16, 2022
The Approximate Library is a WiFi Arduino library for building proximate interactions between your Internet of Things and the ESP8266 or ESP32

The Approximate Library The Approximate library is a WiFi Arduino Library for building proximate interactions between your Internet of Things and the

David Chatting 102 Dec 7, 2022
Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames.

107-Arduino-MCP2515 Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames. This library is prepared to interface easily

107-Systems 51 Nov 16, 2022
Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages.

107-Arduino-NMEA-Parser Arduino library for interfacing with any GPS, GLONASS, Galileo or GNSS module and interpreting its NMEA messages. This library

107-Systems 15 Jan 1, 2023
Arduino library for providing a convenient C++ interface for accessing UAVCAN.

107-Arduino-UAVCAN Arduino library for providing a convenient C++ interface for accessing UAVCAN (v1.0-beta) utilizing libcanard. This library works f

107-Systems 54 Jan 2, 2023
Arduino web server library.

aWOT Arduino web server library. Documentation 1. Getting started Hello World Basic routing Application generator Serving static files 2. Guide Routin

Lasse Lukkari 246 Jan 4, 2023
Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

ABB Aurora protocol You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32 I create this li

Renzo Mischianti 22 Nov 22, 2022
Arduino library for the MCP2515 CAN Controller

MCP2515 CAN Controller Library for Arduino Compatibility with the ACAN library This library is fully compatible with the Teensy 3.x ACAN library https

Pierre Molinaro 4 Dec 18, 2022
CAN / CANFD Arduino Library for Teensy 4.0

CAN Library for Teensy 4.0 / 4.1 It handles Controller Area Network (CAN) for CAN1, CAN2 and CAN3, and Controller Area Network with Flexible Data (CAN

Pierre Molinaro 12 Dec 9, 2022
Analog Devices Analog Digital Converter AD7173 Arduino library

AD7173-Arduino Analog Devices AD7173 analog digital converter Arduino library Mostly tested setup for this library: 1007 data rate external crystal co

brain-duino 8 Nov 20, 2022
Arduino library for nRF51822-based Adafruit Bluefruit LE modules

This library is for all nRF51 based Adafruit Bluefruit LE modules that use SPI or UART. Current nRF51 based Bluefruit LE products include: Bluefruit L

Adafruit Industries 184 Nov 6, 2022
Arduino library for the Adafruit FONA

Adafruit FONA Library This library requires Arduino v1.0.6 or higher This is a library for the Adafruit FONA Cellular GSM Breakouts etc Designed speci

Adafruit Industries 199 Dec 15, 2022
Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.

Adafruit IO Arduino Library This library provides a simple device independent interface for interacting with Adafruit IO using Arduino. It allows you

Adafruit Industries 168 Dec 23, 2022
Arduino library for MQTT support

Adafruit MQTT Library Arduino library for MQTT support, including access to Adafruit IO. Works with the Adafruit FONA, Arduino Yun, ESP8266 Arduino pl

Adafruit Industries 519 Jan 6, 2023
Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip

Adafruit-PN532 This is a library for the Adafruit PN532 NFC/RFID breakout boards This library works with the Adafruit NFC breakout https://www.adafrui

Adafruit Industries 361 Dec 23, 2022
Arduino library for the Si4714 FM+RDS Transmitter in the Adafruit shop

Adafruit-Si4713-Library This is the Adafruit FM Transmitter with RDS/RBDS Breakout - Si4713 library Tested and works great with the Adafruit Si4713 Br

Adafruit Industries 19 Oct 26, 2022
An Arduino library with additions to vanilla Serial.print(). Chainable methods and verbosity levels. Suitable for debug messages.

advancedSerial This library provides some additions to vanilla Serial.print(): 1. Chainable print() and println() methods: // you can chain print() a

Vasily Klenov 17 Dec 13, 2022
Arduino library for AIS 4G Board

AIS 4G Board Library for Arduino AIS 4G Board คือบอร์ดพัฒนาที่สามารถเชื่อมต่ออินเตอร์เน็ตผ่าน 4G มาพร้อมกับไมโครคอนโทรลเลอร์ ESP32-WROOM-32 และโมดูลสื

null 16 Dec 15, 2022