2021-08-05 03:02:30 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2024-12-15 01:45:58 +01:00
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
2021-08-05 03:02:30 +02:00
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
2024-12-15 01:45:58 +01:00
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.9.8" / >
2021-08-05 03:02:30 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2022-01-15 23:23:57 +01:00
< title > esp-nimble-cpp: Overview< / title >
2021-08-05 03:02:30 +02:00
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
2024-12-15 01:45:58 +01:00
< tr id = "projectrow" >
< td id = "projectalign" >
< div id = "projectname" > esp-nimble-cpp< span id = "projectnumber" >   2.0.0< / span >
2021-08-05 03:02:30 +02:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2024-12-15 01:45:58 +01:00
<!-- Generated by Doxygen 1.9.8 -->
2021-08-05 03:02:30 +02:00
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
2021-08-05 03:02:30 +02:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2021-08-05 03:02:30 +02:00
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2024-12-15 01:45:58 +01:00
/* @license-end */
< / script >
2021-08-05 03:02:30 +02:00
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2021-08-05 03:02:30 +02:00
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
2024-12-15 01:45:58 +01:00
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" > < / div >
< div class = "SRStatus" id = "Loading" > Loading...< / div >
< div class = "SRStatus" id = "Searching" > Searching...< / div >
< div class = "SRStatus" id = "NoMatches" > No Matches< / div >
< / div >
< / div >
< / div >
2021-08-05 03:02:30 +02:00
< / div >
2024-12-15 01:45:58 +01:00
< div > < div class = "header" >
< div class = "headertitle" > < div class = "title" > Overview < / div > < / div >
2021-08-05 03:02:30 +02:00
< / div > <!-- header -->
< div class = "contents" >
2024-12-15 01:45:58 +01:00
< div class = "textblock" > < p > < a class = "anchor" id = "md_index" > < / a > This is a C++ BLE library for the ESP32 that uses the NimBLE host stack instead of bluedroid. < br / >
2021-08-05 03:02:30 +02:00
The aim is to maintain, as much as reasonable, the original bluedroid C++ & Arduino BLE API by while adding new features < br / >
and making improvements in performance, resource use, and stability. < br / >
< / p >
< p > < b > Testing shows a nearly 50% reduction in flash use and approx. 100kB less ram consumed vs the original!< / b > < br / >
< em > Your results may vary< / em > < br / >
< br / >
< / p >
2024-12-15 01:45:58 +01:00
< h1 > < a class = "anchor" id = "what-is-nimble" > < / a >
2021-08-05 03:02:30 +02:00
What is NimBLE?< / h1 >
< p > NimBLE is a completely open source Bluetooth Low Energy stack produced by < a href = "https://github.com/apache/mynewt-nimble" > Apache< / a > . < br / >
It is more suited to resource constrained devices than bluedroid and has now been ported to the ESP32 by Espressif. < br / >
< br / >
< / p >
2024-12-15 01:45:58 +01:00
< h1 > < a class = "anchor" id = "esp-idf-installation" > < / a >
2021-08-05 03:02:30 +02:00
ESP-IDF Installation< / h1 >
2024-12-15 01:45:58 +01:00
< h2 > < a class = "anchor" id = "v40" > < / a >
v4.0+< / h2 >
2021-08-05 03:02:30 +02:00
< p > Download as .zip and extract or clone into the components folder in your esp-idf project.< / p >
< p > Run menuconfig, go to < code > Component config-> Bluetooth< / code > enable Bluetooth and in < code > Bluetooth host< / code > NimBLE. < br / >
Configure settings in < code > NimBLE Options< / code > . < br / >
< code > #include "NimBLEDevice.h"< / code > in main.cpp. < br / >
2024-12-15 01:45:58 +01:00
Call < code > < a class = "el" href = "class_nim_b_l_e_device.html#a2e8bb71daabbffd9eab8787493a45ce7" title = "Initialize the BLE environment." > NimBLEDevice::init< / a > < / code > in < code > app_main< / code > . < br / >
2021-08-05 03:02:30 +02:00
< br / >
< / p >
2024-12-15 01:45:58 +01:00
< h1 > < a class = "anchor" id = "using" > < / a >
2021-08-05 03:02:30 +02:00
Using< / h1 >
< p > This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes. < br / >
< / p >
2024-12-15 01:45:58 +01:00
< p > If you have not used the original Bluedroid library please refer to the < a class = "el" href = "md__new__user__guide.html" > New user guide< / a > .< / p >
< p > If you are familiar with the original library, see: < a class = "el" href = "md__migration__guide.html" > The migration guide< / a > for details. < br / >
2021-08-05 03:02:30 +02:00
< / p >
2024-12-15 01:45:58 +01:00
< p > For more advanced usage see < a class = "el" href = "md__usage__tips.html" > Usage tips< / a > for more performance and optimization. < br / >
2021-08-05 03:02:30 +02:00
< br / >
< / p >
2024-12-15 01:45:58 +01:00
< h1 > < a class = "anchor" id = "sponsors" > < / a >
Sponsors< / h1 >
< p > Thank you to all the sponsors who support this project!< / p >
< p > If you use this library for a commercial product please consider < a href = "https://github.com/sponsors/h2zero" > sponsoring the development< / a > to ensure the continued updates and maintenance. < br / >
2021-08-05 03:02:30 +02:00
< br / >
< / p >
2024-12-15 01:45:58 +01:00
< h1 > < a class = "anchor" id = "acknowledgments" > < / a >
2021-08-05 03:02:30 +02:00
Acknowledgments< / h1 >
< ul >
< li > < a href = "https://github.com/nkolban" > nkolban< / a > and < a href = "https://github.com/chegewara" > chegewara< / a > for the < a href = "https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils" > original esp32 BLE library< / a > this project was derived from.< / li >
< li > < a href = "https://github.com/beegee-tokyo" > beegee-tokyo< / a > for contributing your time to test/debug and contributing the beacon examples.< / li >
< li > < a href = "https://github.com/Jeroen88" > Jeroen88< / a > for the amazing help debugging and improving the client code. < br / >
< br / >
< / li >
< / ul >
< / div > < / div > <!-- PageDoc -->
< / div > <!-- contents -->
< / div > <!-- doc - content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
2024-12-15 01:45:58 +01:00
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.8 < / li >
2021-08-05 03:02:30 +02:00
< / ul >
< / div >
< / body >
< / html >