esp-nimble-cpp/class_nim_b_l_e_device.html

1743 lines
84 KiB
HTML
Raw Normal View History

<!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"/>
2022-01-15 23:23:57 +01:00
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
2022-01-15 23:23:57 +01:00
<title>esp-nimble-cpp: NimBLEDevice Class Reference</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;">
2022-01-15 23:23:57 +01:00
<div id="projectname">esp-nimble-cpp
&#160;<span id="projectnumber">1.4.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
2022-01-15 23:23:57 +01:00
<!-- 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('class_nim_b_l_e_device.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="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="class_nim_b_l_e_device-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">NimBLEDevice Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A model of a BLE Device from which all the BLE roles are created.
<a href="class_nim_b_l_e_device.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a674d2e68d4ba0e3f84d7993f9da7d15b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a674d2e68d4ba0e3f84d7993f9da7d15b">init</a> (const std::string &amp;deviceName)</td></tr>
<tr class="memdesc:a674d2e68d4ba0e3f84d7993f9da7d15b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the BLE environment. <a href="class_nim_b_l_e_device.html#a674d2e68d4ba0e3f84d7993f9da7d15b">More...</a><br /></td></tr>
<tr class="separator:a674d2e68d4ba0e3f84d7993f9da7d15b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae95693ce0f5b8e784ea8e10834dd624c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ae95693ce0f5b8e784ea8e10834dd624c">deinit</a> (bool clearAll=false)</td></tr>
<tr class="memdesc:ae95693ce0f5b8e784ea8e10834dd624c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown the NimBLE stack/controller. <a href="class_nim_b_l_e_device.html#ae95693ce0f5b8e784ea8e10834dd624c">More...</a><br /></td></tr>
<tr class="separator:ae95693ce0f5b8e784ea8e10834dd624c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0dd47ddcab25136a0adfee6ae76bd9c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ae0dd47ddcab25136a0adfee6ae76bd9c">setDeviceName</a> (const std::string &amp;deviceName)</td></tr>
<tr class="memdesc:ae0dd47ddcab25136a0adfee6ae76bd9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the BLEDevice's name. <a href="class_nim_b_l_e_device.html#ae0dd47ddcab25136a0adfee6ae76bd9c">More...</a><br /></td></tr>
<tr class="separator:ae0dd47ddcab25136a0adfee6ae76bd9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6eda512195c7cbe249a1edbb99510cd"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ad6eda512195c7cbe249a1edbb99510cd">getInitialized</a> ()</td></tr>
<tr class="memdesc:ad6eda512195c7cbe249a1edbb99510cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the initialization is complete. <a href="class_nim_b_l_e_device.html#ad6eda512195c7cbe249a1edbb99510cd">More...</a><br /></td></tr>
<tr class="separator:ad6eda512195c7cbe249a1edbb99510cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77f9f343143d4f074ffb545dd14cbb2b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a77f9f343143d4f074ffb545dd14cbb2b">getAddress</a> ()</td></tr>
<tr class="memdesc:a77f9f343143d4f074ffb545dd14cbb2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get our device address. <a href="class_nim_b_l_e_device.html#a77f9f343143d4f074ffb545dd14cbb2b">More...</a><br /></td></tr>
<tr class="separator:a77f9f343143d4f074ffb545dd14cbb2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf8c494b54d9f0c9466c80f25dbdd961"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#abf8c494b54d9f0c9466c80f25dbdd961">toString</a> ()</td></tr>
<tr class="memdesc:abf8c494b54d9f0c9466c80f25dbdd961"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a string representation of the address of this device. <a href="class_nim_b_l_e_device.html#abf8c494b54d9f0c9466c80f25dbdd961">More...</a><br /></td></tr>
<tr class="separator:abf8c494b54d9f0c9466c80f25dbdd961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabc68166b6dd4a744a98f94e569f37db"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#aabc68166b6dd4a744a98f94e569f37db">whiteListAdd</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:aabc68166b6dd4a744a98f94e569f37db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a peer address to the whitelist. <a href="class_nim_b_l_e_device.html#aabc68166b6dd4a744a98f94e569f37db">More...</a><br /></td></tr>
<tr class="separator:aabc68166b6dd4a744a98f94e569f37db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81abbad5e371fe1cdd91c002b42cc654"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a81abbad5e371fe1cdd91c002b42cc654">whiteListRemove</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a81abbad5e371fe1cdd91c002b42cc654"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a peer address from the whitelist. <a href="class_nim_b_l_e_device.html#a81abbad5e371fe1cdd91c002b42cc654">More...</a><br /></td></tr>
<tr class="separator:a81abbad5e371fe1cdd91c002b42cc654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae51e2d4d6169a61133178a1b0d6b5b45"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ae51e2d4d6169a61133178a1b0d6b5b45">onWhiteList</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:ae51e2d4d6169a61133178a1b0d6b5b45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a peer device is whitelisted. <a href="class_nim_b_l_e_device.html#ae51e2d4d6169a61133178a1b0d6b5b45">More...</a><br /></td></tr>
<tr class="separator:ae51e2d4d6169a61133178a1b0d6b5b45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab28cc2ec59fc9e62d05826633f53d2a0"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ab28cc2ec59fc9e62d05826633f53d2a0">getWhiteListCount</a> ()</td></tr>
<tr class="memdesc:ab28cc2ec59fc9e62d05826633f53d2a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the count of addresses in the whitelist. <a href="class_nim_b_l_e_device.html#ab28cc2ec59fc9e62d05826633f53d2a0">More...</a><br /></td></tr>
<tr class="separator:ab28cc2ec59fc9e62d05826633f53d2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a2229e9e517b84773e65c75124b0789"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a4a2229e9e517b84773e65c75124b0789">getWhiteListAddress</a> (size_t index)</td></tr>
<tr class="memdesc:a4a2229e9e517b84773e65c75124b0789"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the address at the vector index. <a href="class_nim_b_l_e_device.html#a4a2229e9e517b84773e65c75124b0789">More...</a><br /></td></tr>
<tr class="separator:a4a2229e9e517b84773e65c75124b0789"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af93d92316454b051125460056368baec"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_scan.html">NimBLEScan</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#af93d92316454b051125460056368baec">getScan</a> ()</td></tr>
<tr class="memdesc:af93d92316454b051125460056368baec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve the Scan object that we use for scanning. <a href="class_nim_b_l_e_device.html#af93d92316454b051125460056368baec">More...</a><br /></td></tr>
<tr class="separator:af93d92316454b051125460056368baec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d9780d0b5fafc279483822af802a508"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a4d9780d0b5fafc279483822af802a508">createServer</a> ()</td></tr>
<tr class="memdesc:a4d9780d0b5fafc279483822af802a508"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new instance of a server. <a href="class_nim_b_l_e_device.html#a4d9780d0b5fafc279483822af802a508">More...</a><br /></td></tr>
<tr class="separator:a4d9780d0b5fafc279483822af802a508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41d4cc7c85cba0721c6649b001b31b4d"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a41d4cc7c85cba0721c6649b001b31b4d">getServer</a> ()</td></tr>
<tr class="memdesc:a41d4cc7c85cba0721c6649b001b31b4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the instance of the server. <a href="class_nim_b_l_e_device.html#a41d4cc7c85cba0721c6649b001b31b4d">More...</a><br /></td></tr>
<tr class="separator:a41d4cc7c85cba0721c6649b001b31b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d4e1013815e7b021029f447f1702833"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a8d4e1013815e7b021029f447f1702833">setCustomGapHandler</a> (gap_event_handler handler)</td></tr>
<tr class="memdesc:a8d4e1013815e7b021029f447f1702833"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a custom callback for gap events. <a href="class_nim_b_l_e_device.html#a8d4e1013815e7b021029f447f1702833">More...</a><br /></td></tr>
<tr class="separator:a8d4e1013815e7b021029f447f1702833"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8e340c02418771ce72dec758d560938"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#aa8e340c02418771ce72dec758d560938">setSecurityAuth</a> (bool bonding, bool mitm, bool sc)</td></tr>
<tr class="memdesc:aa8e340c02418771ce72dec758d560938"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the authorization mode for this device. <a href="class_nim_b_l_e_device.html#aa8e340c02418771ce72dec758d560938">More...</a><br /></td></tr>
<tr class="separator:aa8e340c02418771ce72dec758d560938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f10da171794581870d678fc947a5d1f"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a2f10da171794581870d678fc947a5d1f">setSecurityAuth</a> (uint8_t auth_req)</td></tr>
<tr class="memdesc:a2f10da171794581870d678fc947a5d1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the authorization mode for this device. <a href="class_nim_b_l_e_device.html#a2f10da171794581870d678fc947a5d1f">More...</a><br /></td></tr>
<tr class="separator:a2f10da171794581870d678fc947a5d1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9fee9e810d5fa18bc8a37053eb9b5d0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ab9fee9e810d5fa18bc8a37053eb9b5d0">setSecurityIOCap</a> (uint8_t iocap)</td></tr>
<tr class="memdesc:ab9fee9e810d5fa18bc8a37053eb9b5d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Input/Output capabilities of this device. <a href="class_nim_b_l_e_device.html#ab9fee9e810d5fa18bc8a37053eb9b5d0">More...</a><br /></td></tr>
<tr class="separator:ab9fee9e810d5fa18bc8a37053eb9b5d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d36c3a34d9474fa1d7f66c0e477d1e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a92d36c3a34d9474fa1d7f66c0e477d1e">setSecurityInitKey</a> (uint8_t init_key)</td></tr>
<tr class="memdesc:a92d36c3a34d9474fa1d7f66c0e477d1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">If we are the initiator of the security procedure this sets the keys we will distribute. <a href="class_nim_b_l_e_device.html#a92d36c3a34d9474fa1d7f66c0e477d1e">More...</a><br /></td></tr>
<tr class="separator:a92d36c3a34d9474fa1d7f66c0e477d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57f0d4db1cc564176b23e860fce13f6a"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a57f0d4db1cc564176b23e860fce13f6a">setSecurityRespKey</a> (uint8_t init_key)</td></tr>
<tr class="memdesc:a57f0d4db1cc564176b23e860fce13f6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the keys we are willing to accept during pairing. <a href="class_nim_b_l_e_device.html#a57f0d4db1cc564176b23e860fce13f6a">More...</a><br /></td></tr>
<tr class="separator:a57f0d4db1cc564176b23e860fce13f6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84631f6d657fb6bd39722560fa229d35"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a84631f6d657fb6bd39722560fa229d35">setSecurityPasskey</a> (uint32_t pin)</td></tr>
<tr class="memdesc:a84631f6d657fb6bd39722560fa229d35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the passkey the server will ask for when pairing. <a href="class_nim_b_l_e_device.html#a84631f6d657fb6bd39722560fa229d35">More...</a><br /></td></tr>
<tr class="separator:a84631f6d657fb6bd39722560fa229d35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa03937eadda020643b536c5d08174d3a"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#aa03937eadda020643b536c5d08174d3a">getSecurityPasskey</a> ()</td></tr>
<tr class="memdesc:aa03937eadda020643b536c5d08174d3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current passkey used for pairing. <a href="class_nim_b_l_e_device.html#aa03937eadda020643b536c5d08174d3a">More...</a><br /></td></tr>
<tr class="separator:aa03937eadda020643b536c5d08174d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d44bb960c0bb1bec02a33369c693085"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a7d44bb960c0bb1bec02a33369c693085">setSecurityCallbacks</a> (<a class="el" href="class_nim_b_l_e_security_callbacks.html">NimBLESecurityCallbacks</a> *pCallbacks)</td></tr>
<tr class="memdesc:a7d44bb960c0bb1bec02a33369c693085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set callbacks that will be used to handle encryption negotiation events and authentication events. <a href="class_nim_b_l_e_device.html#a7d44bb960c0bb1bec02a33369c693085">More...</a><br /></td></tr>
<tr class="separator:a7d44bb960c0bb1bec02a33369c693085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a339157bf3d8fc712fa838e9a5127cc62"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a339157bf3d8fc712fa838e9a5127cc62">startSecurity</a> (uint16_t conn_id)</td></tr>
<tr class="memdesc:a339157bf3d8fc712fa838e9a5127cc62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the connection securing and authorization for this connection. <a href="class_nim_b_l_e_device.html#a339157bf3d8fc712fa838e9a5127cc62">More...</a><br /></td></tr>
<tr class="separator:a339157bf3d8fc712fa838e9a5127cc62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d8203040611e3f82bf4848a9b371e98"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a7d8203040611e3f82bf4848a9b371e98">setMTU</a> (uint16_t mtu)</td></tr>
<tr class="memdesc:a7d8203040611e3f82bf4848a9b371e98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup local mtu that will be used to negotiate mtu during request from client peer. <a href="class_nim_b_l_e_device.html#a7d8203040611e3f82bf4848a9b371e98">More...</a><br /></td></tr>
<tr class="separator:a7d8203040611e3f82bf4848a9b371e98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5520cf3f544d571636eed162de394ec2"><td class="memItemLeft" align="right" valign="top">static uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a5520cf3f544d571636eed162de394ec2">getMTU</a> ()</td></tr>
<tr class="memdesc:a5520cf3f544d571636eed162de394ec2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get local MTU value set. <a href="class_nim_b_l_e_device.html#a5520cf3f544d571636eed162de394ec2">More...</a><br /></td></tr>
<tr class="separator:a5520cf3f544d571636eed162de394ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14ebc6070a261d7a6518ad435b673962"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a14ebc6070a261d7a6518ad435b673962">isIgnored</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a14ebc6070a261d7a6518ad435b673962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the device address is on our ignore list. <a href="class_nim_b_l_e_device.html#a14ebc6070a261d7a6518ad435b673962">More...</a><br /></td></tr>
<tr class="separator:a14ebc6070a261d7a6518ad435b673962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a732425c5c5f5b5b4730c1689700346c0"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a732425c5c5f5b5b4730c1689700346c0">addIgnored</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a732425c5c5f5b5b4730c1689700346c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a device to the ignore list. <a href="class_nim_b_l_e_device.html#a732425c5c5f5b5b4730c1689700346c0">More...</a><br /></td></tr>
<tr class="separator:a732425c5c5f5b5b4730c1689700346c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0374ab8e323277bd8498609559966924"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a0374ab8e323277bd8498609559966924">removeIgnored</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a0374ab8e323277bd8498609559966924"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove a device from the ignore list. <a href="class_nim_b_l_e_device.html#a0374ab8e323277bd8498609559966924">More...</a><br /></td></tr>
<tr class="separator:a0374ab8e323277bd8498609559966924"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:aa994b01b2b5bb9f677f3cffb2f05d140"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_ext_advertising.html">NimBLEExtAdvertising</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#aa994b01b2b5bb9f677f3cffb2f05d140">getAdvertising</a> ()</td></tr>
<tr class="memdesc:aa994b01b2b5bb9f677f3cffb2f05d140"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the instance of the advertising object. <a href="class_nim_b_l_e_device.html#aa994b01b2b5bb9f677f3cffb2f05d140">More...</a><br /></td></tr>
<tr class="separator:aa994b01b2b5bb9f677f3cffb2f05d140"><td class="memSeparator" colspan="2">&#160;</td></tr>
2022-07-31 19:38:16 +02:00
<tr class="memitem:aea8d74a45689590e965db210c7648e5a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#aea8d74a45689590e965db210c7648e5a">startAdvertising</a> (uint8_t inst_id, int duration=0, int max_events=0)</td></tr>
<tr class="memdesc:aea8d74a45689590e965db210c7648e5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to begin advertising. <a href="class_nim_b_l_e_device.html#aea8d74a45689590e965db210c7648e5a">More...</a><br /></td></tr>
<tr class="separator:aea8d74a45689590e965db210c7648e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3be45b458aada9b37019e43840ef7275"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a3be45b458aada9b37019e43840ef7275">stopAdvertising</a> (uint8_t inst_id)</td></tr>
<tr class="memdesc:a3be45b458aada9b37019e43840ef7275"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to stop advertising a data set. <a href="class_nim_b_l_e_device.html#a3be45b458aada9b37019e43840ef7275">More...</a><br /></td></tr>
<tr class="separator:a3be45b458aada9b37019e43840ef7275"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c251b1d5c651ab9ef9b4819f79c1629"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a3c251b1d5c651ab9ef9b4819f79c1629">stopAdvertising</a> ()</td></tr>
<tr class="memdesc:a3c251b1d5c651ab9ef9b4819f79c1629"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to stop all advertising. <a href="class_nim_b_l_e_device.html#a3c251b1d5c651ab9ef9b4819f79c1629">More...</a><br /></td></tr>
<tr class="separator:a3c251b1d5c651ab9ef9b4819f79c1629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad652f03bc10a469b26c5f9c213f005dd"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ad652f03bc10a469b26c5f9c213f005dd">startAdvertising</a> ()</td></tr>
<tr class="memdesc:ad652f03bc10a469b26c5f9c213f005dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to begin advertising. <a href="class_nim_b_l_e_device.html#ad652f03bc10a469b26c5f9c213f005dd">More...</a><br /></td></tr>
<tr class="separator:ad652f03bc10a469b26c5f9c213f005dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8142995252f486916dbb9de2a5b0c9e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#af8142995252f486916dbb9de2a5b0c9e">createClient</a> (<a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> peerAddress=<a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>(&quot;&quot;))</td></tr>
<tr class="memdesc:af8142995252f486916dbb9de2a5b0c9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client object and maintains a list of all client objects each client can connect to 1 peripheral device. <a href="class_nim_b_l_e_device.html#af8142995252f486916dbb9de2a5b0c9e">More...</a><br /></td></tr>
<tr class="separator:af8142995252f486916dbb9de2a5b0c9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83aa0a3d9d57358d35082a442edf8549"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a83aa0a3d9d57358d35082a442edf8549">deleteClient</a> (<a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *pClient)</td></tr>
<tr class="memdesc:a83aa0a3d9d57358d35082a442edf8549"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete the client object and remove it from the list.<br />
Checks if it is connected or trying to connect and disconnects/stops it first. <a href="class_nim_b_l_e_device.html#a83aa0a3d9d57358d35082a442edf8549">More...</a><br /></td></tr>
<tr class="separator:a83aa0a3d9d57358d35082a442edf8549"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7adcd510eef2b9546bcde9a253e56a9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ac7adcd510eef2b9546bcde9a253e56a9">getClientByID</a> (uint16_t conn_id)</td></tr>
<tr class="memdesc:ac7adcd510eef2b9546bcde9a253e56a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference to a client by connection ID. <a href="class_nim_b_l_e_device.html#ac7adcd510eef2b9546bcde9a253e56a9">More...</a><br /></td></tr>
<tr class="separator:ac7adcd510eef2b9546bcde9a253e56a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4dbadc7fc170993e41532f675786504"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ac4dbadc7fc170993e41532f675786504">getClientByPeerAddress</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;peer_addr)</td></tr>
<tr class="memdesc:ac4dbadc7fc170993e41532f675786504"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference to a client by peer address. <a href="class_nim_b_l_e_device.html#ac4dbadc7fc170993e41532f675786504">More...</a><br /></td></tr>
<tr class="separator:ac4dbadc7fc170993e41532f675786504"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10aec48b56ef404f42ade96d6244b312"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a10aec48b56ef404f42ade96d6244b312">getDisconnectedClient</a> ()</td></tr>
<tr class="memdesc:a10aec48b56ef404f42ade96d6244b312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the first disconnected client in the list. <a href="class_nim_b_l_e_device.html#a10aec48b56ef404f42ade96d6244b312">More...</a><br /></td></tr>
<tr class="separator:a10aec48b56ef404f42ade96d6244b312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe21dcac43493689a06bc6ddb91b6faf"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#abe21dcac43493689a06bc6ddb91b6faf">getClientListSize</a> ()</td></tr>
<tr class="memdesc:abe21dcac43493689a06bc6ddb91b6faf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of created client objects. <a href="class_nim_b_l_e_device.html#abe21dcac43493689a06bc6ddb91b6faf">More...</a><br /></td></tr>
<tr class="separator:abe21dcac43493689a06bc6ddb91b6faf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a6fb5e8f0e2cdc012ebae4fb4d12fd0"><td class="memItemLeft" align="right" valign="top">static std::list&lt; <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a1a6fb5e8f0e2cdc012ebae4fb4d12fd0">getClientList</a> ()</td></tr>
<tr class="memdesc:a1a6fb5e8f0e2cdc012ebae4fb4d12fd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the list of created client objects. <a href="class_nim_b_l_e_device.html#a1a6fb5e8f0e2cdc012ebae4fb4d12fd0">More...</a><br /></td></tr>
<tr class="separator:a1a6fb5e8f0e2cdc012ebae4fb4d12fd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20fc979ec9dbad5cce7f73e41b2e422e"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a20fc979ec9dbad5cce7f73e41b2e422e">deleteBond</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a20fc979ec9dbad5cce7f73e41b2e422e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a peer bond. <a href="class_nim_b_l_e_device.html#a20fc979ec9dbad5cce7f73e41b2e422e">More...</a><br /></td></tr>
<tr class="separator:a20fc979ec9dbad5cce7f73e41b2e422e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fe0f568c17130150660e6307851be48"><td class="memItemLeft" align="right" valign="top"><a id="a7fe0f568c17130150660e6307851be48"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a7fe0f568c17130150660e6307851be48">getNumBonds</a> ()</td></tr>
<tr class="memdesc:a7fe0f568c17130150660e6307851be48"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the number of bonded peers stored. <br /></td></tr>
<tr class="separator:a7fe0f568c17130150660e6307851be48"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16bf4f5394735ed8d7f0bb32ca5d269a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#a16bf4f5394735ed8d7f0bb32ca5d269a">isBonded</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;address)</td></tr>
<tr class="memdesc:a16bf4f5394735ed8d7f0bb32ca5d269a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a peer device is bonded. <a href="class_nim_b_l_e_device.html#a16bf4f5394735ed8d7f0bb32ca5d269a">More...</a><br /></td></tr>
<tr class="separator:a16bf4f5394735ed8d7f0bb32ca5d269a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab436502ecd044f8b3480ec3e824e1418"><td class="memItemLeft" align="right" valign="top"><a id="ab436502ecd044f8b3480ec3e824e1418"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ab436502ecd044f8b3480ec3e824e1418">deleteAllBonds</a> ()</td></tr>
<tr class="memdesc:ab436502ecd044f8b3480ec3e824e1418"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes all bonding information. <br /></td></tr>
<tr class="separator:ab436502ecd044f8b3480ec3e824e1418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7f090f4b1a2d593f38b20859e071f0c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nim_b_l_e_device.html#ac7f090f4b1a2d593f38b20859e071f0c">getBondedAddress</a> (int index)</td></tr>
<tr class="memdesc:ac7f090f4b1a2d593f38b20859e071f0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the address of a bonded peer device by index. <a href="class_nim_b_l_e_device.html#ac7f090f4b1a2d593f38b20859e071f0c">More...</a><br /></td></tr>
<tr class="separator:ac7f090f4b1a2d593f38b20859e071f0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A model of a BLE Device from which all the BLE roles are created. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a732425c5c5f5b5b4730c1689700346c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a732425c5c5f5b5b4730c1689700346c0">&#9670;&nbsp;</a></span>addIgnored()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::addIgnored </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a device to the ignore list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address of the device we want to ignore. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af8142995252f486916dbb9de2a5b0c9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8142995252f486916dbb9de2a5b0c9e">&#9670;&nbsp;</a></span>createClient()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::createClient </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>&#160;</td>
<td class="paramname"><em>peerAddress</em> = <code><a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a>(&quot;&quot;)</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new client object and maintains a list of all client objects each client can connect to 1 peripheral device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
2022-07-31 19:38:16 +02:00
<tr><td class="paramdir">[in]</td><td class="paramname">peerAddress</td><td>An optional peer address that is copied to the new client object, allows for calling <a class="el" href="class_nim_b_l_e_client.html#a1f9d4ad6d3d03b819bfad82d1f39b684" title="Connect to the BLE Server.">NimBLEClient::connect(bool)</a> without a device or address parameter. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A reference to the new client object. </dd></dl>
</div>
</div>
<a id="a4d9780d0b5fafc279483822af802a508"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d9780d0b5fafc279483822af802a508">&#9670;&nbsp;</a></span>createServer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> * NimBLEDevice::createServer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new instance of a server. </p>
<dl class="section return"><dt>Returns</dt><dd>A new instance of the server. </dd></dl>
</div>
</div>
<a id="ae95693ce0f5b8e784ea8e10834dd624c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae95693ce0f5b8e784ea8e10834dd624c">&#9670;&nbsp;</a></span>deinit()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::deinit </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>clearAll</em> = <code>false</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Shutdown the NimBLE stack/controller. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">clearAll</td><td>If true, deletes all server/advertising/scan/client objects after deinitializing. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If clearAll is true when called, any references to the created objects become invalid. </dd></dl>
</div>
</div>
<a id="a20fc979ec9dbad5cce7f73e41b2e422e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20fc979ec9dbad5cce7f73e41b2e422e">&#9670;&nbsp;</a></span>deleteBond()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::deleteBond </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Deletes a peer bond. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address of the peer with which to delete bond info. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success. </dd></dl>
</div>
</div>
<a id="a83aa0a3d9d57358d35082a442edf8549"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83aa0a3d9d57358d35082a442edf8549">&#9670;&nbsp;</a></span>deleteClient()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::deleteClient </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> *&#160;</td>
<td class="paramname"><em>pClient</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Delete the client object and remove it from the list.<br />
Checks if it is connected or trying to connect and disconnects/stops it first. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pClient</td><td>A pointer to the client object. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a77f9f343143d4f074ffb545dd14cbb2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77f9f343143d4f074ffb545dd14cbb2b">&#9670;&nbsp;</a></span>getAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> NimBLEDevice::getAddress </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get our device address. </p>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="class_nim_b_l_e_address.html" title="A BLE device address.">NimBLEAddress</a> object of our public address if we have one, if not then our current random address. </dd></dl>
</div>
</div>
<a id="aa994b01b2b5bb9f677f3cffb2f05d140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa994b01b2b5bb9f677f3cffb2f05d140">&#9670;&nbsp;</a></span>getAdvertising()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_advertising.html">NimBLEAdvertising</a> * NimBLEDevice::getAdvertising </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the instance of the advertising object. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the advertising object. </dd></dl>
</div>
</div>
<a id="ac7f090f4b1a2d593f38b20859e071f0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7f090f4b1a2d593f38b20859e071f0c">&#9670;&nbsp;</a></span>getBondedAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> NimBLEDevice::getBondedAddress </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the address of a bonded peer device by index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The index to retrieve the peer address of. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_nim_b_l_e_address.html" title="A BLE device address.">NimBLEAddress</a> of the found bonded peer or nullptr if not found. </dd></dl>
</div>
</div>
<a id="ac7adcd510eef2b9546bcde9a253e56a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7adcd510eef2b9546bcde9a253e56a9">&#9670;&nbsp;</a></span>getClientByID()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::getClientByID </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>conn_id</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a reference to a client by connection ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">conn_id</td><td>The client connection ID to search for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the client object with the spcified connection ID. </dd></dl>
</div>
</div>
<a id="ac4dbadc7fc170993e41532f675786504"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4dbadc7fc170993e41532f675786504">&#9670;&nbsp;</a></span>getClientByPeerAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::getClientByPeerAddress </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>peer_addr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a reference to a client by peer address. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">peer_addr</td><td>The address of the peer to search for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the client object with the peer address. </dd></dl>
</div>
</div>
<a id="a1a6fb5e8f0e2cdc012ebae4fb4d12fd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a6fb5e8f0e2cdc012ebae4fb4d12fd0">&#9670;&nbsp;</a></span>getClientList()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::list&lt; <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * &gt; * NimBLEDevice::getClientList </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the list of created client objects. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the list of clients. </dd></dl>
</div>
</div>
<a id="abe21dcac43493689a06bc6ddb91b6faf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe21dcac43493689a06bc6ddb91b6faf">&#9670;&nbsp;</a></span>getClientListSize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t NimBLEDevice::getClientListSize </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of created client objects. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of client objects created. </dd></dl>
</div>
</div>
<a id="a10aec48b56ef404f42ade96d6244b312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10aec48b56ef404f42ade96d6244b312">&#9670;&nbsp;</a></span>getDisconnectedClient()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::getDisconnectedClient </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Finds the first disconnected client in the list. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the first client object that is not connected to a peer. </dd></dl>
</div>
</div>
<a id="ad6eda512195c7cbe249a1edbb99510cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6eda512195c7cbe249a1edbb99510cd">&#9670;&nbsp;</a></span>getInitialized()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::getInitialized </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the initialization is complete. </p>
<dl class="section return"><dt>Returns</dt><dd>true if initialized. </dd></dl>
</div>
</div>
<a id="a5520cf3f544d571636eed162de394ec2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5520cf3f544d571636eed162de394ec2">&#9670;&nbsp;</a></span>getMTU()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint16_t NimBLEDevice::getMTU </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get local MTU value set. </p>
<dl class="section return"><dt>Returns</dt><dd>The current preferred MTU setting. </dd></dl>
</div>
</div>
<a id="af93d92316454b051125460056368baec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af93d92316454b051125460056368baec">&#9670;&nbsp;</a></span>getScan()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_scan.html">NimBLEScan</a> * NimBLEDevice::getScan </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Retrieve the Scan object that we use for scanning. </p>
<dl class="section return"><dt>Returns</dt><dd>The scanning object reference. This is a singleton object. The caller should not try and release/delete it. </dd></dl>
</div>
</div>
<a id="aa03937eadda020643b536c5d08174d3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa03937eadda020643b536c5d08174d3a">&#9670;&nbsp;</a></span>getSecurityPasskey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">uint32_t NimBLEDevice::getSecurityPasskey </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the current passkey used for pairing. </p>
<dl class="section return"><dt>Returns</dt><dd>The current passkey. </dd></dl>
</div>
</div>
<a id="a41d4cc7c85cba0721c6649b001b31b4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41d4cc7c85cba0721c6649b001b31b4d">&#9670;&nbsp;</a></span>getServer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_server.html">NimBLEServer</a> * NimBLEDevice::getServer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the instance of the server. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the server instance. </dd></dl>
</div>
</div>
<a id="a4a2229e9e517b84773e65c75124b0789"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a2229e9e517b84773e65c75124b0789">&#9670;&nbsp;</a></span>getWhiteListAddress()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> NimBLEDevice::getWhiteListAddress </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the address at the vector index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>The vector index to retrieve the address from. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="class_nim_b_l_e_address.html" title="A BLE device address.">NimBLEAddress</a> at the whitelist index or nullptr if not found. </dd></dl>
</div>
</div>
<a id="ab28cc2ec59fc9e62d05826633f53d2a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab28cc2ec59fc9e62d05826633f53d2a0">&#9670;&nbsp;</a></span>getWhiteListCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t NimBLEDevice::getWhiteListCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the count of addresses in the whitelist. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of addresses in the whitelist. </dd></dl>
</div>
</div>
<a id="a674d2e68d4ba0e3f84d7993f9da7d15b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a674d2e68d4ba0e3f84d7993f9da7d15b">&#9670;&nbsp;</a></span>init()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::init </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>deviceName</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialize the BLE environment. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">deviceName</td><td>The device name of the device. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a16bf4f5394735ed8d7f0bb32ca5d269a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16bf4f5394735ed8d7f0bb32ca5d269a">&#9670;&nbsp;</a></span>isBonded()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::isBonded </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a peer device is bonded. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address to check for bonding. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if bonded. </dd></dl>
</div>
</div>
<a id="a14ebc6070a261d7a6518ad435b673962"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14ebc6070a261d7a6518ad435b673962">&#9670;&nbsp;</a></span>isIgnored()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::isIgnored </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if the device address is on our ignore list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address to look for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if ignoring. </dd></dl>
</div>
</div>
<a id="ae51e2d4d6169a61133178a1b0d6b5b45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae51e2d4d6169a61133178a1b0d6b5b45">&#9670;&nbsp;</a></span>onWhiteList()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::onWhiteList </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Checks if a peer device is whitelisted. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address to check for in the whitelist. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the address is in the whitelist. </dd></dl>
</div>
</div>
<a id="a0374ab8e323277bd8498609559966924"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0374ab8e323277bd8498609559966924">&#9670;&nbsp;</a></span>removeIgnored()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::removeIgnored </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove a device from the ignore list. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address of the device we want to remove from the list. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a8d4e1013815e7b021029f447f1702833"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d4e1013815e7b021029f447f1702833">&#9670;&nbsp;</a></span>setCustomGapHandler()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setCustomGapHandler </td>
<td>(</td>
<td class="paramtype">gap_event_handler&#160;</td>
<td class="paramname"><em>handler</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set a custom callback for gap events. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">handler</td><td>The function to call when gap events occur. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ae0dd47ddcab25136a0adfee6ae76bd9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0dd47ddcab25136a0adfee6ae76bd9c">&#9670;&nbsp;</a></span>setDeviceName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setDeviceName </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>deviceName</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the BLEDevice's name. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">deviceName</td><td>The device name of the device. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7d8203040611e3f82bf4848a9b371e98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d8203040611e3f82bf4848a9b371e98">&#9670;&nbsp;</a></span>setMTU()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int NimBLEDevice::setMTU </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>mtu</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Setup local mtu that will be used to negotiate mtu during request from client peer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">mtu</td><td>Value to set local mtu:<ul>
<li>This should be larger than 23 and lower or equal to BLE_ATT_MTU_MAX = 527. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa8e340c02418771ce72dec758d560938"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8e340c02418771ce72dec758d560938">&#9670;&nbsp;</a></span>setSecurityAuth() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityAuth </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>bonding</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>mitm</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>sc</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the authorization mode for this device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">bonding</td><td>If true we allow bonding, false no bonding will be performed. </td></tr>
<tr><td class="paramname">mitm</td><td>If true we are capable of man in the middle protection, false if not. </td></tr>
<tr><td class="paramname">sc</td><td>If true we will perform secure connection pairing, false we will use legacy pairing. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2f10da171794581870d678fc947a5d1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f10da171794581870d678fc947a5d1f">&#9670;&nbsp;</a></span>setSecurityAuth() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityAuth </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>auth_req</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the authorization mode for this device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">auth_req</td><td>A bitmap indicating what modes are supported.<br />
The available bits are defined as:<ul>
<li>0x01 BLE_SM_PAIR_AUTHREQ_BOND</li>
<li>0x04 BLE_SM_PAIR_AUTHREQ_MITM</li>
<li>0x08 BLE_SM_PAIR_AUTHREQ_SC</li>
<li>0x10 BLE_SM_PAIR_AUTHREQ_KEYPRESS - not yet supported. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7d44bb960c0bb1bec02a33369c693085"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d44bb960c0bb1bec02a33369c693085">&#9670;&nbsp;</a></span>setSecurityCallbacks()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityCallbacks </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_nim_b_l_e_security_callbacks.html">NimBLESecurityCallbacks</a> *&#160;</td>
<td class="paramname"><em>callbacks</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set callbacks that will be used to handle encryption negotiation events and authentication events. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">callbacks</td><td>Pointer to <a class="el" href="class_nim_b_l_e_security_callbacks.html" title="Callbacks to handle GAP events related to authorization. Deprecated - provided for backward compatibi...">NimBLESecurityCallbacks</a> class </td></tr>
</table>
</dd>
</dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>For backward compatibility, New code should use client/server callback methods. </dd></dl>
</div>
</div>
<a id="a92d36c3a34d9474fa1d7f66c0e477d1e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92d36c3a34d9474fa1d7f66c0e477d1e">&#9670;&nbsp;</a></span>setSecurityInitKey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityInitKey </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>init_key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If we are the initiator of the security procedure this sets the keys we will distribute. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">init_key</td><td>A bitmap indicating which keys to distribute during pairing.<br />
The available bits are defined as:<ul>
<li>0x01: BLE_SM_PAIR_KEY_DIST_ENC - Distribute the encryption key.</li>
<li>0x02: BLE_SM_PAIR_KEY_DIST_ID - Distribute the ID key (IRK).</li>
<li>0x04: BLE_SM_PAIR_KEY_DIST_SIGN</li>
<li>0x08: BLE_SM_PAIR_KEY_DIST_LINK </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab9fee9e810d5fa18bc8a37053eb9b5d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9fee9e810d5fa18bc8a37053eb9b5d0">&#9670;&nbsp;</a></span>setSecurityIOCap()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityIOCap </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>iocap</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the Input/Output capabilities of this device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">iocap</td><td>One of the following values:<ul>
<li>0x00 BLE_HS_IO_DISPLAY_ONLY DisplayOnly IO capability</li>
<li>0x01 BLE_HS_IO_DISPLAY_YESNO DisplayYesNo IO capability</li>
<li>0x02 BLE_HS_IO_KEYBOARD_ONLY KeyboardOnly IO capability</li>
<li>0x03 BLE_HS_IO_NO_INPUT_OUTPUT NoInputNoOutput IO capability</li>
<li>0x04 BLE_HS_IO_KEYBOARD_DISPLAY KeyboardDisplay Only IO capability </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a84631f6d657fb6bd39722560fa229d35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84631f6d657fb6bd39722560fa229d35">&#9670;&nbsp;</a></span>setSecurityPasskey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityPasskey </td>
<td>(</td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>pin</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the passkey the server will ask for when pairing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pin</td><td>The passkey to use. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a57f0d4db1cc564176b23e860fce13f6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57f0d4db1cc564176b23e860fce13f6a">&#9670;&nbsp;</a></span>setSecurityRespKey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::setSecurityRespKey </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>resp_key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the keys we are willing to accept during pairing. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">resp_key</td><td>A bitmap indicating which keys to accept during pairing. The available bits are defined as:<ul>
<li>0x01: BLE_SM_PAIR_KEY_DIST_ENC - Accept the encryption key.</li>
<li>0x02: BLE_SM_PAIR_KEY_DIST_ID - Accept the ID key (IRK).</li>
<li>0x04: BLE_SM_PAIR_KEY_DIST_SIGN</li>
<li>0x08: BLE_SM_PAIR_KEY_DIST_LINK </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ad652f03bc10a469b26c5f9c213f005dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad652f03bc10a469b26c5f9c213f005dd">&#9670;&nbsp;</a></span>startAdvertising() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::startAdvertising </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convenience function to begin advertising. </p>
<dl class="section return"><dt>Returns</dt><dd>True if advertising started successfully. </dd></dl>
2022-07-31 19:38:16 +02:00
</div>
</div>
<a id="aea8d74a45689590e965db210c7648e5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea8d74a45689590e965db210c7648e5a">&#9670;&nbsp;</a></span>startAdvertising() <span class="overload">[2/2]</span></h2>
2022-07-31 19:38:16 +02:00
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::startAdvertising </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>inst_id</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>duration</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>max_events</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convenience function to begin advertising. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">inst_id</td><td>The extended advertisement instance ID to start. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">duration</td><td>How long to advertise for in milliseconds, 0 = forever (default). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">max_events</td><td>Maximum number of advertisement events to send, 0 = no limit (default). </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if advertising started successfully. </dd></dl>
2022-07-31 19:38:16 +02:00
</div>
</div>
<a id="a339157bf3d8fc712fa838e9a5127cc62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a339157bf3d8fc712fa838e9a5127cc62">&#9670;&nbsp;</a></span>startSecurity()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int NimBLEDevice::startSecurity </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>conn_id</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Start the connection securing and authorization for this connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">conn_id</td><td>The connection id of the peer device. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>NimBLE stack return code, 0 = success. </dd></dl>
2022-07-31 19:38:16 +02:00
</div>
</div>
<a id="a3c251b1d5c651ab9ef9b4819f79c1629"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c251b1d5c651ab9ef9b4819f79c1629">&#9670;&nbsp;</a></span>stopAdvertising() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::stopAdvertising </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convenience function to stop all advertising. </p>
<dl class="section return"><dt>Returns</dt><dd>True if advertising stopped successfully. </dd></dl>
</div>
</div>
<a id="a3be45b458aada9b37019e43840ef7275"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3be45b458aada9b37019e43840ef7275">&#9670;&nbsp;</a></span>stopAdvertising() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::stopAdvertising </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>inst_id</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Convenience function to stop advertising a data set. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">inst_id</td><td>The extended advertisement instance ID to stop advertising. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if advertising stopped successfully. </dd></dl>
</div>
</div>
<a id="abf8c494b54d9f0c9466c80f25dbdd961"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf8c494b54d9f0c9466c80f25dbdd961">&#9670;&nbsp;</a></span>toString()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::string NimBLEDevice::toString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a string representation of the address of this device. </p>
<dl class="section return"><dt>Returns</dt><dd>A string representation of this device address. </dd></dl>
</div>
</div>
<a id="aabc68166b6dd4a744a98f94e569f37db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabc68166b6dd4a744a98f94e569f37db">&#9670;&nbsp;</a></span>whiteListAdd()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::whiteListAdd </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Add a peer address to the whitelist. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address to add to the whitelist. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful. </dd></dl>
</div>
</div>
<a id="a81abbad5e371fe1cdd91c002b42cc654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81abbad5e371fe1cdd91c002b42cc654">&#9670;&nbsp;</a></span>whiteListRemove()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::whiteListRemove </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;&#160;</td>
<td class="paramname"><em>address</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Remove a peer address from the whitelist. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">address</td><td>The address to remove from the whitelist. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if successful. </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="class_nim_b_l_e_device.html">NimBLEDevice</a></li>
2022-01-15 23:23:57 +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.1 </li>
</ul>
</div>
</body>
</html>