2021-08-05 03:02:30 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2024-12-15 01:45:58 +01:00
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
2021-08-05 03:02:30 +02:00
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
2024-12-15 01:45:58 +01:00
< meta http-equiv = "X-UA-Compatible" content = "IE=11" / >
< meta name = "generator" content = "Doxygen 1.9.8" / >
2021-08-05 03:02:30 +02:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
2022-01-15 23:23:57 +01:00
< title > esp-nimble-cpp: NimBLEServer Class Reference< / title >
2021-08-05 03:02:30 +02:00
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "navtree.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "resize.js" > < / script >
< script type = "text/javascript" src = "navtreedata.js" > < / script >
< script type = "text/javascript" src = "navtree.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/searchdata.js" > < / script >
< script type = "text/javascript" src = "search/search.js" > < / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
2024-12-15 01:45:58 +01:00
< tr id = "projectrow" >
< td id = "projectalign" >
2024-12-17 02:50:27 +01:00
< div id = "projectname" > esp-nimble-cpp< span id = "projectnumber" >   2.0.1< / span >
2021-08-05 03:02:30 +02:00
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
2024-12-15 01:45:58 +01:00
<!-- Generated by Doxygen 1.9.8 -->
2021-08-05 03:02:30 +02:00
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
2021-08-05 03:02:30 +02:00
/* @license-end */
< / script >
< script type = "text/javascript" src = "menudata.js" > < / script >
< script type = "text/javascript" src = "menu.js" > < / script >
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2021-08-05 03:02:30 +02:00
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
2024-12-15 01:45:58 +01:00
/* @license-end */
< / script >
2021-08-05 03:02:30 +02:00
< div id = "main-nav" > < / div >
< / div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" > < / div >
< / div >
< / div >
< div id = "splitbar" style = "-moz-user-select:none;"
class="ui-resizable-handle">
< / div >
< / div >
< script type = "text/javascript" >
2024-12-15 01:45:58 +01:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
2021-08-05 03:02:30 +02:00
$(document).ready(function(){initNavTree('class_nim_b_l_e_server.html',''); initResizable(); });
/* @license-end */
< / script >
< div id = "doc-content" >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
2024-12-15 01:45:58 +01:00
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" > < / div >
< div class = "SRStatus" id = "Loading" > Loading...< / div >
< div class = "SRStatus" id = "Searching" > Searching...< / div >
< div class = "SRStatus" id = "NoMatches" > No Matches< / div >
< / div >
< / div >
< / div >
2021-08-05 03:02:30 +02:00
< / div >
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "class_nim_b_l_e_server-members.html" > List of all members< / a > < / div >
2024-12-15 01:45:58 +01:00
< div class = "headertitle" > < div class = "title" > NimBLEServer Class Reference< / div > < / div >
2021-08-05 03:02:30 +02:00
< / div > <!-- header -->
< div class = "contents" >
< p > The model of a BLE server.
< a href = "class_nim_b_l_e_server.html#details" > More...< / a > < / p >
2024-12-15 01:45:58 +01:00
< p > < code > #include < < a class = "el" href = "_nim_b_l_e_server_8h_source.html" > NimBLEServer.h< / a > > < / code > < / p >
2021-08-05 03:02:30 +02:00
< table class = "memberdecls" >
2024-12-15 01:45:58 +01:00
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "pub-methods" name = "pub-methods" > < / a >
2021-08-05 03:02:30 +02:00
Public Member Functions< / h2 > < / td > < / tr >
2024-12-15 01:45:58 +01:00
< tr class = "memitem:ae94ad52f3c97f62553af9765acdb7bcb" id = "r_ae94ad52f3c97f62553af9765acdb7bcb" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#ae94ad52f3c97f62553af9765acdb7bcb" > start< / a > ()< / td > < / tr >
< tr class = "memdesc:ae94ad52f3c97f62553af9765acdb7bcb" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Start the GATT server. < br / > < / td > < / tr >
< tr class = "separator:ae94ad52f3c97f62553af9765acdb7bcb" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a4277e57885576664b9adf11f586e75ba" id = "r_a4277e57885576664b9adf11f586e75ba" > < td class = "memItemLeft" align = "right" valign = "top" > uint8_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a4277e57885576664b9adf11f586e75ba" > getConnectedCount< / a > () const< / td > < / tr >
< tr class = "memdesc:a4277e57885576664b9adf11f586e75ba" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Return the number of connected clients. < br / > < / td > < / tr >
< tr class = "separator:a4277e57885576664b9adf11f586e75ba" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ac79e828bcc3c45ae817bf51be914bfc0" id = "r_ac79e828bcc3c45ae817bf51be914bfc0" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#ac79e828bcc3c45ae817bf51be914bfc0" > disconnect< / a > (uint16_t connHandle, uint8_t reason=BLE_ERR_REM_USER_CONN_TERM) const< / td > < / tr >
< tr class = "memdesc:ac79e828bcc3c45ae817bf51be914bfc0" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Disconnect the specified client with optional reason. < br / > < / td > < / tr >
< tr class = "separator:ac79e828bcc3c45ae817bf51be914bfc0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a49e1252a2f14732070eb85e78b641646" id = "r_a49e1252a2f14732070eb85e78b641646" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a49e1252a2f14732070eb85e78b641646" > disconnect< / a > (const < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > & connInfo, uint8_t reason=BLE_ERR_REM_USER_CONN_TERM) const< / td > < / tr >
< tr class = "memdesc:a49e1252a2f14732070eb85e78b641646" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Disconnect the specified client with optional reason. < br / > < / td > < / tr >
< tr class = "separator:a49e1252a2f14732070eb85e78b641646" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a485c90ce36275f9e4ec26a7f3d348cd9" id = "r_a485c90ce36275f9e4ec26a7f3d348cd9" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a485c90ce36275f9e4ec26a7f3d348cd9" > setCallbacks< / a > (< a class = "el" href = "class_nim_b_l_e_server_callbacks.html" > NimBLEServerCallbacks< / a > *pCallbacks, bool deleteCallbacks=true)< / td > < / tr >
< tr class = "memdesc:a485c90ce36275f9e4ec26a7f3d348cd9" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Set the server callbacks. < br / > < / td > < / tr >
< tr class = "separator:a485c90ce36275f9e4ec26a7f3d348cd9" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a56add4759f7df045f51b70a026897975" id = "r_a56add4759f7df045f51b70a026897975" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a56add4759f7df045f51b70a026897975" > updateConnParams< / a > (uint16_t connHandle, uint16_t minInterval, uint16_t maxInterval, uint16_t latency, uint16_t timeout) const< / td > < / tr >
< tr class = "memdesc:a56add4759f7df045f51b70a026897975" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Request an Update the connection parameters: < br / > < / td > < / tr >
< tr class = "separator:a56add4759f7df045f51b70a026897975" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aaeb58b4de85754d1aac6964e9248aa35" id = "r_aaeb58b4de85754d1aac6964e9248aa35" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#aaeb58b4de85754d1aac6964e9248aa35" > createService< / a > (const char *uuid)< / td > < / tr >
< tr class = "memdesc:aaeb58b4de85754d1aac6964e9248aa35" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Create a BLE Service. < br / > < / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr class = "separator:aaeb58b4de85754d1aac6964e9248aa35" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-12-15 01:45:58 +01:00
< tr class = "memitem:a5f0d43106db713e2ac716eabd70a10b2" id = "r_a5f0d43106db713e2ac716eabd70a10b2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a5f0d43106db713e2ac716eabd70a10b2" > createService< / a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID< / a > & uuid)< / td > < / tr >
< tr class = "memdesc:a5f0d43106db713e2ac716eabd70a10b2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Create a BLE Service. < br / > < / td > < / tr >
2022-01-15 23:23:57 +01:00
< tr class = "separator:a5f0d43106db713e2ac716eabd70a10b2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-12-15 01:45:58 +01:00
< tr class = "memitem:a26af61c030e9ad1108b24df4d3b6b633" id = "r_a26af61c030e9ad1108b24df4d3b6b633" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a26af61c030e9ad1108b24df4d3b6b633" > getServiceByUUID< / a > (const char *uuid, uint16_t instanceId=0) const< / td > < / tr >
< tr class = "memdesc:a26af61c030e9ad1108b24df4d3b6b633" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get a BLE Service by its UUID. < br / > < / td > < / tr >
< tr class = "separator:a26af61c030e9ad1108b24df4d3b6b633" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6bd0d52090b31cf39e2e9666091b8a61" id = "r_a6bd0d52090b31cf39e2e9666091b8a61" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a6bd0d52090b31cf39e2e9666091b8a61" > getServiceByUUID< / a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID< / a > & uuid, uint16_t instanceId=0) const< / td > < / tr >
< tr class = "memdesc:a6bd0d52090b31cf39e2e9666091b8a61" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get a BLE Service by its UUID. < br / > < / td > < / tr >
< tr class = "separator:a6bd0d52090b31cf39e2e9666091b8a61" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0b009a568399014462a5ba7700b0129e" id = "r_a0b009a568399014462a5ba7700b0129e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a0b009a568399014462a5ba7700b0129e" > getServiceByHandle< / a > (uint16_t handle) const< / td > < / tr >
< tr class = "memdesc:a0b009a568399014462a5ba7700b0129e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get a BLE Service by its handle. < br / > < / td > < / tr >
< tr class = "separator:a0b009a568399014462a5ba7700b0129e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a00c92f62f41ec1c499dfaf042b487d75" id = "r_a00c92f62f41ec1c499dfaf042b487d75" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a00c92f62f41ec1c499dfaf042b487d75" > removeService< / a > (< a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *service, bool deleteSvc=false)< / td > < / tr >
< tr class = "memdesc:a00c92f62f41ec1c499dfaf042b487d75" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Remove a service from the server. < br / > < / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr class = "separator:a00c92f62f41ec1c499dfaf042b487d75" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-12-15 01:45:58 +01:00
< tr class = "memitem:a6eda4c9e0ac1dd031c678d4bf7da1d56" id = "r_a6eda4c9e0ac1dd031c678d4bf7da1d56" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a6eda4c9e0ac1dd031c678d4bf7da1d56" > addService< / a > (< a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *service)< / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr class = "memdesc:a6eda4c9e0ac1dd031c678d4bf7da1d56" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Adds a service which was either already created but removed from availability,< br / >
2024-12-15 01:45:58 +01:00
or created and later added to services list. < br / > < / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr class = "separator:a6eda4c9e0ac1dd031c678d4bf7da1d56" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2024-12-15 01:45:58 +01:00
< tr class = "memitem:a3bedf02970de34eaf7b90a2f37765fe8" id = "r_a3bedf02970de34eaf7b90a2f37765fe8" > < td class = "memItemLeft" align = "right" valign = "top" > uint16_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a3bedf02970de34eaf7b90a2f37765fe8" > getPeerMTU< / a > (uint16_t connHandle) const< / td > < / tr >
< tr class = "memdesc:a3bedf02970de34eaf7b90a2f37765fe8" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get the MTU value of a client connection. < br / > < / td > < / tr >
< tr class = "separator:a3bedf02970de34eaf7b90a2f37765fe8" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1cedae8a9346f605b8319cbc8209f0df" id = "r_a1cedae8a9346f605b8319cbc8209f0df" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< uint16_t >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a1cedae8a9346f605b8319cbc8209f0df" > getPeerDevices< / a > () const< / td > < / tr >
< tr class = "memdesc:a1cedae8a9346f605b8319cbc8209f0df" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get a vector of the connected client handles. < br / > < / td > < / tr >
< tr class = "separator:a1cedae8a9346f605b8319cbc8209f0df" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1513647f2c8a565404410a5dbd71a9ce" id = "r_a1513647f2c8a565404410a5dbd71a9ce" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a1513647f2c8a565404410a5dbd71a9ce" > getPeerInfo< / a > (uint8_t index) const< / td > < / tr >
< tr class = "memdesc:a1513647f2c8a565404410a5dbd71a9ce" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get the connection information of a connected peer by vector index. < br / > < / td > < / tr >
< tr class = "separator:a1513647f2c8a565404410a5dbd71a9ce" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a55eb6176fd8d0a1e9ba68158dde4f325" id = "r_a55eb6176fd8d0a1e9ba68158dde4f325" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a55eb6176fd8d0a1e9ba68158dde4f325" > getPeerInfo< / a > (const < a class = "el" href = "class_nim_b_l_e_address.html" > NimBLEAddress< / a > & address) const< / td > < / tr >
< tr class = "memdesc:a55eb6176fd8d0a1e9ba68158dde4f325" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get the connection information of a connected peer by address. < br / > < / td > < / tr >
< tr class = "separator:a55eb6176fd8d0a1e9ba68158dde4f325" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a08916d16ea00b4718bd6241bd407829f" id = "r_a08916d16ea00b4718bd6241bd407829f" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a08916d16ea00b4718bd6241bd407829f" > getPeerInfoByHandle< / a > (uint16_t connHandle) const< / td > < / tr >
< tr class = "memdesc:a08916d16ea00b4718bd6241bd407829f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get the connection information of a connected peer by connection handle. < br / > < / td > < / tr >
< tr class = "separator:a08916d16ea00b4718bd6241bd407829f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aecf5b57888c55249a9c207d318a0495b" id = "r_aecf5b57888c55249a9c207d318a0495b" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#aecf5b57888c55249a9c207d318a0495b" > advertiseOnDisconnect< / a > (bool enable)< / td > < / tr >
< tr class = "memdesc:aecf5b57888c55249a9c207d318a0495b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Set the server to automatically start advertising when a client disconnects. < br / > < / td > < / tr >
< tr class = "separator:aecf5b57888c55249a9c207d318a0495b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:afbffb933eed8142bd24222e3cacc138a" id = "r_afbffb933eed8142bd24222e3cacc138a" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#afbffb933eed8142bd24222e3cacc138a" > setDataLen< / a > (uint16_t connHandle, uint16_t tx_octets) const< / td > < / tr >
< tr class = "memdesc:afbffb933eed8142bd24222e3cacc138a" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Request an update of the data packet length. < br / > < / td > < / tr >
< tr class = "separator:afbffb933eed8142bd24222e3cacc138a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a31f73892bcf7eb66ee540bf1da9c419c" id = "r_a31f73892bcf7eb66ee540bf1da9c419c" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_client.html" > NimBLEClient< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a31f73892bcf7eb66ee540bf1da9c419c" > getClient< / a > (uint16_t connHandle)< / td > < / tr >
< tr class = "memdesc:a31f73892bcf7eb66ee540bf1da9c419c" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Create a client instance from the connection handle. < br / > < / td > < / tr >
< tr class = "separator:a31f73892bcf7eb66ee540bf1da9c419c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5be3c18cb6728c365ebc23af6b2a95f4" id = "r_a5be3c18cb6728c365ebc23af6b2a95f4" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_client.html" > NimBLEClient< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a5be3c18cb6728c365ebc23af6b2a95f4" > getClient< / a > (const < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > & connInfo)< / td > < / tr >
< tr class = "memdesc:a5be3c18cb6728c365ebc23af6b2a95f4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Create a client instance from the < a class = "el" href = "class_nim_b_l_e_conn_info.html" title = "Connection information." > NimBLEConnInfo< / a > reference. < br / > < / td > < / tr >
< tr class = "separator:a5be3c18cb6728c365ebc23af6b2a95f4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa7dd69e19e6cb8c22579c68e9731cdea" id = "r_aa7dd69e19e6cb8c22579c68e9731cdea" > < td class = "memItemLeft" align = "right" valign = "top" > < a id = "aa7dd69e19e6cb8c22579c68e9731cdea" name = "aa7dd69e19e6cb8c22579c68e9731cdea" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > deleteClient< / b > ()< / td > < / tr >
< tr class = "memdesc:aa7dd69e19e6cb8c22579c68e9731cdea" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Delete the < a class = "el" href = "class_nim_b_l_e_client.html" title = "A model of a BLE client." > NimBLEClient< / a > instance that was created with < code > < a class = "el" href = "class_nim_b_l_e_server.html#a31f73892bcf7eb66ee540bf1da9c419c" title = "Create a client instance from the connection handle." > getClient()< / a > < / code > < br / > < / td > < / tr >
< tr class = "separator:aa7dd69e19e6cb8c22579c68e9731cdea" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a70aafa98cc487c43e11ab30990d5ecb5" id = "r_a70aafa98cc487c43e11ab30990d5ecb5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "class_nim_b_l_e_ext_advertising.html" > NimBLEExtAdvertising< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a70aafa98cc487c43e11ab30990d5ecb5" > getAdvertising< / a > () const< / td > < / tr >
< tr class = "memdesc:a70aafa98cc487c43e11ab30990d5ecb5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Retrieve the advertising object that can be used to advertise the existence of the server. < br / > < / td > < / tr >
< tr class = "separator:a70aafa98cc487c43e11ab30990d5ecb5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab8cab448de62d05448ccb27d1bbb5c33" id = "r_ab8cab448de62d05448ccb27d1bbb5c33" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#ab8cab448de62d05448ccb27d1bbb5c33" > startAdvertising< / a > (uint8_t instanceId, int duration=0, int maxEvents=0) const< / td > < / tr >
< tr class = "memdesc:ab8cab448de62d05448ccb27d1bbb5c33" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Start advertising. < br / > < / td > < / tr >
< tr class = "separator:ab8cab448de62d05448ccb27d1bbb5c33" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a3e3ca166e06c0b3dfc7c69a2c8bee681" id = "r_a3e3ca166e06c0b3dfc7c69a2c8bee681" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a3e3ca166e06c0b3dfc7c69a2c8bee681" > stopAdvertising< / a > (uint8_t instanceId) const< / td > < / tr >
< tr class = "memdesc:a3e3ca166e06c0b3dfc7c69a2c8bee681" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Convenience function to stop advertising a data set. < br / > < / td > < / tr >
< tr class = "separator:a3e3ca166e06c0b3dfc7c69a2c8bee681" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abfd159ff5f10848bd611733835ddf215" id = "r_abfd159ff5f10848bd611733835ddf215" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#abfd159ff5f10848bd611733835ddf215" > updatePhy< / a > (uint16_t connHandle, uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions)< / td > < / tr >
< tr class = "memdesc:abfd159ff5f10848bd611733835ddf215" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Request an update to the PHY used for a peer connection. < br / > < / td > < / tr >
< tr class = "separator:abfd159ff5f10848bd611733835ddf215" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a709eb11532ec43a35f8653845b3158fc" id = "r_a709eb11532ec43a35f8653845b3158fc" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a709eb11532ec43a35f8653845b3158fc" > getPhy< / a > (uint16_t connHandle, uint8_t *txPhy, uint8_t *rxPhy)< / td > < / tr >
< tr class = "memdesc:a709eb11532ec43a35f8653845b3158fc" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Get the PHY used for a peer connection. < br / > < / td > < / tr >
< tr class = "separator:a709eb11532ec43a35f8653845b3158fc" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0697fab04372df6412d3e948f3d55654" id = "r_a0697fab04372df6412d3e948f3d55654" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a0697fab04372df6412d3e948f3d55654" > startAdvertising< / a > (uint32_t duration=0) const< / td > < / tr >
< tr class = "memdesc:a0697fab04372df6412d3e948f3d55654" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Start advertising. < br / > < / td > < / tr >
< tr class = "separator:a0697fab04372df6412d3e948f3d55654" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1da4f645f62b523eb6383ff7d1ed76c6" id = "r_a1da4f645f62b523eb6383ff7d1ed76c6" > < td class = "memItemLeft" align = "right" valign = "top" > bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "class_nim_b_l_e_server.html#a1da4f645f62b523eb6383ff7d1ed76c6" > stopAdvertising< / a > () const< / td > < / tr >
< tr class = "memdesc:a1da4f645f62b523eb6383ff7d1ed76c6" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Stop advertising. < br / > < / td > < / tr >
< tr class = "separator:a1da4f645f62b523eb6383ff7d1ed76c6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2021-08-05 03:02:30 +02:00
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > The model of a BLE server. < / p >
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
2024-12-15 01:45:58 +01:00
< a id = "a6eda4c9e0ac1dd031c678d4bf7da1d56" name = "a6eda4c9e0ac1dd031c678d4bf7da1d56" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a6eda4c9e0ac1dd031c678d4bf7da1d56" > ◆   < / a > < / span > addService()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::addService < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td >
< td class = "paramname" > < em > service< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Adds a service which was either already created but removed from availability,< br / >
or created and later added to services list. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > service< / td > < td > The service object to add. < / td > < / tr >
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section note" > < dt > Note< / dt > < dd > If it is desired to advertise the service it must be added by calling < a class = "el" href = "class_nim_b_l_e_advertising.html#a67c9589dff7e0ee3ec24f2c930d56c06" title = "Add a service uuid to exposed list of services." > NimBLEAdvertising::addServiceUUID< / a > . < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "aecf5b57888c55249a9c207d318a0495b" name = "aecf5b57888c55249a9c207d318a0495b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aecf5b57888c55249a9c207d318a0495b" > ◆   < / a > < / span > advertiseOnDisconnect()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::advertiseOnDisconnect < / td >
< td > (< / td >
< td class = "paramtype" > bool  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > enable< / em > < / td > < td > )< / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Set the server to automatically start advertising when a client disconnects. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > enable< / td > < td > true == advertise, false == don't advertise. < / td > < / tr >
2021-08-05 03:02:30 +02:00
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "aaeb58b4de85754d1aac6964e9248aa35" name = "aaeb58b4de85754d1aac6964e9248aa35" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aaeb58b4de85754d1aac6964e9248aa35" > ◆   < / a > < / span > createService() < span class = "overload" > [1/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > * NimBLEServer::createService < / td >
< td > (< / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > uuid< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Create a BLE Service. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > uuid< / td > < td > The UUID of the new service. < / td > < / tr >
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the new service object. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a5f0d43106db713e2ac716eabd70a10b2" name = "a5f0d43106db713e2ac716eabd70a10b2" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a5f0d43106db713e2ac716eabd70a10b2" > ◆   < / a > < / span > createService() < span class = "overload" > [2/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > * NimBLEServer::createService < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID< / a > &   < / td >
2022-01-15 23:23:57 +01:00
< td class = "paramname" > < em > uuid< / em > < / td > < td > )< / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Create a BLE Service. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > uuid< / td > < td > The UUID of the new service. < / td > < / tr >
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the new service object. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a49e1252a2f14732070eb85e78b641646" name = "a49e1252a2f14732070eb85e78b641646" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a49e1252a2f14732070eb85e78b641646" > ◆   < / a > < / span > disconnect() < span class = "overload" > [1/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 01:45:58 +01:00
< td class = "memname" > bool NimBLEServer::disconnect < / td >
2021-08-05 03:02:30 +02:00
< td > (< / td >
2024-12-15 01:45:58 +01:00
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > &   < / td >
< td class = "paramname" > < em > connInfo< / em > , < / td >
2021-08-05 03:02:30 +02:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > reason< / em > = < code > BLE_ERR_REM_USER_CONN_TERM< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Disconnect the specified client with optional reason. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connInfo< / td > < td > Connection of the client to disconnect. < / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > reason< / td > < td > code for disconnecting. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > NimBLE host return code. < / dd > < / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "ac79e828bcc3c45ae817bf51be914bfc0" name = "ac79e828bcc3c45ae817bf51be914bfc0" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ac79e828bcc3c45ae817bf51be914bfc0" > ◆   < / a > < / span > disconnect() < span class = "overload" > [2/2]< / span > < / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::disconnect < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > connHandle< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > reason< / em > = < code > BLE_ERR_REM_USER_CONN_TERM< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Disconnect the specified client with optional reason. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > Connection handle of the client to disconnect. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > reason< / td > < td > code for disconnecting. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if successful. < / dd > < / dl >
< / div >
< / div >
< a id = "a70aafa98cc487c43e11ab30990d5ecb5" name = "a70aafa98cc487c43e11ab30990d5ecb5" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a70aafa98cc487c43e11ab30990d5ecb5" > ◆   < / a > < / span > getAdvertising()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_advertising.html" > NimBLEAdvertising< / a > * NimBLEServer::getAdvertising < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
2024-12-15 01:45:58 +01:00
< td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Retrieve the advertising object that can be used to advertise the existence of the server. < / p >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A pinter to an advertising object.< / dd >
< dd >
A pointer to an advertising object. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a5be3c18cb6728c365ebc23af6b2a95f4" name = "a5be3c18cb6728c365ebc23af6b2a95f4" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a5be3c18cb6728c365ebc23af6b2a95f4" > ◆   < / a > < / span > getClient() < span class = "overload" > [1/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 01:45:58 +01:00
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_client.html" > NimBLEClient< / a > * NimBLEServer::getClient < / td >
2021-08-05 03:02:30 +02:00
< td > (< / td >
2024-12-15 01:45:58 +01:00
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > &   < / td >
< td class = "paramname" > < em > connInfo< / em > < / td > < td > )< / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-12-15 01:45:58 +01:00
< p > Create a client instance from the < a class = "el" href = "class_nim_b_l_e_conn_info.html" title = "Connection information." > NimBLEConnInfo< / a > reference. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connInfo< / td > < td > The connection info to create a client instance from. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the < a class = "el" href = "class_nim_b_l_e_client.html" title = "A model of a BLE client." > NimBLEClient< / a > instance or nullptr if there was an error. < / dd > < / dl >
< dl class = "section note" > < dt > Note< / dt > < dd > Only one instance is supported subsequent calls will overwrite the previous client connection information and data. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a31f73892bcf7eb66ee540bf1da9c419c" name = "a31f73892bcf7eb66ee540bf1da9c419c" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a31f73892bcf7eb66ee540bf1da9c419c" > ◆   < / a > < / span > getClient() < span class = "overload" > [2/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 01:45:58 +01:00
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_client.html" > NimBLEClient< / a > * NimBLEServer::getClient < / td >
2021-08-05 03:02:30 +02:00
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > connHandle< / em > < / td > < td > )< / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-12-15 01:45:58 +01:00
< p > Create a client instance from the connection handle. < / p >
2021-08-05 03:02:30 +02:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > The connection handle to create a client instance from. < / td > < / tr >
2021-08-05 03:02:30 +02:00
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the < a class = "el" href = "class_nim_b_l_e_client.html" title = "A model of a BLE client." > NimBLEClient< / a > instance or nullptr if there was an error. < / dd > < / dl >
< dl class = "section note" > < dt > Note< / dt > < dd > Only one instance is supported subsequent calls will overwrite the previous client connection information and data. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a4277e57885576664b9adf11f586e75ba" name = "a4277e57885576664b9adf11f586e75ba" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a4277e57885576664b9adf11f586e75ba" > ◆   < / a > < / span > getConnectedCount()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint8_t NimBLEServer::getConnectedCount < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Return the number of connected clients. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > The number of connected clients. < / dd > < / dl >
< / div >
< / div >
< a id = "a1cedae8a9346f605b8319cbc8209f0df" name = "a1cedae8a9346f605b8319cbc8209f0df" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1cedae8a9346f605b8319cbc8209f0df" > ◆   < / a > < / span > getPeerDevices()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< uint16_t > NimBLEServer::getPeerDevices < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get a vector of the connected client handles. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > A vector of the connected client handles. < / dd > < / dl >
< / div >
< / div >
< a id = "a55eb6176fd8d0a1e9ba68158dde4f325" name = "a55eb6176fd8d0a1e9ba68158dde4f325" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a55eb6176fd8d0a1e9ba68158dde4f325" > ◆   < / a > < / span > getPeerInfo() < span class = "overload" > [1/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > NimBLEServer::getPeerInfo < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_address.html" > NimBLEAddress< / a > &   < / td >
< td class = "paramname" > < em > address< / em > < / td > < td > )< / td >
2024-12-15 01:45:58 +01:00
< td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get the connection information of a connected peer by address. < / 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. < / td > < / tr >
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A < a class = "el" href = "class_nim_b_l_e_conn_info.html" title = "Connection information." > NimBLEConnInfo< / a > instance with the peer connection information, or an empty instance if not found. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a1513647f2c8a565404410a5dbd71a9ce" name = "a1513647f2c8a565404410a5dbd71a9ce" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1513647f2c8a565404410a5dbd71a9ce" > ◆   < / a > < / span > getPeerInfo() < span class = "overload" > [2/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > NimBLEServer::getPeerInfo < / td >
< td > (< / td >
2024-12-15 01:45:58 +01:00
< td class = "paramtype" > uint8_t  < / td >
2021-08-05 03:02:30 +02:00
< td class = "paramname" > < em > index< / em > < / td > < td > )< / td >
2024-12-15 01:45:58 +01:00
< td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get the connection information of a connected peer by 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 of the peer. < / td > < / tr >
< / table >
< / dd >
< / dl >
2024-12-15 01:45:58 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > A < a class = "el" href = "class_nim_b_l_e_conn_info.html" title = "Connection information." > NimBLEConnInfo< / a > instance with the peer connection information, or an empty instance if not found. < / dd > < / dl >
< / div >
< / div >
< a id = "a08916d16ea00b4718bd6241bd407829f" name = "a08916d16ea00b4718bd6241bd407829f" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a08916d16ea00b4718bd6241bd407829f" > ◆   < / a > < / span > getPeerInfoByHandle()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_conn_info.html" > NimBLEConnInfo< / a > NimBLEServer::getPeerInfoByHandle < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > connHandle< / em > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get the connection information of a connected peer 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 connection handle of the peer. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A < a class = "el" href = "class_nim_b_l_e_conn_info.html" title = "Connection information." > NimBLEConnInfo< / a > instance with the peer connection information, or an empty instance if not found. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a3bedf02970de34eaf7b90a2f37765fe8" name = "a3bedf02970de34eaf7b90a2f37765fe8" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a3bedf02970de34eaf7b90a2f37765fe8" > ◆   < / a > < / span > getPeerMTU()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > uint16_t NimBLEServer::getPeerMTU < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > connHandle< / em > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get the MTU value of a client connection. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > The connection handle of the client to get the MTU value for. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > The MTU or 0 if not found/connected. < / dd > < / dl >
< / div >
< / div >
< a id = "a709eb11532ec43a35f8653845b3158fc" name = "a709eb11532ec43a35f8653845b3158fc" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a709eb11532ec43a35f8653845b3158fc" > ◆   < / a > < / span > getPhy()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::getPhy < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > connHandle< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > txPhy< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > rxPhy< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-12-15 01:45:58 +01:00
< p > Get the PHY used for a peer connection. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > the connection handle to the get the PHY for. < / td > < / tr >
< tr > < td class = "paramdir" > [out]< / td > < td class = "paramname" > txPhy< / td > < td > The TX PHY. < / td > < / tr >
< tr > < td class = "paramdir" > [out]< / td > < td class = "paramname" > rxPhy< / td > < td > The RX PHY. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if successful. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a0b009a568399014462a5ba7700b0129e" name = "a0b009a568399014462a5ba7700b0129e" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0b009a568399014462a5ba7700b0129e" > ◆   < / a > < / span > getServiceByHandle()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > * NimBLEServer::getServiceByHandle < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > handle< / em > < / td > < td > )< / td >
2024-12-15 01:45:58 +01:00
< td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get a BLE Service by its handle. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > handle< / td > < td > The handle of the service. < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the service object or nullptr if not found. < / dd > < / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a26af61c030e9ad1108b24df4d3b6b633" name = "a26af61c030e9ad1108b24df4d3b6b633" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a26af61c030e9ad1108b24df4d3b6b633" > ◆   < / a > < / span > getServiceByUUID() < span class = "overload" > [1/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > * NimBLEServer::getServiceByUUID < / td >
< td > (< / td >
< td class = "paramtype" > const char *  < / td >
< td class = "paramname" > < em > uuid< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > instanceId< / em > = < code > 0< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get a BLE Service by its UUID. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > uuid< / td > < td > The UUID of the service. < / td > < / tr >
< tr > < td class = "paramdir" > < / td > < td class = "paramname" > instanceId< / td > < td > The index of the service to return (used when multiple services have the same UUID). < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the service object or nullptr if not found. < / dd > < / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a6bd0d52090b31cf39e2e9666091b8a61" name = "a6bd0d52090b31cf39e2e9666091b8a61" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a6bd0d52090b31cf39e2e9666091b8a61" > ◆   < / a > < / span > getServiceByUUID() < span class = "overload" > [2/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > * NimBLEServer::getServiceByUUID < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID< / a > &   < / td >
< td class = "paramname" > < em > uuid< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > instanceId< / em > = < code > 0< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Get a BLE Service by its UUID. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > uuid< / td > < td > The UUID of the service. < / td > < / tr >
< tr > < td class = "paramdir" > < / td > < td class = "paramname" > instanceId< / td > < td > The index of the service to return (used when multiple services have the same UUID). < / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > A pointer to the service object or nullptr if not found. < / dd > < / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a00c92f62f41ec1c499dfaf042b487d75" name = "a00c92f62f41ec1c499dfaf042b487d75" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a00c92f62f41ec1c499dfaf042b487d75" > ◆   < / a > < / span > removeService()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::removeService < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "class_nim_b_l_e_service.html" > NimBLEService< / a > *  < / td >
< td class = "paramname" > < em > service< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > deleteSvc< / em > = < code > false< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Remove a service from the server. < / p >
2022-07-31 19:38:16 +02:00
< p > Immediately removes access to the service by clients, sends a service changed indication, and removes the service (if applicable) from the advertisements. The service is not deleted unless the deleteSvc parameter is true, otherwise the service remains available and can be re-added in the future. If desired a removed but not deleted service can be deleted later by calling this method with deleteSvc set to true.< / p >
2021-08-05 03:02:30 +02:00
< dl class = "section note" > < dt > Note< / dt > < dd > The service will not be removed from the database until all open connections are closed as it requires resetting the GATT server. In the interim the service will have it's visibility disabled.< / dd >
< dd >
Advertising will need to be restarted by the user after calling this as we must stop advertising in order to remove the service.< / dd > < / dl >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > service< / td > < td > The service object to remove. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > deleteSvc< / td > < td > true if the service should be deleted. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a485c90ce36275f9e4ec26a7f3d348cd9" name = "a485c90ce36275f9e4ec26a7f3d348cd9" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a485c90ce36275f9e4ec26a7f3d348cd9" > ◆   < / a > < / span > setCallbacks()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::setCallbacks < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "class_nim_b_l_e_server_callbacks.html" > NimBLEServerCallbacks< / a > *  < / td >
< td class = "paramname" > < em > pCallbacks< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > deleteCallbacks< / em > = < code > true< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Set the server callbacks. < / p >
< p > As a BLE server operates, it will generate server level events such as a new client connecting or a previous client disconnecting. This function can be called to register a callback handler that will be invoked when these events are detected.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > pCallbacks< / td > < td > The callbacks to be invoked. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > deleteCallbacks< / td > < td > if true callback class will be deleted when server is destructed. < / td > < / tr >
< / table >
< / dd >
< / dl >
2022-01-15 23:23:57 +01:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "afbffb933eed8142bd24222e3cacc138a" name = "afbffb933eed8142bd24222e3cacc138a" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#afbffb933eed8142bd24222e3cacc138a" > ◆   < / a > < / span > setDataLen()< / h2 >
2022-01-15 23:23:57 +01:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::setDataLen < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > connHandle< / em > , < / td >
2022-01-15 23:23:57 +01:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > octets< / em >   < / td >
2022-01-15 23:23:57 +01:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2022-01-15 23:23:57 +01:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Request an update of the data packet length. < / p >
< ul >
< li > < p class = "startli" > Can only be used after a connection has been established.< / p >
< p class = "startli" > Sends a data length update request to the peer. The Data Length Extension (DLE) allows to increase the Data Channel Payload from 27 bytes to up to 251 bytes. The peer needs to support the Bluetooth 4.2 specifications, to be capable of DLE. < / p > < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > The connection handle of the peer to send the request to. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > octets< / td > < td > The preferred number of payload octets to use (Range 0x001B-0x00FB). < / td > < / tr >
2022-01-15 23:23:57 +01:00
< / table >
< / dd >
< / dl >
< / li >
< / ul >
2022-10-30 18:19:11 +01:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "ae94ad52f3c97f62553af9765acdb7bcb" name = "ae94ad52f3c97f62553af9765acdb7bcb" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ae94ad52f3c97f62553af9765acdb7bcb" > ◆   < / a > < / span > start()< / h2 >
2022-10-30 18:19:11 +01:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 01:45:58 +01:00
< td class = "memname" > void NimBLEServer::start < / td >
2022-10-30 18:19:11 +01:00
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2024-12-15 01:45:58 +01:00
< p > Start the GATT server. < / p >
< p > Required to be called after setup of all services and characteristics / descriptors for the NimBLE host to register them. < / p >
< / div >
< / div >
< a id = "a0697fab04372df6412d3e948f3d55654" name = "a0697fab04372df6412d3e948f3d55654" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a0697fab04372df6412d3e948f3d55654" > ◆   < / a > < / span > startAdvertising() < span class = "overload" > [1/2]< / span > < / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::startAdvertising < / td >
< td > (< / td >
< td class = "paramtype" > uint32_t  < / td >
< td class = "paramname" > < em > duration< / em > = < code > 0< / code > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2022-10-30 18:19:11 +01:00
< p > Start advertising. < / p >
2024-12-15 01:45:58 +01:00
< 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 >
2022-10-30 18:19:11 +01:00
< dl class = "section return" > < dt > Returns< / dt > < dd > True if advertising started successfully.< / dd > < / dl >
< p > Start the server advertising its existence. This is a convenience function and is equivalent to retrieving the advertising object and invoking start upon it. < / p >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "ab8cab448de62d05448ccb27d1bbb5c33" name = "ab8cab448de62d05448ccb27d1bbb5c33" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#ab8cab448de62d05448ccb27d1bbb5c33" > ◆   < / a > < / span > startAdvertising() < span class = "overload" > [2/2]< / span > < / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2022-07-31 19:38:16 +02:00
< td class = "memname" > bool NimBLEServer::startAdvertising < / td >
2021-08-05 03:02:30 +02:00
< td > (< / td >
2022-07-31 19:38:16 +02:00
< td class = "paramtype" > uint8_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > instId< / em > , < / td >
2022-07-31 19:38:16 +02:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
2021-08-05 03:02:30 +02:00
< td > < / td >
2022-07-31 19:38:16 +02:00
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > duration< / em > = < code > 0< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > maxEvents< / em > = < code > 0< / code >   < / td >
2022-07-31 19:38:16 +02:00
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Start advertising. < / p >
2022-07-31 19:38:16 +02:00
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > instId< / td > < td > The extended advertisement instance ID to start. < / td > < / tr >
2022-07-31 19:38:16 +02:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > duration< / td > < td > How long to advertise for in milliseconds, 0 = forever (default). < / td > < / tr >
2024-12-15 01:45:58 +01:00
< 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 >
2022-07-31 19:38:16 +02:00
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if advertising started successfully.< / dd > < / dl >
2021-08-05 03:02:30 +02:00
< p > Start the server advertising its existence. This is a convenience function and is equivalent to retrieving the advertising object and invoking start upon it. < / p >
2022-07-31 19:38:16 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a1da4f645f62b523eb6383ff7d1ed76c6" name = "a1da4f645f62b523eb6383ff7d1ed76c6" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a1da4f645f62b523eb6383ff7d1ed76c6" > ◆   < / a > < / span > stopAdvertising() < span class = "overload" > [1/2]< / span > < / h2 >
2022-07-31 19:38:16 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::stopAdvertising < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
2024-12-15 01:45:58 +01:00
< td > const< / td >
2022-07-31 19:38:16 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Stop advertising. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if advertising stopped successfully. < / dd > < / dl >
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a3e3ca166e06c0b3dfc7c69a2c8bee681" name = "a3e3ca166e06c0b3dfc7c69a2c8bee681" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a3e3ca166e06c0b3dfc7c69a2c8bee681" > ◆   < / a > < / span > stopAdvertising() < span class = "overload" > [2/2]< / span > < / h2 >
2022-07-31 19:38:16 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::stopAdvertising < / td >
< td > (< / td >
< td class = "paramtype" > uint8_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > instId< / em > < / td > < td > )< / td >
< td > const< / td >
2022-07-31 19:38:16 +02:00
< / 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" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > instId< / td > < td > The extended advertisement instance ID to stop advertising. < / td > < / tr >
2022-07-31 19:38:16 +02:00
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if advertising stopped successfully. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / div >
< / div >
2024-12-15 01:45:58 +01:00
< a id = "a56add4759f7df045f51b70a026897975" name = "a56add4759f7df045f51b70a026897975" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a56add4759f7df045f51b70a026897975" > ◆   < / a > < / span > updateConnParams()< / h2 >
2021-08-05 03:02:30 +02:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEServer::updateConnParams < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
2024-12-15 01:45:58 +01:00
< td class = "paramname" > < em > connHandle< / em > , < / td >
2021-08-05 03:02:30 +02:00
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > minInterval< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > maxInterval< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > latency< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > timeout< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
2024-12-15 01:45:58 +01:00
< td > < / td > < td > const< / td >
2021-08-05 03:02:30 +02:00
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Request an Update the connection parameters: < / p >
< ul >
< li > Can only be used after a connection has been established. < dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
2024-12-15 01:45:58 +01:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > The connection handle of the peer to send the request to. < / td > < / tr >
2021-08-05 03:02:30 +02:00
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > minInterval< / td > < td > The minimum connection interval in 1.25ms units. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > maxInterval< / td > < td > The maximum connection interval in 1.25ms units. < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > latency< / td > < td > The number of packets allowed to skip (extends max interval). < / td > < / tr >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > timeout< / td > < td > The timeout time in 10ms units before disconnecting. < / td > < / tr >
< / table >
< / dd >
< / dl >
< / li >
< / ul >
2024-12-15 01:45:58 +01:00
< / div >
< / div >
< a id = "abfd159ff5f10848bd611733835ddf215" name = "abfd159ff5f10848bd611733835ddf215" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#abfd159ff5f10848bd611733835ddf215" > ◆   < / a > < / span > updatePhy()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEServer::updatePhy < / td >
< td > (< / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > connHandle< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > txPhyMask< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t  < / td >
< td class = "paramname" > < em > rxPhyMask< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint16_t  < / td >
< td class = "paramname" > < em > phyOptions< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Request an update to the PHY used for a peer connection. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramdir" > [in]< / td > < td class = "paramname" > connHandle< / td > < td > the connection handle to the update the PHY for. < / td > < / tr >
< 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 >
< tr > < td class = "paramdir" > < / td > < td class = "paramname" > phyOptions< / td > < td > Additional PHY options. Valid values are:< ul >
< li > BLE_GAP_LE_PHY_CODED_ANY (default)< / li >
< li > BLE_GAP_LE_PHY_CODED_S2< / li >
< li > BLE_GAP_LE_PHY_CODED_S8 < / li >
< / ul >
< / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > True if successful. < / dd > < / dl >
2021-08-05 03:02:30 +02:00
< / 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_server.html" > NimBLEServer< / a > < / li >
2024-12-15 01:45:58 +01:00
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.8 < / li >
2021-08-05 03:02:30 +02:00
< / ul >
< / div >
< / body >
< / html >