esp-nimble-cpp/class_nim_b_l_e_device.html
2024-12-17 01:50:27 +00:00

2074 lines
99 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" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<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 id="projectrow">
<td id="projectalign">
<div id="projectname">esp-nimble-cpp<span id="projectnumber">&#160;2.0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(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:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(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">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</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>
<p><code>#include &lt;<a class="el" href="_nim_b_l_e_device_8h_source.html">NimBLEDevice.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a2e8bb71daabbffd9eab8787493a45ce7" id="r_a2e8bb71daabbffd9eab8787493a45ce7"><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#a2e8bb71daabbffd9eab8787493a45ce7">init</a> (const std::string &amp;deviceName)</td></tr>
<tr class="memdesc:a2e8bb71daabbffd9eab8787493a45ce7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the BLE environment. <br /></td></tr>
<tr class="separator:a2e8bb71daabbffd9eab8787493a45ce7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66362258c033860e8448032913be355f" id="r_a66362258c033860e8448032913be355f"><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#a66362258c033860e8448032913be355f">deinit</a> (bool clearAll=false)</td></tr>
<tr class="memdesc:a66362258c033860e8448032913be355f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shutdown the NimBLE stack/controller. <br /></td></tr>
<tr class="separator:a66362258c033860e8448032913be355f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa64b6baff54c010eb8b4d0ba338cc01" id="r_aaa64b6baff54c010eb8b4d0ba338cc01"><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#aaa64b6baff54c010eb8b4d0ba338cc01">setDeviceName</a> (const std::string &amp;deviceName)</td></tr>
<tr class="memdesc:aaa64b6baff54c010eb8b4d0ba338cc01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the BLEDevice name. <br /></td></tr>
<tr class="separator:aaa64b6baff54c010eb8b4d0ba338cc01"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a425561f1e23856756ab9c1c330da5737" id="r_a425561f1e23856756ab9c1c330da5737"><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#a425561f1e23856756ab9c1c330da5737">isInitialized</a> ()</td></tr>
<tr class="memdesc:a425561f1e23856756ab9c1c330da5737"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the initialization is complete. <br /></td></tr>
<tr class="separator:a425561f1e23856756ab9c1c330da5737"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77f9f343143d4f074ffb545dd14cbb2b" id="r_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. <br /></td></tr>
<tr class="separator:a77f9f343143d4f074ffb545dd14cbb2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf8c494b54d9f0c9466c80f25dbdd961" id="r_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. <br /></td></tr>
<tr class="separator:abf8c494b54d9f0c9466c80f25dbdd961"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabc68166b6dd4a744a98f94e569f37db" id="r_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. <br /></td></tr>
<tr class="separator:aabc68166b6dd4a744a98f94e569f37db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81abbad5e371fe1cdd91c002b42cc654" id="r_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. <br /></td></tr>
<tr class="separator:a81abbad5e371fe1cdd91c002b42cc654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae51e2d4d6169a61133178a1b0d6b5b45" id="r_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. <br /></td></tr>
<tr class="separator:ae51e2d4d6169a61133178a1b0d6b5b45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab28cc2ec59fc9e62d05826633f53d2a0" id="r_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. <br /></td></tr>
<tr class="separator:ab28cc2ec59fc9e62d05826633f53d2a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a2229e9e517b84773e65c75124b0789" id="r_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. <br /></td></tr>
<tr class="separator:a4a2229e9e517b84773e65c75124b0789"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31acb43c150014f06bad74b57c2335ff" id="r_a31acb43c150014f06bad74b57c2335ff"><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#a31acb43c150014f06bad74b57c2335ff">setOwnAddrType</a> (uint8_t type)</td></tr>
<tr class="memdesc:a31acb43c150014f06bad74b57c2335ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the address type to use. <br /></td></tr>
<tr class="separator:a31acb43c150014f06bad74b57c2335ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f6521729222f9e55e40325824786070" id="r_a0f6521729222f9e55e40325824786070"><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#a0f6521729222f9e55e40325824786070">setOwnAddr</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;addr)</td></tr>
<tr class="memdesc:a0f6521729222f9e55e40325824786070"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the device address to use. <br /></td></tr>
<tr class="separator:a0f6521729222f9e55e40325824786070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a462f908708d9eff0562447197cee5d16" id="r_a462f908708d9eff0562447197cee5d16"><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#a462f908708d9eff0562447197cee5d16">setOwnAddr</a> (const uint8_t *addr)</td></tr>
<tr class="memdesc:a462f908708d9eff0562447197cee5d16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the device address to use. <br /></td></tr>
<tr class="separator:a462f908708d9eff0562447197cee5d16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a179d1199badd67464cab921672a44405" id="r_a179d1199badd67464cab921672a44405"><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#a179d1199badd67464cab921672a44405">setCustomGapHandler</a> (gap_event_handler handler)</td></tr>
<tr class="memdesc:a179d1199badd67464cab921672a44405"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a custom callback for gap events. <br /></td></tr>
<tr class="separator:a179d1199badd67464cab921672a44405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa8e340c02418771ce72dec758d560938" id="r_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. <br /></td></tr>
<tr class="separator:aa8e340c02418771ce72dec758d560938"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abbf642ac4ce4023c7c4d9a1e4333b328" id="r_abbf642ac4ce4023c7c4d9a1e4333b328"><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#abbf642ac4ce4023c7c4d9a1e4333b328">setSecurityAuth</a> (uint8_t auth)</td></tr>
<tr class="memdesc:abbf642ac4ce4023c7c4d9a1e4333b328"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the authorization mode for this device. <br /></td></tr>
<tr class="separator:abbf642ac4ce4023c7c4d9a1e4333b328"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9fee9e810d5fa18bc8a37053eb9b5d0" id="r_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. <br /></td></tr>
<tr class="separator:ab9fee9e810d5fa18bc8a37053eb9b5d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0a29a11f71d3ba32645c096067a853b" id="r_ab0a29a11f71d3ba32645c096067a853b"><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#ab0a29a11f71d3ba32645c096067a853b">setSecurityInitKey</a> (uint8_t initKey)</td></tr>
<tr class="memdesc:ab0a29a11f71d3ba32645c096067a853b"><td class="mdescLeft">&#160;</td><td class="mdescRight">If we are the initiator of the security procedure this sets the keys we will distribute. <br /></td></tr>
<tr class="separator:ab0a29a11f71d3ba32645c096067a853b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab769a5f5afb3ee486527d41b8c445566" id="r_ab769a5f5afb3ee486527d41b8c445566"><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#ab769a5f5afb3ee486527d41b8c445566">setSecurityRespKey</a> (uint8_t respKey)</td></tr>
<tr class="memdesc:ab769a5f5afb3ee486527d41b8c445566"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the keys we are willing to accept during pairing. <br /></td></tr>
<tr class="separator:ab769a5f5afb3ee486527d41b8c445566"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab62da4d606355b20539e37e881f4044d" id="r_ab62da4d606355b20539e37e881f4044d"><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#ab62da4d606355b20539e37e881f4044d">setSecurityPasskey</a> (uint32_t passKey)</td></tr>
<tr class="memdesc:ab62da4d606355b20539e37e881f4044d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the passkey the server will ask for when pairing. <br /></td></tr>
<tr class="separator:ab62da4d606355b20539e37e881f4044d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa03937eadda020643b536c5d08174d3a" id="r_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. <br /></td></tr>
<tr class="separator:aa03937eadda020643b536c5d08174d3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b6b4bedfe37725ed9c20e91a3470005" id="r_a8b6b4bedfe37725ed9c20e91a3470005"><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#a8b6b4bedfe37725ed9c20e91a3470005">startSecurity</a> (uint16_t connHandle, int *rcPtr=nullptr)</td></tr>
<tr class="memdesc:a8b6b4bedfe37725ed9c20e91a3470005"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the connection securing and authorization for this connection. <br /></td></tr>
<tr class="separator:a8b6b4bedfe37725ed9c20e91a3470005"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43b83de25635b69cfd663a7f0e7784d6" id="r_a43b83de25635b69cfd663a7f0e7784d6"><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#a43b83de25635b69cfd663a7f0e7784d6">setMTU</a> (uint16_t mtu)</td></tr>
<tr class="memdesc:a43b83de25635b69cfd663a7f0e7784d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup local mtu that will be used to negotiate mtu during request from client peer. <br /></td></tr>
<tr class="separator:a43b83de25635b69cfd663a7f0e7784d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5520cf3f544d571636eed162de394ec2" id="r_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. <br /></td></tr>
<tr class="separator:a5520cf3f544d571636eed162de394ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c07c41733730754fd31efae5a43f085" id="r_a1c07c41733730754fd31efae5a43f085"><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#a1c07c41733730754fd31efae5a43f085">onReset</a> (int reason)</td></tr>
<tr class="memdesc:a1c07c41733730754fd31efae5a43f085"><td class="mdescLeft">&#160;</td><td class="mdescRight">Host reset, we pass the message so we don't make calls until re-synced. <br /></td></tr>
<tr class="separator:a1c07c41733730754fd31efae5a43f085"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01737196c77959a03964504ee0b48f4d" id="r_a01737196c77959a03964504ee0b48f4d"><td class="memItemLeft" align="right" valign="top"><a id="a01737196c77959a03964504ee0b48f4d" name="a01737196c77959a03964504ee0b48f4d"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>onSync</b> (void)</td></tr>
<tr class="memdesc:a01737196c77959a03964504ee0b48f4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Host synced with controller, all clear to make calls to the stack. <br /></td></tr>
<tr class="separator:a01737196c77959a03964504ee0b48f4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4771de8c0805836f0e7059199d56411" id="r_ab4771de8c0805836f0e7059199d56411"><td class="memItemLeft" align="right" valign="top"><a id="ab4771de8c0805836f0e7059199d56411" name="ab4771de8c0805836f0e7059199d56411"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>host_task</b> (void *param)</td></tr>
<tr class="memdesc:ab4771de8c0805836f0e7059199d56411"><td class="mdescLeft">&#160;</td><td class="mdescRight">The main host task. <br /></td></tr>
<tr class="separator:ab4771de8c0805836f0e7059199d56411"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae59445e712b468349099befca7a7be16" id="r_ae59445e712b468349099befca7a7be16"><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#ae59445e712b468349099befca7a7be16">getPower</a> ()</td></tr>
<tr class="memdesc:ae59445e712b468349099befca7a7be16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the transmission power. <br /></td></tr>
<tr class="separator:ae59445e712b468349099befca7a7be16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b45ce364bf3ee69959389c8cc70249c" id="r_a2b45ce364bf3ee69959389c8cc70249c"><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#a2b45ce364bf3ee69959389c8cc70249c">setPower</a> (int8_t dbm)</td></tr>
<tr class="memdesc:a2b45ce364bf3ee69959389c8cc70249c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the transmission power. <br /></td></tr>
<tr class="separator:a2b45ce364bf3ee69959389c8cc70249c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e021958df2f2dbf40e52b9022c37594" id="r_a0e021958df2f2dbf40e52b9022c37594"><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#a0e021958df2f2dbf40e52b9022c37594">setDefaultPhy</a> (uint8_t txPhyMask, uint8_t rxPhyMask)</td></tr>
<tr class="memdesc:a0e021958df2f2dbf40e52b9022c37594"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the preferred default phy to use for connections. <br /></td></tr>
<tr class="separator:a0e021958df2f2dbf40e52b9022c37594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af93d92316454b051125460056368baec" id="r_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. <br /></td></tr>
<tr class="separator:af93d92316454b051125460056368baec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d9780d0b5fafc279483822af802a508" id="r_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 an instance of a server. <br /></td></tr>
<tr class="separator:a4d9780d0b5fafc279483822af802a508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41d4cc7c85cba0721c6649b001b31b4d" id="r_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. <br /></td></tr>
<tr class="separator:a41d4cc7c85cba0721c6649b001b31b4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff35384524ab80a19ce1ef23fdcd970b" id="r_aff35384524ab80a19ce1ef23fdcd970b"><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#aff35384524ab80a19ce1ef23fdcd970b">injectConfirmPasskey</a> (const <a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> &amp;peerInfo, bool accept)</td></tr>
<tr class="memdesc:aff35384524ab80a19ce1ef23fdcd970b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inject the provided numeric comparison response into the Security Manager. <br /></td></tr>
<tr class="separator:aff35384524ab80a19ce1ef23fdcd970b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5071168b3bda69aa4457a43473ad7a96" id="r_a5071168b3bda69aa4457a43473ad7a96"><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#a5071168b3bda69aa4457a43473ad7a96">injectPassKey</a> (const <a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> &amp;peerInfo, uint32_t pin)</td></tr>
<tr class="memdesc:a5071168b3bda69aa4457a43473ad7a96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inject the provided passkey into the Security Manager. <br /></td></tr>
<tr class="separator:a5071168b3bda69aa4457a43473ad7a96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa994b01b2b5bb9f677f3cffb2f05d140" id="r_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 extended advertising object. <br /></td></tr>
<tr class="separator:aa994b01b2b5bb9f677f3cffb2f05d140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a181ee3b2b143e50e216fc2728194ff85" id="r_a181ee3b2b143e50e216fc2728194ff85"><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#a181ee3b2b143e50e216fc2728194ff85">startAdvertising</a> (uint8_t instId, int duration=0, int maxEvents=0)</td></tr>
<tr class="memdesc:a181ee3b2b143e50e216fc2728194ff85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to begin advertising. <br /></td></tr>
<tr class="separator:a181ee3b2b143e50e216fc2728194ff85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1de5ed55c2b048c0281462d929a70aa2" id="r_a1de5ed55c2b048c0281462d929a70aa2"><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#a1de5ed55c2b048c0281462d929a70aa2">stopAdvertising</a> (uint8_t instId)</td></tr>
<tr class="memdesc:a1de5ed55c2b048c0281462d929a70aa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to stop advertising a data set. <br /></td></tr>
<tr class="separator:a1de5ed55c2b048c0281462d929a70aa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c251b1d5c651ab9ef9b4819f79c1629" id="r_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. <br /></td></tr>
<tr class="separator:a3c251b1d5c651ab9ef9b4819f79c1629"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48d43b8afd9dcdc0c6a5e1aeda715f00" id="r_a48d43b8afd9dcdc0c6a5e1aeda715f00"><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#a48d43b8afd9dcdc0c6a5e1aeda715f00">startAdvertising</a> (uint32_t duration=0)</td></tr>
<tr class="memdesc:a48d43b8afd9dcdc0c6a5e1aeda715f00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convenience function to begin advertising. <br /></td></tr>
<tr class="separator:a48d43b8afd9dcdc0c6a5e1aeda715f00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a010b12177917f33e7d3633736c0cc553" id="r_a010b12177917f33e7d3633736c0cc553"><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#a010b12177917f33e7d3633736c0cc553">createClient</a> ()</td></tr>
<tr class="memdesc:a010b12177917f33e7d3633736c0cc553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client object, each client can connect to 1 peripheral device. <br /></td></tr>
<tr class="separator:a010b12177917f33e7d3633736c0cc553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b52d5124390f1d547273d25ecae6704" id="r_a7b52d5124390f1d547273d25ecae6704"><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#a7b52d5124390f1d547273d25ecae6704">createClient</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;peerAddress)</td></tr>
<tr class="memdesc:a7b52d5124390f1d547273d25ecae6704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new client object, each client can connect to 1 peripheral device. <br /></td></tr>
<tr class="separator:a7b52d5124390f1d547273d25ecae6704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83aa0a3d9d57358d35082a442edf8549" id="r_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. <br /></td></tr>
<tr class="separator:a83aa0a3d9d57358d35082a442edf8549"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c15d6b767091fae4412428436827c4e" id="r_a9c15d6b767091fae4412428436827c4e"><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#a9c15d6b767091fae4412428436827c4e">getClientByHandle</a> (uint16_t connHandle)</td></tr>
<tr class="memdesc:a9c15d6b767091fae4412428436827c4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference to a client by connection handle. <br /></td></tr>
<tr class="separator:a9c15d6b767091fae4412428436827c4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc7060413706ec7217ea9add4b169117" id="r_afc7060413706ec7217ea9add4b169117"><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#afc7060413706ec7217ea9add4b169117">getClientByPeerAddress</a> (const <a class="el" href="class_nim_b_l_e_address.html">NimBLEAddress</a> &amp;peerAddress)</td></tr>
<tr class="memdesc:afc7060413706ec7217ea9add4b169117"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference to a client by peer address. <br /></td></tr>
<tr class="separator:afc7060413706ec7217ea9add4b169117"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10aec48b56ef404f42ade96d6244b312" id="r_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 available. <br /></td></tr>
<tr class="separator:a10aec48b56ef404f42ade96d6244b312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0944f3f6eca16ed4b7fd96d88b2906d9" id="r_a0944f3f6eca16ed4b7fd96d88b2906d9"><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#a0944f3f6eca16ed4b7fd96d88b2906d9">getCreatedClientCount</a> ()</td></tr>
<tr class="memdesc:a0944f3f6eca16ed4b7fd96d88b2906d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of created client objects. <br /></td></tr>
<tr class="separator:a0944f3f6eca16ed4b7fd96d88b2906d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb098c56b7d08636e1745052eb184fb2" id="r_acb098c56b7d08636e1745052eb184fb2"><td class="memItemLeft" align="right" valign="top">static std::vector&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#acb098c56b7d08636e1745052eb184fb2">getConnectedClients</a> ()</td></tr>
<tr class="memdesc:acb098c56b7d08636e1745052eb184fb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a list of connected clients. <br /></td></tr>
<tr class="separator:acb098c56b7d08636e1745052eb184fb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20fc979ec9dbad5cce7f73e41b2e422e" id="r_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. <br /></td></tr>
<tr class="separator:a20fc979ec9dbad5cce7f73e41b2e422e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fe0f568c17130150660e6307851be48" id="r_a7fe0f568c17130150660e6307851be48"><td class="memItemLeft" align="right" valign="top"><a id="a7fe0f568c17130150660e6307851be48" name="a7fe0f568c17130150660e6307851be48"></a>
static int&#160;</td><td class="memItemRight" valign="bottom"><b>getNumBonds</b> ()</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" id="r_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. <br /></td></tr>
<tr class="separator:a16bf4f5394735ed8d7f0bb32ca5d269a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17fe75ad9d4f3d8cfd876b4a9bf70bb0" id="r_a17fe75ad9d4f3d8cfd876b4a9bf70bb0"><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#a17fe75ad9d4f3d8cfd876b4a9bf70bb0">deleteAllBonds</a> ()</td></tr>
<tr class="memdesc:a17fe75ad9d4f3d8cfd876b4a9bf70bb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes all bonding information. <br /></td></tr>
<tr class="separator:a17fe75ad9d4f3d8cfd876b4a9bf70bb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7f090f4b1a2d593f38b20859e071f0c" id="r_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. <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="a010b12177917f33e7d3633736c0cc553" name="a010b12177917f33e7d3633736c0cc553"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a010b12177917f33e7d3633736c0cc553">&#9670;&#160;</a></span>createClient() <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"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::createClient </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>Creates a new client object, each client can connect to 1 peripheral device. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the new client object, or nullptr on error. </dd></dl>
</div>
</div>
<a id="a7b52d5124390f1d547273d25ecae6704" name="a7b52d5124390f1d547273d25ecae6704"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b52d5124390f1d547273d25ecae6704">&#9670;&#160;</a></span>createClient() <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"><a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * NimBLEDevice::createClient </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>peerAddress</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>Creates a new client object, each client can connect to 1 peripheral device. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">peerAddress</td><td>A peer address reference that is copied to the new client object, allows for calling NimBLEClient::connect(bool) without a device or address parameter. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the new client object, or nullptr on error. </dd></dl>
</div>
</div>
<a id="a4d9780d0b5fafc279483822af802a508" name="a4d9780d0b5fafc279483822af802a508"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d9780d0b5fafc279483822af802a508">&#9670;&#160;</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 an instance of a server. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the instance of the server. </dd></dl>
</div>
</div>
<a id="a66362258c033860e8448032913be355f" name="a66362258c033860e8448032913be355f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a66362258c033860e8448032913be355f">&#9670;&#160;</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">bool 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 de-initializing. </td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>If clearAll is true when called all objects created will be deleted and any references to the created objects become invalid. If clearAll is false, the objects will remain and can be used again after re-initializing the stack. If the stack was not already initialized, the objects created can be deleted when clearAll is true with no effect on the stack. </dd></dl>
</div>
</div>
<a id="a17fe75ad9d4f3d8cfd876b4a9bf70bb0" name="a17fe75ad9d4f3d8cfd876b4a9bf70bb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17fe75ad9d4f3d8cfd876b4a9bf70bb0">&#9670;&#160;</a></span>deleteAllBonds()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::deleteAllBonds </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>Deletes all bonding information. </p>
<dl class="section return"><dt>Returns</dt><dd>True on success. </dd></dl>
</div>
</div>
<a id="a20fc979ec9dbad5cce7f73e41b2e422e" name="a20fc979ec9dbad5cce7f73e41b2e422e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20fc979ec9dbad5cce7f73e41b2e422e">&#9670;&#160;</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" name="a83aa0a3d9d57358d35082a442edf8549"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83aa0a3d9d57358d35082a442edf8549">&#9670;&#160;</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" name="a77f9f343143d4f074ffb545dd14cbb2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77f9f343143d4f074ffb545dd14cbb2b">&#9670;&#160;</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 with the currently used address, or a NULL address if not set. </dd></dl>
</div>
</div>
<a id="aa994b01b2b5bb9f677f3cffb2f05d140" name="aa994b01b2b5bb9f677f3cffb2f05d140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa994b01b2b5bb9f677f3cffb2f05d140">&#9670;&#160;</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 extended advertising object. </p>
<p>Get the instance of the advertising object.</p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the extended advertising object.</dd>
<dd>
A pointer to the advertising object. </dd></dl>
</div>
</div>
<a id="ac7f090f4b1a2d593f38b20859e071f0c" name="ac7f090f4b1a2d593f38b20859e071f0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7f090f4b1a2d593f38b20859e071f0c">&#9670;&#160;</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 null address if not found. </dd></dl>
</div>
</div>
<a id="a9c15d6b767091fae4412428436827c4e" name="a9c15d6b767091fae4412428436827c4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c15d6b767091fae4412428436827c4e">&#9670;&#160;</a></span>getClientByHandle()</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::getClientByHandle </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>connHandle</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 handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">connHandle</td><td>The client connection handle to search for. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the client object with the specified connection handle or nullptr. </dd></dl>
</div>
</div>
<a id="afc7060413706ec7217ea9add4b169117" name="afc7060413706ec7217ea9add4b169117"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc7060413706ec7217ea9add4b169117">&#9670;&#160;</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>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">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 or nullptr. </dd></dl>
</div>
</div>
<a id="acb098c56b7d08636e1745052eb184fb2" name="acb098c56b7d08636e1745052eb184fb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb098c56b7d08636e1745052eb184fb2">&#9670;&#160;</a></span>getConnectedClients()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; <a class="el" href="class_nim_b_l_e_client.html">NimBLEClient</a> * &gt; NimBLEDevice::getConnectedClients </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 a list of connected clients. </p>
<dl class="section return"><dt>Returns</dt><dd>A vector of connected client objects. </dd></dl>
</div>
</div>
<a id="a0944f3f6eca16ed4b7fd96d88b2906d9" name="a0944f3f6eca16ed4b7fd96d88b2906d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0944f3f6eca16ed4b7fd96d88b2906d9">&#9670;&#160;</a></span>getCreatedClientCount()</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::getCreatedClientCount </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" name="a10aec48b56ef404f42ade96d6244b312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10aec48b56ef404f42ade96d6244b312">&#9670;&#160;</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 available. </p>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the first client object that is not connected to a peer or nullptr. </dd></dl>
</div>
</div>
<a id="a5520cf3f544d571636eed162de394ec2" name="a5520cf3f544d571636eed162de394ec2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5520cf3f544d571636eed162de394ec2">&#9670;&#160;</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="ae59445e712b468349099befca7a7be16" name="ae59445e712b468349099befca7a7be16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae59445e712b468349099befca7a7be16">&#9670;&#160;</a></span>getPower()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">int NimBLEDevice::getPower </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 transmission power. </p>
<dl class="section return"><dt>Returns</dt><dd>The power level currently used in dbm or 0xFF on error. </dd></dl>
</div>
</div>
<a id="af93d92316454b051125460056368baec" name="af93d92316454b051125460056368baec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af93d92316454b051125460056368baec">&#9670;&#160;</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" name="aa03937eadda020643b536c5d08174d3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa03937eadda020643b536c5d08174d3a">&#9670;&#160;</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" name="a41d4cc7c85cba0721c6649b001b31b4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41d4cc7c85cba0721c6649b001b31b4d">&#9670;&#160;</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 or nullptr if none have been created. </dd></dl>
</div>
</div>
<a id="a4a2229e9e517b84773e65c75124b0789" name="a4a2229e9e517b84773e65c75124b0789"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a2229e9e517b84773e65c75124b0789">&#9670;&#160;</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 null address if not found. </dd></dl>
</div>
</div>
<a id="ab28cc2ec59fc9e62d05826633f53d2a0" name="ab28cc2ec59fc9e62d05826633f53d2a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab28cc2ec59fc9e62d05826633f53d2a0">&#9670;&#160;</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="a2e8bb71daabbffd9eab8787493a45ce7" name="a2e8bb71daabbffd9eab8787493a45ce7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e8bb71daabbffd9eab8787493a45ce7">&#9670;&#160;</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">bool 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="aff35384524ab80a19ce1ef23fdcd970b" name="aff35384524ab80a19ce1ef23fdcd970b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff35384524ab80a19ce1ef23fdcd970b">&#9670;&#160;</a></span>injectConfirmPasskey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::injectConfirmPasskey </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> &amp;&#160;</td>
<td class="paramname"><em>peerInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>accept</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>Inject the provided numeric comparison response into the Security Manager. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">peerInfo</td><td>Connection information for the peer. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">accept</td><td>Whether the user confirmed or declined the comparison. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a5071168b3bda69aa4457a43473ad7a96" name="a5071168b3bda69aa4457a43473ad7a96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5071168b3bda69aa4457a43473ad7a96">&#9670;&#160;</a></span>injectPassKey()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::injectPassKey </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="class_nim_b_l_e_conn_info.html">NimBLEConnInfo</a> &amp;&#160;</td>
<td class="paramname"><em>peerInfo</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>passkey</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>Inject the provided passkey into the Security Manager. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">peerInfo</td><td>Connection information for the peer. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">passkey</td><td>The 6-digit passkey to inject. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the passkey was injected successfully. </dd></dl>
</div>
</div>
<a id="a16bf4f5394735ed8d7f0bb32ca5d269a" name="a16bf4f5394735ed8d7f0bb32ca5d269a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16bf4f5394735ed8d7f0bb32ca5d269a">&#9670;&#160;</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="a425561f1e23856756ab9c1c330da5737" name="a425561f1e23856756ab9c1c330da5737"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a425561f1e23856756ab9c1c330da5737">&#9670;&#160;</a></span>isInitialized()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::isInitialized </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="a1c07c41733730754fd31efae5a43f085" name="a1c07c41733730754fd31efae5a43f085"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c07c41733730754fd31efae5a43f085">&#9670;&#160;</a></span>onReset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void NimBLEDevice::onReset </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>reason</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>Host reset, we pass the message so we don't make calls until re-synced. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">reason</td><td>The reason code for the reset. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ae51e2d4d6169a61133178a1b0d6b5b45" name="ae51e2d4d6169a61133178a1b0d6b5b45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae51e2d4d6169a61133178a1b0d6b5b45">&#9670;&#160;</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="a179d1199badd67464cab921672a44405" name="a179d1199badd67464cab921672a44405"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a179d1199badd67464cab921672a44405">&#9670;&#160;</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">bool 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>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
</div>
</div>
<a id="a0e021958df2f2dbf40e52b9022c37594" name="a0e021958df2f2dbf40e52b9022c37594"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e021958df2f2dbf40e52b9022c37594">&#9670;&#160;</a></span>setDefaultPhy()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::setDefaultPhy </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>txPhyMask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>rxPhyMask</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 preferred default phy to use for connections. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">txPhyMask</td><td>TX PHY. Can be mask of following:<ul>
<li>BLE_GAP_LE_PHY_1M_MASK</li>
<li>BLE_GAP_LE_PHY_2M_MASK</li>
<li>BLE_GAP_LE_PHY_CODED_MASK</li>
<li>BLE_GAP_LE_PHY_ANY_MASK </li>
</ul>
</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rxPhyMask</td><td>RX PHY. Can be mask of following:<ul>
<li>BLE_GAP_LE_PHY_1M_MASK</li>
<li>BLE_GAP_LE_PHY_2M_MASK</li>
<li>BLE_GAP_LE_PHY_CODED_MASK</li>
<li>BLE_GAP_LE_PHY_ANY_MASK </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if successful. </dd></dl>
</div>
</div>
<a id="aaa64b6baff54c010eb8b4d0ba338cc01" name="aaa64b6baff54c010eb8b4d0ba338cc01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa64b6baff54c010eb8b4d0ba338cc01">&#9670;&#160;</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">bool 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 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 name to set. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a43b83de25635b69cfd663a7f0e7784d6" name="a43b83de25635b69cfd663a7f0e7784d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43b83de25635b69cfd663a7f0e7784d6">&#9670;&#160;</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">bool 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>
<dl class="section return"><dt>Returns</dt><dd>True if the mtu was set successfully. </dd></dl>
</div>
</div>
<a id="a0f6521729222f9e55e40325824786070" name="a0f6521729222f9e55e40325824786070"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f6521729222f9e55e40325824786070">&#9670;&#160;</a></span>setOwnAddr() <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::setOwnAddr </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>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>Set the device address to use. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>The address to set. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the address was set successfully.</dd></dl>
<p>To use the address generated the address type must be set to random with <code>setOwnAddrType</code>. </p>
</div>
</div>
<a id="a462f908708d9eff0562447197cee5d16" name="a462f908708d9eff0562447197cee5d16"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a462f908708d9eff0562447197cee5d16">&#9670;&#160;</a></span>setOwnAddr() <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::setOwnAddr </td>
<td>(</td>
<td class="paramtype">const uint8_t *&#160;</td>
<td class="paramname"><em>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>Set the device address to use. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">addr</td><td>The address to set. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the address was set successfully.</dd></dl>
<p>To use the address generated the address type must be set to random with <code>setOwnAddrType</code>. </p>
</div>
</div>
<a id="a31acb43c150014f06bad74b57c2335ff" name="a31acb43c150014f06bad74b57c2335ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31acb43c150014f06bad74b57c2335ff">&#9670;&#160;</a></span>setOwnAddrType()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::setOwnAddrType </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>type</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>Sets the address type to use. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Bluetooth Device address type. The available types are defined as:<ul>
<li>0x00: BLE_OWN_ADDR_PUBLIC - Public address; Uses the hardware static address.</li>
<li>0x01: BLE_OWN_ADDR_RANDOM - Random static address; Uses the hardware or generated random static address.</li>
<li>0x02: BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT - Resolvable private address, defaults to public if no RPA available.</li>
<li>0x03: BLE_OWN_ADDR_RPA_RANDOM_DEFAULT - Resolvable private address, defaults to random static if no RPA available. </li>
</ul>
</td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2b45ce364bf3ee69959389c8cc70249c" name="a2b45ce364bf3ee69959389c8cc70249c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b45ce364bf3ee69959389c8cc70249c">&#9670;&#160;</a></span>setPower()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool NimBLEDevice::setPower </td>
<td>(</td>
<td class="paramtype">int8_t&#160;</td>
<td class="paramname"><em>dbm</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 transmission power. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dbm</td><td>The power level to set in dBm. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the power level was set successfully. </dd></dl>
</div>
</div>
<a id="aa8e340c02418771ce72dec758d560938" name="aa8e340c02418771ce72dec758d560938"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa8e340c02418771ce72dec758d560938">&#9670;&#160;</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="abbf642ac4ce4023c7c4d9a1e4333b328" name="abbf642ac4ce4023c7c4d9a1e4333b328"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbf642ac4ce4023c7c4d9a1e4333b328">&#9670;&#160;</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="ab0a29a11f71d3ba32645c096067a853b" name="ab0a29a11f71d3ba32645c096067a853b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0a29a11f71d3ba32645c096067a853b">&#9670;&#160;</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>initKey</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">initKey</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" name="ab9fee9e810d5fa18bc8a37053eb9b5d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9fee9e810d5fa18bc8a37053eb9b5d0">&#9670;&#160;</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="ab62da4d606355b20539e37e881f4044d" name="ab62da4d606355b20539e37e881f4044d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab62da4d606355b20539e37e881f4044d">&#9670;&#160;</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>passkey</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">passkey</td><td>The passkey to use. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ab769a5f5afb3ee486527d41b8c445566" name="ab769a5f5afb3ee486527d41b8c445566"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab769a5f5afb3ee486527d41b8c445566">&#9670;&#160;</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>respKey</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">respKey</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="a48d43b8afd9dcdc0c6a5e1aeda715f00" name="a48d43b8afd9dcdc0c6a5e1aeda715f00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48d43b8afd9dcdc0c6a5e1aeda715f00">&#9670;&#160;</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="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>duration</em> = <code>0</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>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">duration</td><td>The duration in milliseconds to advertise for, default = forever. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if advertising started successfully. </dd></dl>
</div>
</div>
<a id="a181ee3b2b143e50e216fc2728194ff85" name="a181ee3b2b143e50e216fc2728194ff85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a181ee3b2b143e50e216fc2728194ff85">&#9670;&#160;</a></span>startAdvertising() <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::startAdvertising </td>
<td>(</td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>instId</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>maxEvents</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">instId</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">maxEvents</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>
</div>
</div>
<a id="a8b6b4bedfe37725ed9c20e91a3470005" name="a8b6b4bedfe37725ed9c20e91a3470005"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b6b4bedfe37725ed9c20e91a3470005">&#9670;&#160;</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">bool NimBLEDevice::startSecurity </td>
<td>(</td>
<td class="paramtype">uint16_t&#160;</td>
<td class="paramname"><em>connHandle</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>rcPtr</em> = <code>nullptr</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>Start the connection securing and authorization for this connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">connHandle</td><td>The connection handle of the peer device. </td></tr>
<tr><td class="paramname">rcPtr</td><td>Optional pointer to pass the return code to the caller. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if successfully started, success = 0 or BLE_HS_EALREADY. </dd></dl>
</div>
</div>
<a id="a3c251b1d5c651ab9ef9b4819f79c1629" name="a3c251b1d5c651ab9ef9b4819f79c1629"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c251b1d5c651ab9ef9b4819f79c1629">&#9670;&#160;</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="a1de5ed55c2b048c0281462d929a70aa2" name="a1de5ed55c2b048c0281462d929a70aa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1de5ed55c2b048c0281462d929a70aa2">&#9670;&#160;</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>instId</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">instId</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" name="abf8c494b54d9f0c9466c80f25dbdd961"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf8c494b54d9f0c9466c80f25dbdd961">&#9670;&#160;</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" name="aabc68166b6dd4a744a98f94e569f37db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabc68166b6dd4a744a98f94e569f37db">&#9670;&#160;</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" name="a81abbad5e371fe1cdd91c002b42cc654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81abbad5e371fe1cdd91c002b42cc654">&#9670;&#160;</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>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>