mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-23 13:40:55 +01:00
161 lines
7.9 KiB
HTML
161 lines
7.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>esp-nimble-cpp: Overview</title>
|
|
<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>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">esp-nimble-cpp
|
|
 <span id="projectnumber">1.4.1</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<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">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(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">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="PageDoc"><div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Overview </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<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 />
|
|
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>
|
|
<h1><a class="anchor" id="autotoc_md46"></a>
|
|
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>
|
|
<h1><a class="anchor" id="autotoc_md47"></a>
|
|
ESP-IDF Installation</h1>
|
|
<h3><a class="anchor" id="autotoc_md48"></a>
|
|
v4.0+</h3>
|
|
<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 />
|
|
Call <code><a class="el" href="class_nim_b_l_e_device.html#a674d2e68d4ba0e3f84d7993f9da7d15b" title="Initialize the BLE environment.">NimBLEDevice::init</a></code> in <code>app_main</code>. <br />
|
|
<br />
|
|
</p>
|
|
<h3><a class="anchor" id="autotoc_md49"></a>
|
|
v3.2 & v3.3</h3>
|
|
<p>The NimBLE component does not come with these versions of IDF (now included in 3.3.2 and above). <br />
|
|
A backport that works in these versions has been created and is <a href="https://github.com/h2zero/esp-nimble-component">available here</a>. <br />
|
|
Download or clone that repo into your project/components folder and run menuconfig. Configure settings in <code>main menu -> NimBLE Options</code>. <br />
|
|
</p>
|
|
<p><code>#include "NimBLEDevice.h"</code> in main.cpp. <br />
|
|
Call <code><a class="el" href="class_nim_b_l_e_device.html#a674d2e68d4ba0e3f84d7993f9da7d15b" title="Initialize the BLE environment.">NimBLEDevice::init</a></code> in <code>app_main</code>. <br />
|
|
<br />
|
|
<br />
|
|
</p>
|
|
<h1><a class="anchor" id="autotoc_md50"></a>
|
|
Using</h1>
|
|
<p>This library is intended to be compatible with the original ESP32 BLE functions and types with minor changes. <br />
|
|
</p>
|
|
<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 />
|
|
</p>
|
|
<p>Also see <a class="el" href="md__improvements_and_updates.html">Improvements and updates</a> for information about non-breaking changes. <br />
|
|
</p>
|
|
<p>For more advanced usage see <a class="el" href="md__usage_tips.html">Usage tips</a> for more performance and optimization. <br />
|
|
<br />
|
|
</p>
|
|
<h1><a class="anchor" id="autotoc_md51"></a>
|
|
Need help? Have a question or suggestion?</h1>
|
|
<p>Come chat on <a href="https://gitter.im/NimBLE-Arduino/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link">gitter</a> or open an issue at <a href="https://github.com/h2zero/NimBLE-Arduino/issues">NimBLE-Arduino</a> or <a href="https://github.com/h2zero/esp-nimble-cpp/issues">esp-nimble-cpp</a> <br />
|
|
<br />
|
|
</p>
|
|
<h1><a class="anchor" id="autotoc_md52"></a>
|
|
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>
|
|
<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.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|