You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Need help? Have questions or suggestions? Join the [](https://gitter.im/NimBLE-Arduino/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
3
5
<br/>
4
6
5
7
# esp-nimble-cpp
@@ -17,7 +19,7 @@ to provide improved capabilites and stability over the original.
17
19
*Your results may vary*
18
20
<br/>
19
21
20
-
###What is NimBLE?
22
+
# What is NimBLE?
21
23
NimBLE is a completely open source Bluetooth Low Energy stack produced by [Apache](https://github.com/apache/mynewt-nimble).
22
24
It is more suited to resource constrained devices than bluedroid and has now been ported to the ESP32 by Espressif.
23
25
<br/>
@@ -34,7 +36,7 @@ Call `NimBLEDevice::init("");` in `app_main`.
34
36
<br/>
35
37
36
38
### ESP-IDF v3.2 & v3.3
37
-
The NimBLE component does not come with these versions of IDF.
39
+
The NimBLE component does not come with these versions of IDF (now included in 3.3.2 and above).
38
40
A backport that works in these versions has been created and is [available here](https://github.com/h2zero/esp-nimble-component).
39
41
Download or clone that repo into your project/components folder and run menuconfig.
40
42
Configure settings in `main menu -> NimBLE Options`.
Copy file name to clipboardExpand all lines: docs/index.md
+24-14Lines changed: 24 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,28 @@
1
1
# Overview
2
2
3
3
This is a C++ BLE library for the ESP32 that uses the NimBLE host stack instead of bluedroid.
4
-
The aim is to maintain, as much as reasonable, the original bluedroid C++ API while adding new features
5
-
and making improvements in performance, resource use and stability.
4
+
The aim is to maintain, as much as reasonable, the original bluedroid C++ & Arduino BLE API by while adding new features
5
+
and making improvements in performance, resource use, and stability.
6
6
7
7
**Testing shows a nearly 50% reduction in flash use and approx. 100kB less ram consumed vs the original!**
8
-
*Your results may vary*
9
-
<br/>
8
+
*Your results may vary*
9
+
<br/>
10
10
11
-
###What is NimBLE?
11
+
# What is NimBLE?
12
12
NimBLE is a completely open source Bluetooth Low Energy stack produced by [Apache](https://github.com/apache/mynewt-nimble).
13
13
It is more suited to resource constrained devices than bluedroid and has now been ported to the ESP32 by Espressif.
14
14
<br/>
15
15
16
16
# Arduino Installation
17
-
Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library.
17
+
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries` and search for NimBLE and install.
18
+
19
+
**Alternatively:** Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library.
18
20
19
-
`#include "NimBLEDevice.h"` at the beginning of your sketch.
21
+
`#include "NimBLEDevice.h"` at the beginning of your sketch.
20
22
21
-
Tested and working with esp32-arduino Arduino IDE and platform IO.
23
+
Call `NimBLEDevice::init` in `setup`.
24
+
25
+
Tested and working with esp32-arduino in Arduino IDE and platform IO.
22
26
<br/>
23
27
24
28
# ESP-IDF Installation
@@ -28,17 +32,17 @@ Download as .zip and extract or clone into the components folder in your esp-idf
28
32
Run menuconfig, go to `Component config->Bluetooth` enable Bluetooth and in `Bluetooth host` NimBLE.
29
33
Configure settings in `NimBLE Options`.
30
34
`#include "NimBLEDevice.h"` in main.cpp.
31
-
Call `NimBLEDevice::init("");` in `app_main`.
35
+
Call `NimBLEDevice::init` in `app_main`.
32
36
<br/>
33
37
34
38
### v3.2 & v3.3
35
-
The NimBLE component does not come with these versions of IDF.
39
+
The NimBLE component does not come with these versions of IDF (now included in 3.3.2 and above).
36
40
A backport that works in these versions has been created and is [available here](https://github.com/h2zero/esp-nimble-component).
37
41
Download or clone that repo into your project/components folder and run menuconfig.
38
42
Configure settings in `main menu -> NimBLE Options`.
39
43
40
44
`#include "NimBLEDevice.h"` in main.cpp.
41
-
Call `NimBLEDevice::init("");` in `app_main`.
45
+
Call `NimBLEDevice::init` in `app_main`.
42
46
<br/>
43
47
44
48
# Using
@@ -50,7 +54,8 @@ If you are familiar with the original library, see: [The migration guide](Migrat
50
54
51
55
Also see [Improvements and updates](Improvements_and_updates.md) for information about non-breaking changes.
52
56
53
-
For more advanced usage see [Usage tips](Usage_tips.md) for more performance and optimization.
57
+
For more advanced usage see [Usage tips](Usage_tips.md) for more performance and optimization.
58
+
<br/>
54
59
55
60
### Arduino specific
56
61
See the Refactored_original_examples in the examples folder for highlights of the differences with the original library.
@@ -60,12 +65,17 @@ More advanced examples highlighting many available features are in examples/NimB
60
65
Beacon examples provided by [beegee-tokyo](https://github.com/beegee-tokyo) are in examples/BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
61
66
62
67
Change the settings in the nimconfig.h file to customize NimBLE to your project, such as increasing max connections (default is 3).
63
-
<br/>
68
+
<br/>
64
69
65
-
### Command line and platformio
70
+
### Arduino command line and platformio
71
+
As an alternative to changing the configuration in nimconfig.h, Arduino command line and platformio.ini options are available.
66
72
See the command line configuration options available in [Command line config](Command_line_config.md).
67
73
<br/>
68
74
75
+
# Need help? Have a question or suggestion?
76
+
Come chat on [gitter](https://gitter.im/NimBLE-Arduino/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link) or open an issue at [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino/issues) or [esp-nimble-cpp](https://github.com/h2zero/esp-nimble-cpp/issues)
77
+
<br/>
78
+
69
79
# Acknowledgments
70
80
71
81
*[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.
0 commit comments