-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix typos
- Loading branch information
Showing
34 changed files
with
2,981 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docs/doxydocs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,72 @@ | ||
[Latest release ![Release Version](https://img.shields.io/github/release/h2zero/NimBLE-Arduino.svg?style=plastic) | ||
![Release Date](https://img.shields.io/github/release-date/h2zero/NimBLE-Arduino.svg?style=plastic)](https://github.com/h2zero/NimBLE-Arduino/releases/latest/) | ||
![Release Date](https://img.shields.io/github/release-date/h2zero/NimBLE-Arduino.svg?style=plastic)](https://github.com/h2zero/NimBLE-Arduino/releases/latest/) | ||
|
||
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) | ||
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) | ||
<br/> | ||
|
||
# NimBLE-Arduino | ||
A fork of the NimBLE stack restructured for compilation in the Ardruino IDE with a CPP library for use with ESP32. | ||
A fork of the NimBLE stack refactored for compilation in the Ardruino IDE. | ||
|
||
**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)** | ||
**As of release 1.4.0 Nordic Semiconductor nRF51 and nRF52 series devices are now supported** | ||
|
||
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 capabilites and stability over the original. | ||
<br/> | ||
|
||
## Resource use improvement | ||
|
||
### (Original) BLE_client example comparison (Debug): | ||
#### Arduino BLE Library | ||
Sketch uses **1216377** bytes (58%) of program storage space. | ||
Memory after connection: Free Heap: **171548** | ||
|
||
#### NimBLE-Arduino library | ||
Sketch uses **617256** bytes (29%) of program storage space. | ||
Memory after connection: Free Heap: **270336** | ||
*** | ||
### (Original) BLE_notify example comparison (Debug): | ||
#### Arduino BLE Library | ||
Sketch uses **1208409** bytes (57%) of program storage space. | ||
Memory after connection: Free Heap: **173300** | ||
## Supported MCU's | ||
- Espressif: ESP32, ESP32C3, ESP32S3 | ||
- Nordic: nRF51, nRF52 series (**Requires** using [n-able arduino core](https://github.com/h2zero/n-able-Arduino)) | ||
|
||
#### NimBLE-Arduino library | ||
Sketch uses **603432** bytes (28%) of program storage space. | ||
Memory after connection: Free Heap: **269792** | ||
**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)** | ||
|
||
**As shown: there is nearly a 50% reduction in flash use and approx. 100kB less ram consumed!** | ||
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. | ||
<br/> | ||
|
||
# Installation | ||
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries` and search for NimBLE and install. | ||
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. | ||
|
||
# Arduino installation | ||
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries`, search for NimBLE and install. | ||
|
||
**Alternatively:** Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library. | ||
|
||
`#include "NimBLEDevice.h"` at the beginning of your sketch. | ||
|
||
Tested and working with esp32-arduino in Arduino IDE and platform IO. | ||
<br/> | ||
# Platformio installation | ||
* Open platformio.ini, a project configuration file located in the root of PlatformIO project. | ||
* Add the following line to the lib_deps option of [env:] section: | ||
``` | ||
h2zero/NimBLE-Arduino@^1.4.0 | ||
``` | ||
* Build a project, PlatformIO will automatically install dependencies. | ||
|
||
# Using | ||
This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes. | ||
This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes. | ||
|
||
If you have not used the original Bluedroid library please refer to the [New user guide](docs/New_user_guide.md). | ||
If you have not used the original Bluedroid library please refer to the [New user guide](docs/New_user_guide.md). | ||
|
||
If you are familiar with the original library, see: [The migration guide](docs/Migration_guide.md) for details about breaking changes and migration. | ||
If you are familiar with the original library, see: [The migration guide](docs/Migration_guide.md) for details about breaking changes and migration. | ||
|
||
Also see [Improvements_and_updates](docs/Improvements_and_updates.md) for information about non-breaking changes. | ||
|
||
[Full API documentation and class list can be found here.](https://h2zero.github.io/NimBLE-Arduino/) | ||
[Full API documentation and class list can be found here.](https://h2zero.github.io/NimBLE-Arduino/) | ||
|
||
For added performance and optimizations see [Usage tips](docs/Usage_tips.md). | ||
|
||
Check the Refactored_original_examples in the examples folder for highlights of the differences with the original library. | ||
|
||
More advanced examples highlighting many available features are in examples/ NimBLE_Server, NimBLE_Client. | ||
|
||
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon. | ||
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon. | ||
|
||
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project, | ||
such as increasing max connections, default is 3, absolute maximum connections is 9. | ||
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project, | ||
such as increasing max connections, default is 3, absolute maximum connections is 9. | ||
<br/> | ||
|
||
# Development Status | ||
This Library is tracking the esp-nimble repo, nimble-1.4.0-idf branch, currently [@3c2e1d4.](https://github.com/espressif/esp-nimble) | ||
This Library is tracking the esp-nimble repo, nimble-1.4.0-idf branch, currently [@3df0d20.](https://github.com/espressif/esp-nimble) | ||
|
||
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) | ||
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) | ||
<br/> | ||
|
||
# Acknowledgments | ||
* [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. | ||
* [beegee-tokyo](https://github.com/beegee-tokyo) for contributing your time to test/debug and contributing the beacon examples. | ||
* [Jeroen88](https://github.com/Jeroen88) for the amazing help debugging and improving the client code. | ||
<br/> | ||
* [Jeroen88](https://github.com/Jeroen88) for the amazing help debugging and improving the client code. | ||
<br/> | ||
|
Oops, something went wrong.