esp-nimble-cpp/md__bluetooth_5_features.html

120 lines
7 KiB
HTML
Raw Permalink Normal View History

2022-07-31 19:38:16 +02:00
<!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: Bluetooth 5.x features</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
&#160;<span id="projectnumber">1.4.1</span>
2022-07-31 19:38:16 +02:00
</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&amp;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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('md__bluetooth_5_features.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">Bluetooth 5.x features </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="autotoc_md38"></a>
2022-07-31 19:38:16 +02:00
About extended advertising</h1>
<p>Extended advertising allows for much more capability and flexibility.</p>
<ul>
<li>Allows for 251 bytes of advertisement data and up to 1650 bytes when chained (configuration dependant) vs 31.</li>
<li>New PHY's (physical layers) that allow for faster data rate (2M PHY) or long range/slower data rates (CODED PHY) as well as the original 1M PHY.</li>
<li>New periodic advertising, allowing the scanning device to sync with the advertisements of a beacon. This allows for the scanning device to sleep or perform other tasks before the next expected advertisement is sent, preserving cpu cycles and power (To be implemented). <br />
<br />
</li>
</ul>
<h1><a class="anchor" id="autotoc_md39"></a>
2022-07-31 19:38:16 +02:00
Enabling extended advertising</h1>
<p>Extended advertising is supported when enabled with the config option <code>CONFIG_BT_NIMBLE_EXT_ADV</code> set to a value of 1. This is done in menuconfig under <code>Component config &gt; Bluetooth &gt; NimBLE options &gt; Enable extended advertising</code>, or set in <code><a class="el" href="nimconfig_8h.html">nimconfig.h</a></code> for Arduino, or in <code>build_flags</code> in PlatformIO.</p>
<p>When enabled the following will occur:</p><ul>
<li><code><a class="el" href="class_nim_b_l_e_scan.html#a21b1e27816717b77533755f31dfaa820" title="Start scanning.">NimBLEScan::start</a></code> method will scan on both the 1M PHY and the coded PHY standards automatically.</li>
<li><code><a class="el" href="class_nim_b_l_e_client.html#ae9b3e8a9b47c7eaad040b485bda958a1" title="Connect to an advertising device.">NimBLEClient::connect</a></code> will use the primary PHY the device is listening on, unless specified (see below).</li>
<li><code><a class="el" href="class_nim_b_l_e_client.html#a3ab0a864d8fc7f91ea27f459e2c76b9e" title="Set the PHY types to use when connecting to a server.">NimBLEClient::setConnectPhy</a></code> becomes available to specify the PHY's to connect with (default is all).</li>
<li><code><a class="el" href="class_nim_b_l_e_advertising.html" title="Perform and manage BLE advertising.">NimBLEAdvertising</a></code> is no longer available for use and is replaced by <code><a class="el" href="class_nim_b_l_e_ext_advertising.html" title="Extended advertising class.">NimBLEExtAdvertising</a></code>. <code><a class="el" href="class_nim_b_l_e_device.html#aa994b01b2b5bb9f677f3cffb2f05d140" title="Get the instance of the advertising object.">NimBLEDevice::getAdvertising</a></code> will now return an instance of <code><a class="el" href="class_nim_b_l_e_ext_advertising.html" title="Extended advertising class.">NimBLEExtAdvertising</a></code>.</li>
<li><code><a class="el" href="class_nim_b_l_e_advertisement_data.html" title="Advertisement data set by the programmer to be published by the BLE server.">NimBLEAdvertisementData</a></code> is no longer available for use and is replaced by <code><a class="el" href="class_nim_b_l_e_ext_advertisement.html" title="Extended advertisement data.">NimBLEExtAdvertisement</a></code>. This new class is where everything about the advertisement is configured, including the advertisement intervals and advertisement ended callback. </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</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>