Skip to content

Commit 1cddddb

Browse files
committed
Release 1.4.0
* Fix typos
1 parent 4cdc4e0 commit 1cddddb

34 files changed

+2981
-237
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/doxydocs

CHANGELOG.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [Unreleased]
5+
## [1.4.0] - 2022-07-10
66

77
### Fixed
88
- Fixed missing data from long notification values.
9+
- Fixed NimbleCharacteristicCallbacks::onRead not being called when a non-long read command is received.
910

1011
### Changed
11-
- Updated NimBLE core to use the v1.4.0 branch of esp-nimble
12+
- Updated NimBLE core to use the v1.4.0 branch of esp-nimble.
13+
- AD flags are no longer set in the advertisements of non-connectable beacons, freeing up 3 bytes of advertisement room.
1214

1315
### Added
14-
- Preliminary support for non-esp devices, NRF51 and NRF52 devices supported with [n-able arduino core](https://github.com/h2zero/n-able)
16+
- Preliminary support for non-esp devices, NRF51 and NRF52 devices supported with [n-able arduino core](https://github.com/h2zero/n-able-Arduino)
1517
- Alias added for `NimBLEServerCallbacks::onMTUChange` to `onMtuChanged` in order to support porting code from original library.
16-
- `NimBLEAttValue` Class added to reduce and control RAM footprint of characteristic/descriptor values and support conversions from Arduio Strings and many other data types.
18+
- `NimBLEAttValue` Class added to reduce and control RAM footprint of characteristic/descriptor values and support conversions from Arduino Strings and many other data types.
1719
- Bluetooth 5 extended advertising support for capable devices. CODED Phy, 2M Phy, extended advertising data, and multi-advertising are supported, periodic advertising will be implemented in the future.
1820

1921
## [1.3.8] - 2022-04-27
@@ -44,7 +46,7 @@ All notable changes to this project will be documented in this file.
4446
- Memory leak when services are changed on server devices.
4547
- Rare crashing that occurs when BLE commands are sent from ISR context using IPC.
4648
- Crashing caused by uninitialized disconnect timer in client.
47-
- Potential crash due to unintialized advertising callback pointer.
49+
- Potential crash due to uninitialized advertising callback pointer.
4850

4951
## [1.3.5] - 2022-01-14
5052

@@ -81,7 +83,7 @@ All notable changes to this project will be documented in this file.
8183
## [1.3.0] - 2021-08-02
8284

8385
### Added
84-
- `NimBLECharacteristic::removeDescriptor`: Dynamically remove a descriptor from a characterisic. Takes effect after all connections are closed and sends a service changed indication.
86+
- `NimBLECharacteristic::removeDescriptor`: Dynamically remove a descriptor from a characteristic. Takes effect after all connections are closed and sends a service changed indication.
8587
- `NimBLEService::removeCharacteristic`: Dynamically remove a characteristic from a service. Takes effect after all connections are closed and sends a service changed indication
8688
- `NimBLEServerCallbacks::onMTUChange`: This is callback is called when the MTU is updated after connection with a client.
8789
- ESP32C3 support
@@ -112,12 +114,12 @@ All notable changes to this project will be documented in this file.
112114
### Fixed
113115
- `NimBLECharacteristicCallbacks::onSubscribe` Is now called after the connection is added to the vector.
114116
- Corrected bonding failure when reinitializing the BLE stack.
115-
- Writing to a characterisic with a std::string value now correctly writes values with null characters.
116-
- Retrieving remote descriptors now uses the characterisic end handle correctly.
117+
- Writing to a characteristic with a std::string value now correctly writes values with null characters.
118+
- Retrieving remote descriptors now uses the characteristic end handle correctly.
117119
- Missing data in long writes to remote descriptors.
118120
- Hanging on task notification when sending an indication from the characteristic callback.
119121
- BLE controller memory could be released when using Arduino as a component.
120-
- Complile errors with NimBLE release 1.3.0.
122+
- Compile errors with NimBLE release 1.3.0.
121123

122124
## [1.2.0] - 2021-02-08
123125

@@ -172,7 +174,7 @@ Overloads to get a vector containing pointers to all the characteristics in a se
172174

173175
- `NimBLEAdvertising` Transmission power is no longer advertised by default and can be added to the advertisement by calling `NimBLEAdvertising::addTxPower`
174176

175-
- `NimBLEAdvertising` Custom scan response data can now be used without custom advertisment.
177+
- `NimBLEAdvertising` Custom scan response data can now be used without custom advertisement.
176178

177179
- `NimBLEScan` Now uses the controller duplicate filter.
178180

@@ -214,7 +216,7 @@ to obtain information about the disconnected client.
214216
- If a host reset event occurs, scanning and advertising will now only be restarted if their previous duration was indefinite.
215217

216218
- `NimBLERemoteCharacteristic::subscribe` and `NimBLERemoteCharacteristic::registerForNotify` will now set the callback
217-
regardless of the existance of the CCCD and return true unless the descriptor write operation failed.
219+
regardless of the existence of the CCCD and return true unless the descriptor write operation failed.
218220

219221
- Advertising tx power level is now sent in the advertisement packet instead of scan response.
220222

@@ -225,7 +227,7 @@ this allows the starting of a new scan from the callback function.
225227
- Sometimes `NimBLEClient::connect` would hang on the task block if no event arrived to unblock.
226228
A time limit has been added to timeout appropriately.
227229

228-
- When getting descriptors for a characterisic the end handle of the service was used as a proxy for the characteristic end
230+
- When getting descriptors for a characteristic the end handle of the service was used as a proxy for the characteristic end
229231
handle. This would be rejected by some devices and has been changed to use the next characteristic handle as the end when possible.
230232

231233
- An exception could occur when deleting a client instance if a notification arrived while the attribute vectors were being
@@ -242,7 +244,7 @@ and would be unable to reconnect. A timer has been added to reset the host/contr
242244
- 16bit and 32bit UUID's in some cases were not discovered or compared correctly if the device
243245
advertised them as 16/32bit but resolved them to 128bits. Both are now checked.
244246

245-
- `FreeRTOS` compile errors resolved in latest Ardruino core and IDF v3.3.
247+
- `FreeRTOS` compile errors resolved in latest Arduino core and IDF v3.3.
246248

247249
- Multiple instances of `time()` called inside critical sections caused sporadic crashes, these have been moved out of critical regions.
248250

@@ -258,7 +260,7 @@ advertised them as 16/32bit but resolved them to 128bits. Both are now checked.
258260
### Changed
259261

260262
- `NimBLEAdvertising::start` Now takes 2 optional parameters, the first is the duration to advertise for (in seconds), the second is a
261-
callback that is invoked when advertsing ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
263+
callback that is invoked when advertising ends and takes a pointer to a `NimBLEAdvertising` object (similar to the `NimBLEScan::start` API).
262264

263265
- (Arduino) Maximum BLE connections can now be altered by only changing the value of `CONFIG_BT_NIMBLE_MAX_CONNECTIONS` in `nimconfig.h`.
264266
Any changes to the controller max connection settings in `sdkconfig.h` will now have no effect when using this library.

README.md

Lines changed: 32 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,72 @@
11
[Latest release ![Release Version](https://img.shields.io/github/release/h2zero/NimBLE-Arduino.svg?style=plastic)
2-
![Release Date](https://img.shields.io/github/release-date/h2zero/NimBLE-Arduino.svg?style=plastic)](https://github.com/h2zero/NimBLE-Arduino/releases/latest/)
2+
![Release Date](https://img.shields.io/github/release-date/h2zero/NimBLE-Arduino.svg?style=plastic)](https://github.com/h2zero/NimBLE-Arduino/releases/latest/)
33

4-
Need help? Have questions or suggestions? Join the [![Gitter](https://badges.gitter.im/NimBLE-Arduino/community.svg)](https://gitter.im/NimBLE-Arduino/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
4+
Need help? Have questions or suggestions? Join the [![Gitter](https://badges.gitter.im/NimBLE-Arduino/community.svg)](https://gitter.im/NimBLE-Arduino/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
55
<br/>
66

77
# NimBLE-Arduino
8-
A fork of the NimBLE stack restructured for compilation in the Ardruino IDE with a CPP library for use with ESP32.
8+
A fork of the NimBLE stack refactored for compilation in the Ardruino IDE.
99

10-
**Note for IDF users: This repo will not compile correctly in ESP-IDF. An ESP-IDF component version of this library can be [found here.](https://github.com/h2zero/esp-nimble-cpp)**
10+
**As of release 1.4.0 Nordic Semiconductor nRF51 and nRF52 series devices are now supported**
1111

12-
This library **significantly** reduces resource usage and improves performance for ESP32 BLE applications as compared
13-
with the bluedroid based library. The goal is to maintain, as much as reasonable, compatibility with the original
14-
library but refactored to use the NimBLE stack. In addition, this library will be more actively developed and maintained
15-
to provide improved capabilites and stability over the original.
16-
<br/>
17-
18-
## Resource use improvement
19-
20-
### (Original) BLE_client example comparison (Debug):
21-
#### Arduino BLE Library
22-
Sketch uses **1216377** bytes (58%) of program storage space.
23-
Memory after connection: Free Heap: **171548**
24-
25-
#### NimBLE-Arduino library
26-
Sketch uses **617256** bytes (29%) of program storage space.
27-
Memory after connection: Free Heap: **270336**
28-
***
29-
### (Original) BLE_notify example comparison (Debug):
30-
#### Arduino BLE Library
31-
Sketch uses **1208409** bytes (57%) of program storage space.
32-
Memory after connection: Free Heap: **173300**
12+
## Supported MCU's
13+
- Espressif: ESP32, ESP32C3, ESP32S3
14+
- Nordic: nRF51, nRF52 series (**Requires** using [n-able arduino core](https://github.com/h2zero/n-able-Arduino))
3315

34-
#### NimBLE-Arduino library
35-
Sketch uses **603432** bytes (28%) of program storage space.
36-
Memory after connection: Free Heap: **269792**
16+
**Note for ESP-IDF users: This repo will not compile correctly in ESP-IDF. An ESP-IDF component version of this library can be [found here.](https://github.com/h2zero/esp-nimble-cpp)**
3717

38-
**As shown: there is nearly a 50% reduction in flash use and approx. 100kB less ram consumed!**
18+
This library **significantly** reduces resource usage and improves performance for ESP32 BLE applications as compared with the bluedroid based library. The goal is to maintain, as much as reasonable, compatibility with the original library but refactored to use the NimBLE stack. In addition, this library will be more actively developed and maintained to provide improved capabilities and stability over the original.
3919
<br/>
4020

41-
# Installation
42-
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries` and search for NimBLE and install.
21+
For Nordic devices, this library provides access to a completely open source and configurable BLE stack. No softdevice to work around, allowing for full debugging and resource management, continuous updates, with a cross platform API.
22+
23+
# Arduino installation
24+
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries`, search for NimBLE and install.
4325

4426
**Alternatively:** Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library.
4527

4628
`#include "NimBLEDevice.h"` at the beginning of your sketch.
4729

48-
Tested and working with esp32-arduino in Arduino IDE and platform IO.
49-
<br/>
30+
# Platformio installation
31+
* Open platformio.ini, a project configuration file located in the root of PlatformIO project.
32+
* Add the following line to the lib_deps option of [env:] section:
33+
```
34+
h2zero/NimBLE-Arduino@^1.4.0
35+
```
36+
* Build a project, PlatformIO will automatically install dependencies.
5037

5138
# Using
52-
This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes.
39+
This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes.
5340

54-
If you have not used the original Bluedroid library please refer to the [New user guide](docs/New_user_guide.md).
41+
If you have not used the original Bluedroid library please refer to the [New user guide](docs/New_user_guide.md).
5542

56-
If you are familiar with the original library, see: [The migration guide](docs/Migration_guide.md) for details about breaking changes and migration.
43+
If you are familiar with the original library, see: [The migration guide](docs/Migration_guide.md) for details about breaking changes and migration.
5744

5845
Also see [Improvements_and_updates](docs/Improvements_and_updates.md) for information about non-breaking changes.
5946

60-
[Full API documentation and class list can be found here.](https://h2zero.github.io/NimBLE-Arduino/)
47+
[Full API documentation and class list can be found here.](https://h2zero.github.io/NimBLE-Arduino/)
6148

6249
For added performance and optimizations see [Usage tips](docs/Usage_tips.md).
6350

6451
Check the Refactored_original_examples in the examples folder for highlights of the differences with the original library.
6552

6653
More advanced examples highlighting many available features are in examples/ NimBLE_Server, NimBLE_Client.
6754

68-
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
55+
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
6956

70-
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project,
71-
such as increasing max connections, default is 3, absolute maximum connections is 9.
57+
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project,
58+
such as increasing max connections, default is 3, absolute maximum connections is 9.
7259
<br/>
7360

7461
# Development Status
75-
This Library is tracking the esp-nimble repo, nimble-1.4.0-idf branch, currently [@3c2e1d4.](https://github.com/espressif/esp-nimble)
62+
This Library is tracking the esp-nimble repo, nimble-1.4.0-idf branch, currently [@3df0d20.](https://github.com/espressif/esp-nimble)
7663

77-
Also tracking the NimBLE related changes in ESP-IDF, master branch, currently [@95db4bb.](https://github.com/espressif/esp-idf/tree/master/components/bt/host/nimble)
64+
Also tracking the NimBLE related changes in ESP-IDF, master branch, currently [@95db4bb.](https://github.com/espressif/esp-idf/tree/master/components/bt/host/nimble)
7865
<br/>
7966

8067
# Acknowledgments
8168
* [nkolban](https://github.com/nkolban) and [chegewara](https://github.com/chegewara) for the [original esp32 BLE library](https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils) this project was derived from.
8269
* [beegee-tokyo](https://github.com/beegee-tokyo) for contributing your time to test/debug and contributing the beacon examples.
83-
* [Jeroen88](https://github.com/Jeroen88) for the amazing help debugging and improving the client code.
84-
<br/>
85-
70+
* [Jeroen88](https://github.com/Jeroen88) for the amazing help debugging and improving the client code.
71+
<br/>
72+

0 commit comments

Comments
 (0)