2021-08-05 01:02:30 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2024-12-15 00:45:58 +00:00
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
2021-08-05 01:02:30 +00:00
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" />
2024-12-15 00:45:58 +00:00
< meta http-equiv = "X-UA-Compatible" content = "IE=11" />
< meta name = "generator" content = "Doxygen 1.9.8" />
2021-08-05 01:02:30 +00:00
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
2022-01-15 15:23:57 -07:00
< title > esp-nimble-cpp: NimBLEAdvertising Class Reference</ title >
2021-08-05 01:02:30 +00: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 00:45:58 +00:00
< tr id = "projectrow" >
< td id = "projectalign" >
2025-01-13 02:22:00 +00:00
< div id = "projectname" > esp-nimble-cpp< span id = "projectnumber" >   2.1.0</ span >
2021-08-05 01:02:30 +00:00
</ div >
</ td >
</ tr >
</ tbody >
</ table >
</ div >
<!-- end header part -->
2024-12-15 00:45:58 +00:00
<!-- Generated by Doxygen 1.9.8 -->
2021-08-05 01:02:30 +00:00
< script type = "text/javascript" >
2024-12-15 00:45:58 +00:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox ( "searchBox" , "search/" , '.html' );
2021-08-05 01:02:30 +00: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 00:45:58 +00:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
2021-08-05 01:02:30 +00:00
$ ( function () {
initMenu ( '' , true , false , 'search.php' , 'Search' );
$ ( document ). ready ( function () { init_search (); });
});
2024-12-15 00:45:58 +00:00
/* @license-end */
</ script >
2021-08-05 01:02:30 +00: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 00:45:58 +00:00
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
2021-08-05 01:02:30 +00:00
$ ( document ). ready ( function (){ initNavTree ( 'class_nim_b_l_e_advertising.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 00:45:58 +00: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 01:02:30 +00:00
</ div >
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions</ a > |
< a href = "class_nim_b_l_e_advertising-members.html" > List of all members</ a > </ div >
2024-12-15 00:45:58 +00:00
< div class = "headertitle" >< div class = "title" > NimBLEAdvertising Class Reference</ div ></ div >
2021-08-05 01:02:30 +00:00
</ div > <!--header-->
< div class = "contents" >
< p > Perform and manage BLE advertising.
< a href = "class_nim_b_l_e_advertising.html#details" > More...</ a ></ p >
2024-12-15 00:45:58 +00:00
< p >< code > #include < < a class = "el" href = "_nim_b_l_e_advertising_8h_source.html" > NimBLEAdvertising.h</ a > > </ code ></ p >
2021-08-05 01:02:30 +00:00
< table class = "memberdecls" >
2024-12-15 00:45:58 +00:00
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pub-methods" name = "pub-methods" ></ a >
2021-08-05 01:02:30 +00:00
Public Member Functions</ h2 ></ td ></ tr >
2024-12-15 00:45:58 +00:00
< tr class = "memitem:abe6258a917243a4567c3d6eece2ddcdd" id = "r_abe6258a917243a4567c3d6eece2ddcdd" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "abe6258a917243a4567c3d6eece2ddcdd" name = "abe6258a917243a4567c3d6eece2ddcdd" ></ a >
  </ td >< td class = "memItemRight" valign = "bottom" >< b > NimBLEAdvertising</ b > ()</ td ></ tr >
2021-08-05 01:02:30 +00:00
< tr class = "memdesc:abe6258a917243a4567c3d6eece2ddcdd" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Construct a default advertising object. < br /></ td ></ tr >
< tr class = "separator:abe6258a917243a4567c3d6eece2ddcdd" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
2024-12-15 00:45:58 +00:00
< tr class = "memitem:a8a5c880ee36fd44e0c72c14c47c8e15e" id = "r_a8a5c880ee36fd44e0c72c14c47c8e15e" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a8a5c880ee36fd44e0c72c14c47c8e15e" > start</ a > (uint32_t duration=0, const < a class = "el" href = "class_nim_b_l_e_address.html" > NimBLEAddress</ a > *dirAddr=nullptr)</ td ></ tr >
< tr class = "memdesc:a8a5c880ee36fd44e0c72c14c47c8e15e" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Start advertising. < br /></ td ></ tr >
< tr class = "separator:a8a5c880ee36fd44e0c72c14c47c8e15e" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a3e81d7d3aa2b72b8db58427d4a42727b" id = "r_a3e81d7d3aa2b72b8db58427d4a42727b" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a3e81d7d3aa2b72b8db58427d4a42727b" > setAdvertisingCompleteCallback</ a > (advCompleteCB_t callback)</ td ></ tr >
< tr class = "memdesc:a3e81d7d3aa2b72b8db58427d4a42727b" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the callback to be invoked when advertising stops. < br /></ td ></ tr >
< tr class = "separator:a3e81d7d3aa2b72b8db58427d4a42727b" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a3ab772936ace18c9a7e509740aa59800" id = "r_a3ab772936ace18c9a7e509740aa59800" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a3ab772936ace18c9a7e509740aa59800" > stop</ a > ()</ td ></ tr >
< tr class = "memdesc:a3ab772936ace18c9a7e509740aa59800" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Stop advertising. < br /></ td ></ tr >
2022-07-31 11:38:16 -06:00
< tr class = "separator:a3ab772936ace18c9a7e509740aa59800" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
2024-12-15 00:45:58 +00:00
< tr class = "memitem:ae49d2bd91cabca46ec7c4bbd7fc49407" id = "r_ae49d2bd91cabca46ec7c4bbd7fc49407" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ae49d2bd91cabca46ec7c4bbd7fc49407" > setConnectableMode</ a > (uint8_t mode)</ td ></ tr >
< tr class = "memdesc:ae49d2bd91cabca46ec7c4bbd7fc49407" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the type of connectable mode to advertise. < br /></ td ></ tr >
< tr class = "separator:ae49d2bd91cabca46ec7c4bbd7fc49407" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a710eacfc97ecea1bf9a9a3569c58d410" id = "r_a710eacfc97ecea1bf9a9a3569c58d410" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a710eacfc97ecea1bf9a9a3569c58d410" > setDiscoverableMode</ a > (uint8_t mode)</ td ></ tr >
< tr class = "memdesc:a710eacfc97ecea1bf9a9a3569c58d410" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the discoverable mode to use. < br /></ td ></ tr >
< tr class = "separator:a710eacfc97ecea1bf9a9a3569c58d410" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a91cde5680de36840fc18f6fd76665af7" id = "r_a91cde5680de36840fc18f6fd76665af7" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a91cde5680de36840fc18f6fd76665af7" > reset</ a > ()</ td ></ tr >
< tr class = "memdesc:a91cde5680de36840fc18f6fd76665af7" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Stops the current advertising and resets the advertising data to the default values. < br /></ td ></ tr >
< tr class = "separator:a91cde5680de36840fc18f6fd76665af7" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ac257ab68520a244cb6494d793f9b6c2a" id = "r_ac257ab68520a244cb6494d793f9b6c2a" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ac257ab68520a244cb6494d793f9b6c2a" > isAdvertising</ a > ()</ td ></ tr >
< tr class = "memdesc:ac257ab68520a244cb6494d793f9b6c2a" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Check if currently advertising. < br /></ td ></ tr >
2021-08-05 01:02:30 +00:00
< tr class = "separator:ac257ab68520a244cb6494d793f9b6c2a" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
2024-12-15 00:45:58 +00:00
< tr class = "memitem:aa3da80c7d17a7824484ee254076e4790" id = "r_aa3da80c7d17a7824484ee254076e4790" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#aa3da80c7d17a7824484ee254076e4790" > setScanFilter</ a > (bool scanRequestWhitelistOnly, bool connectWhitelistOnly)</ td ></ tr >
< tr class = "memdesc:aa3da80c7d17a7824484ee254076e4790" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the filtering for the scan filter. < br /></ td ></ tr >
< tr class = "separator:aa3da80c7d17a7824484ee254076e4790" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a6badd669ddf4ff8507561d5041d093d6" id = "r_a6badd669ddf4ff8507561d5041d093d6" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a6badd669ddf4ff8507561d5041d093d6" > enableScanResponse</ a > (bool enable)</ td ></ tr >
< tr class = "memdesc:a6badd669ddf4ff8507561d5041d093d6" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Enable scan response data. < br /></ td ></ tr >
< tr class = "separator:a6badd669ddf4ff8507561d5041d093d6" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a28c082bb540325ada66b4e203ae6998a" id = "r_a28c082bb540325ada66b4e203ae6998a" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a28c082bb540325ada66b4e203ae6998a" > setAdvertisingInterval</ a > (uint16_t interval)</ td ></ tr >
< tr class = "memdesc:a28c082bb540325ada66b4e203ae6998a" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertising interval. < br /></ td ></ tr >
< tr class = "separator:a28c082bb540325ada66b4e203ae6998a" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a97bf63603b9aabdf0a5284269dfc5549" id = "r_a97bf63603b9aabdf0a5284269dfc5549" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a97bf63603b9aabdf0a5284269dfc5549" > setMaxInterval</ a > (uint16_t maxInterval)</ td ></ tr >
< tr class = "memdesc:a97bf63603b9aabdf0a5284269dfc5549" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the maximum advertising interval. < br /></ td ></ tr >
< tr class = "separator:a97bf63603b9aabdf0a5284269dfc5549" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a6b5be947a5e188d512e3338d36a039cb" id = "r_a6b5be947a5e188d512e3338d36a039cb" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a6b5be947a5e188d512e3338d36a039cb" > setMinInterval</ a > (uint16_t minInterval)</ td ></ tr >
< tr class = "memdesc:a6b5be947a5e188d512e3338d36a039cb" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the minimum advertising interval. < br /></ td ></ tr >
< tr class = "separator:a6b5be947a5e188d512e3338d36a039cb" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ab8afd94479ebac3996fa3712d3d92325" id = "r_ab8afd94479ebac3996fa3712d3d92325" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ab8afd94479ebac3996fa3712d3d92325" > setAdvertisementData</ a > (const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > & advertisementData)</ td ></ tr >
< tr class = "memdesc:ab8afd94479ebac3996fa3712d3d92325" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertisement data that is to be broadcast in a regular advertisement. < br /></ td ></ tr >
< tr class = "separator:ab8afd94479ebac3996fa3712d3d92325" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a97798e6d9d7721eb588c5e67d54e97ef" id = "r_a97798e6d9d7721eb588c5e67d54e97ef" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a97798e6d9d7721eb588c5e67d54e97ef" > setScanResponseData</ a > (const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > & advertisementData)</ td ></ tr >
< tr class = "memdesc:a97798e6d9d7721eb588c5e67d54e97ef" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the data that is to be provided in a scan response. < br /></ td ></ tr >
< tr class = "separator:a97798e6d9d7721eb588c5e67d54e97ef" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a1e23657839038e5219f9c009cf360a32" id = "r_a1e23657839038e5219f9c009cf360a32" >< td class = "memItemLeft" align = "right" valign = "top" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > &  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a1e23657839038e5219f9c009cf360a32" > getAdvertisementData</ a > ()</ td ></ tr >
< tr class = "memdesc:a1e23657839038e5219f9c009cf360a32" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Get the current advertisement data. < br /></ td ></ tr >
< tr class = "separator:a1e23657839038e5219f9c009cf360a32" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ae0e7d64d51882830750bcb87e2d9678c" id = "r_ae0e7d64d51882830750bcb87e2d9678c" >< td class = "memItemLeft" align = "right" valign = "top" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > &  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ae0e7d64d51882830750bcb87e2d9678c" > getScanData</ a > ()</ td ></ tr >
< tr class = "memdesc:ae0e7d64d51882830750bcb87e2d9678c" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Get the current scan response data. < br /></ td ></ tr >
< tr class = "separator:ae0e7d64d51882830750bcb87e2d9678c" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:af7cee42f24ad38872936a0bbc9e2ac1e" id = "r_af7cee42f24ad38872936a0bbc9e2ac1e" >< td class = "memItemLeft" align = "right" valign = "top" >< a id = "af7cee42f24ad38872936a0bbc9e2ac1e" name = "af7cee42f24ad38872936a0bbc9e2ac1e" ></ a >
void  </ td >< td class = "memItemRight" valign = "bottom" >< b > clearData</ b > ()</ td ></ tr >
< tr class = "memdesc:af7cee42f24ad38872936a0bbc9e2ac1e" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Clear the advertisement and scan response data and set the flags to BLE_HS_ADV_F_DISC_GEN. < br /></ td ></ tr >
< tr class = "separator:af7cee42f24ad38872936a0bbc9e2ac1e" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ad899be16fa054a01908692a504af9832" id = "r_ad899be16fa054a01908692a504af9832" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ad899be16fa054a01908692a504af9832" > refreshAdvertisingData</ a > ()</ td ></ tr >
< tr class = "memdesc:ad899be16fa054a01908692a504af9832" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Refresh advertsing data dynamically without stop/start cycle. For instance allows refreshing manufacturer data dynamically. < br /></ td ></ tr >
< tr class = "separator:ad899be16fa054a01908692a504af9832" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a67c9589dff7e0ee3ec24f2c930d56c06" id = "r_a67c9589dff7e0ee3ec24f2c930d56c06" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a67c9589dff7e0ee3ec24f2c930d56c06" > addServiceUUID</ a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID</ a > & serviceUUID)</ td ></ tr >
< tr class = "memdesc:a67c9589dff7e0ee3ec24f2c930d56c06" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Add a service uuid to exposed list of services. < br /></ td ></ tr >
< tr class = "separator:a67c9589dff7e0ee3ec24f2c930d56c06" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a1bacfa32690f7e0c6f1172ea03c68c0d" id = "r_a1bacfa32690f7e0c6f1172ea03c68c0d" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a1bacfa32690f7e0c6f1172ea03c68c0d" > addServiceUUID</ a > (const char *serviceUUID)</ td ></ tr >
< tr class = "memdesc:a1bacfa32690f7e0c6f1172ea03c68c0d" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Add a service uuid to exposed list of services. < br /></ td ></ tr >
< tr class = "separator:a1bacfa32690f7e0c6f1172ea03c68c0d" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:aba383012133dd694f56cf86966b2d80a" id = "r_aba383012133dd694f56cf86966b2d80a" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#aba383012133dd694f56cf86966b2d80a" > removeServiceUUID</ a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID</ a > & serviceUUID)</ td ></ tr >
< tr class = "memdesc:aba383012133dd694f56cf86966b2d80a" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Remove a service UUID from the advertisement. < br /></ td ></ tr >
< tr class = "separator:aba383012133dd694f56cf86966b2d80a" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a94452c2f9f7233611246827ce62f6a2b" id = "r_a94452c2f9f7233611246827ce62f6a2b" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a94452c2f9f7233611246827ce62f6a2b" > removeServiceUUID</ a > (const char *serviceUUID)</ td ></ tr >
< tr class = "memdesc:a94452c2f9f7233611246827ce62f6a2b" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Remove a service UUID from the advertisement. < br /></ td ></ tr >
< tr class = "separator:a94452c2f9f7233611246827ce62f6a2b" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ad159c2e2a65d9bc7dcc5babed146936d" id = "r_ad159c2e2a65d9bc7dcc5babed146936d" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ad159c2e2a65d9bc7dcc5babed146936d" > removeServices</ a > ()</ td ></ tr >
< tr class = "memdesc:ad159c2e2a65d9bc7dcc5babed146936d" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Remove all service UUIDs from the advertisement. < br /></ td ></ tr >
< tr class = "separator:ad159c2e2a65d9bc7dcc5babed146936d" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a1f4e1ae9552400fb2bb3cd73b2a483b0" id = "r_a1f4e1ae9552400fb2bb3cd73b2a483b0" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a1f4e1ae9552400fb2bb3cd73b2a483b0" > setAppearance</ a > (uint16_t appearance)</ td ></ tr >
< tr class = "memdesc:a1f4e1ae9552400fb2bb3cd73b2a483b0" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the device appearance in the advertising data. < br /></ td ></ tr >
< tr class = "separator:a1f4e1ae9552400fb2bb3cd73b2a483b0" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a9dbb66ca66aa040731fcfd737f881469" id = "r_a9dbb66ca66aa040731fcfd737f881469" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a9dbb66ca66aa040731fcfd737f881469" > setPreferredParams</ a > (uint16_t minInterval, uint16_t maxInterval)</ td ></ tr >
< tr class = "memdesc:a9dbb66ca66aa040731fcfd737f881469" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the preferred min and max connection intervals to advertise. < br /></ td ></ tr >
< tr class = "separator:a9dbb66ca66aa040731fcfd737f881469" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a0d3c5cb3a93416a4206abb1f8e443ebf" id = "r_a0d3c5cb3a93416a4206abb1f8e443ebf" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a0d3c5cb3a93416a4206abb1f8e443ebf" > addTxPower</ a > ()</ td ></ tr >
< tr class = "memdesc:a0d3c5cb3a93416a4206abb1f8e443ebf" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Add the transmission power level to the advertisement packet. < br /></ td ></ tr >
< tr class = "separator:a0d3c5cb3a93416a4206abb1f8e443ebf" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a7fb4b74eb7acb1f46e57ff772baccd88" id = "r_a7fb4b74eb7acb1f46e57ff772baccd88" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a7fb4b74eb7acb1f46e57ff772baccd88" > setName</ a > (const std::string & name)</ td ></ tr >
< tr class = "memdesc:a7fb4b74eb7acb1f46e57ff772baccd88" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertised name of the device. < br /></ td ></ tr >
< tr class = "separator:a7fb4b74eb7acb1f46e57ff772baccd88" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ac433e3458ac5259ae21c4bdbd1198781" id = "r_ac433e3458ac5259ae21c4bdbd1198781" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ac433e3458ac5259ae21c4bdbd1198781" > setManufacturerData</ a > (const uint8_t *data, size_t length)</ td ></ tr >
< tr class = "memdesc:ac433e3458ac5259ae21c4bdbd1198781" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertised manufacturer data. < br /></ td ></ tr >
< tr class = "separator:ac433e3458ac5259ae21c4bdbd1198781" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ac9f3a7270e1cefedf8547c5188d06120" id = "r_ac9f3a7270e1cefedf8547c5188d06120" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#ac9f3a7270e1cefedf8547c5188d06120" > setManufacturerData</ a > (const std::string & data)</ td ></ tr >
< tr class = "memdesc:ac9f3a7270e1cefedf8547c5188d06120" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertised manufacturer data. < br /></ td ></ tr >
< tr class = "separator:ac9f3a7270e1cefedf8547c5188d06120" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:aac1b5e560aa497a274985a22083bfc97" id = "r_aac1b5e560aa497a274985a22083bfc97" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#aac1b5e560aa497a274985a22083bfc97" > setManufacturerData</ a > (const std::vector< uint8_t > & data)</ td ></ tr >
< tr class = "memdesc:aac1b5e560aa497a274985a22083bfc97" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertised manufacturer data. < br /></ td ></ tr >
< tr class = "separator:aac1b5e560aa497a274985a22083bfc97" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a9fe23a52ac3f699095d84d2ba8f90c28" id = "r_a9fe23a52ac3f699095d84d2ba8f90c28" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a9fe23a52ac3f699095d84d2ba8f90c28" > setURI</ a > (const std::string & uri)</ td ></ tr >
< tr class = "memdesc:a9fe23a52ac3f699095d84d2ba8f90c28" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the advertised URI. < br /></ td ></ tr >
< tr class = "separator:a9fe23a52ac3f699095d84d2ba8f90c28" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a815faed49fb4f29337fda94bd39c0bbc" id = "r_a815faed49fb4f29337fda94bd39c0bbc" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a815faed49fb4f29337fda94bd39c0bbc" > setServiceData</ a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID</ a > & uuid, const uint8_t *data, size_t length)</ td ></ tr >
< tr class = "memdesc:a815faed49fb4f29337fda94bd39c0bbc" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the service data advertised for the UUID. < br /></ td ></ tr >
< tr class = "separator:a815faed49fb4f29337fda94bd39c0bbc" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a708384c4b9af3006893afbdef74362bc" id = "r_a708384c4b9af3006893afbdef74362bc" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a708384c4b9af3006893afbdef74362bc" > setServiceData</ a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID</ a > & uuid, const std::string & data)</ td ></ tr >
< tr class = "memdesc:a708384c4b9af3006893afbdef74362bc" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the service data advertised for the UUID. < br /></ td ></ tr >
< tr class = "separator:a708384c4b9af3006893afbdef74362bc" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a65123182c5218758433e4acf0432fc84" id = "r_a65123182c5218758433e4acf0432fc84" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "class_nim_b_l_e_advertising.html#a65123182c5218758433e4acf0432fc84" > setServiceData</ a > (const < a class = "el" href = "class_nim_b_l_e_u_u_i_d.html" > NimBLEUUID</ a > & uuid, const std::vector< uint8_t > & data)</ td ></ tr >
< tr class = "memdesc:a65123182c5218758433e4acf0432fc84" >< td class = "mdescLeft" >   </ td >< td class = "mdescRight" > Set the service data advertised for the UUID. < br /></ td ></ tr >
< tr class = "separator:a65123182c5218758433e4acf0432fc84" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
< a name = "details" id = "details" ></ a >< h2 class = "groupheader" > Detailed Description</ h2 >
< div class = "textblock" >< p > Perform and manage BLE advertising. </ p >
< p > A BLE server will want to perform advertising in order to make itself known to BLE clients. </ p >
</ div >< h2 class = "groupheader" > Member Function Documentation</ h2 >
2024-12-15 00:45:58 +00:00
< a id = "a1bacfa32690f7e0c6f1172ea03c68c0d" name = "a1bacfa32690f7e0c6f1172ea03c68c0d" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a1bacfa32690f7e0c6f1172ea03c68c0d" > ◆  </ a ></ span > addServiceUUID() < span class = "overload" > [1/2]</ span ></ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::addServiceUUID </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
< td class = "paramtype" > const char *  </ td >
< td class = "paramname" >< em > serviceUUID</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Add a service uuid to exposed list of services. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > serviceUUID</ td >< td > The string representation of the service to expose. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service was added successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a67c9589dff7e0ee3ec24f2c930d56c06" name = "a67c9589dff7e0ee3ec24f2c930d56c06" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a67c9589dff7e0ee3ec24f2c930d56c06" > ◆  </ a ></ span > addServiceUUID() < span class = "overload" > [2/2]</ span ></ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::addServiceUUID </ td >
2021-08-05 01:02:30 +00:00
< 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 > serviceUUID</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Add a service uuid to exposed list of services. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > serviceUUID</ td >< td > The UUID of the service to expose. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service was added successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a0d3c5cb3a93416a4206abb1f8e443ebf" name = "a0d3c5cb3a93416a4206abb1f8e443ebf" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a0d3c5cb3a93416a4206abb1f8e443ebf" > ◆  </ a ></ span > addTxPower()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::addTxPower </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Add the transmission power level to the advertisement packet. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the transmission power level was added successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "a6badd669ddf4ff8507561d5041d093d6" name = "a6badd669ddf4ff8507561d5041d093d6" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a6badd669ddf4ff8507561d5041d093d6" > ◆  </ a ></ span > enableScanResponse()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEAdvertising::enableScanResponse </ td >
< td > (</ td >
< td class = "paramtype" > bool  </ td >
< td class = "paramname" >< em > enable</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Enable scan response data. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > enable</ td >< td > If true, scan response data will be available, false disabled, default = disabled.</ td ></ tr >
</ table >
</ dd >
</ dl >
< p > The scan response data is sent in response to a scan request from a peer device. </ p >
</ div >
</ div >
< a id = "a1e23657839038e5219f9c009cf360a32" name = "a1e23657839038e5219f9c009cf360a32" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a1e23657839038e5219f9c009cf360a32" > ◆  </ a ></ span > getAdvertisementData()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > & NimBLEAdvertising::getAdvertisementData </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Get the current advertisement data. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > a reference to the current advertisement data. </ dd ></ dl >
</ div >
</ div >
< a id = "ae0e7d64d51882830750bcb87e2d9678c" name = "ae0e7d64d51882830750bcb87e2d9678c" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ae0e7d64d51882830750bcb87e2d9678c" > ◆  </ a ></ span > getScanData()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > & NimBLEAdvertising::getScanData </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Get the current scan response data. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > a reference to the current scan response data. </ dd ></ dl >
</ div >
</ div >
< a id = "ac257ab68520a244cb6494d793f9b6c2a" name = "ac257ab68520a244cb6494d793f9b6c2a" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ac257ab68520a244cb6494d793f9b6c2a" > ◆  </ a ></ span > isAdvertising()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::isAdvertising </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Check if currently advertising. </ p >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if advertising is active. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "ad899be16fa054a01908692a504af9832" name = "ad899be16fa054a01908692a504af9832" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ad899be16fa054a01908692a504af9832" > ◆  </ a ></ span > refreshAdvertisingData()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::refreshAdvertisingData </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Refresh advertsing data dynamically without stop/start cycle. For instance allows refreshing manufacturer data dynamically. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the data was set successfully.</ dd ></ dl >
< p > If scan response is enabled it will be refreshed as well. </ p >
</ div >
</ div >
< a id = "ad159c2e2a65d9bc7dcc5babed146936d" name = "ad159c2e2a65d9bc7dcc5babed146936d" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ad159c2e2a65d9bc7dcc5babed146936d" > ◆  </ a ></ span > removeServices()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::removeServices </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Remove all service UUIDs from the advertisement. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the services were removed successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "a94452c2f9f7233611246827ce62f6a2b" name = "a94452c2f9f7233611246827ce62f6a2b" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a94452c2f9f7233611246827ce62f6a2b" > ◆  </ a ></ span > removeServiceUUID() < span class = "overload" > [1/2]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::removeServiceUUID </ td >
< td > (</ td >
< td class = "paramtype" > const char *  </ td >
< td class = "paramname" >< em > serviceUUID</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Remove a service UUID from the advertisement. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > serviceUUID</ td >< td > The UUID of the service to remove. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service was removed successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "aba383012133dd694f56cf86966b2d80a" name = "aba383012133dd694f56cf86966b2d80a" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#aba383012133dd694f56cf86966b2d80a" > ◆  </ a ></ span > removeServiceUUID() < span class = "overload" > [2/2]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::removeServiceUUID </ td >
2021-08-05 01:02:30 +00:00
< 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 > serviceUUID</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
2024-12-15 00:45:58 +00:00
< p > Remove a service UUID from the advertisement. </ p >
2021-08-05 01:02:30 +00:00
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > serviceUUID</ td >< td > The UUID of the service to remove. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service was removed successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a91cde5680de36840fc18f6fd76665af7" name = "a91cde5680de36840fc18f6fd76665af7" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a91cde5680de36840fc18f6fd76665af7" > ◆  </ a ></ span > reset()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::reset </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
2024-12-15 00:45:58 +00:00
< td class = "paramname" ></ td >< td > )</ td >
2021-08-05 01:02:30 +00:00
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
2024-12-15 00:45:58 +00:00
< p > Stops the current advertising and resets the advertising data to the default values. </ p >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if successful. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "ab8afd94479ebac3996fa3712d3d92325" name = "ab8afd94479ebac3996fa3712d3d92325" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ab8afd94479ebac3996fa3712d3d92325" > ◆  </ a ></ span > setAdvertisementData()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setAdvertisementData </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
2024-12-15 00:45:58 +00:00
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > &  </ td >
< td class = "paramname" >< em > data</ em ></ td >< td > )</ td >
2021-08-05 01:02:30 +00:00
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
2024-12-15 00:45:58 +00:00
< p > Set the advertisement data that is to be broadcast in a regular advertisement. </ p >
2021-08-05 01:02:30 +00:00
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to be broadcast. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the data was set successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "a3e81d7d3aa2b72b8db58427d4a42727b" name = "a3e81d7d3aa2b72b8db58427d4a42727b" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a3e81d7d3aa2b72b8db58427d4a42727b" > ◆  </ a ></ span > setAdvertisingCompleteCallback()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEAdvertising::setAdvertisingCompleteCallback </ td >
< td > (</ td >
< td class = "paramtype" > advCompleteCB_t  </ td >
< td class = "paramname" >< em > callback</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the callback to be invoked when advertising stops. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > callback</ td >< td > The callback to be invoked when advertising stops. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a28c082bb540325ada66b4e203ae6998a" name = "a28c082bb540325ada66b4e203ae6998a" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a28c082bb540325ada66b4e203ae6998a" > ◆  </ a ></ span > setAdvertisingInterval()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > void NimBLEAdvertising::setAdvertisingInterval </ td >
< td > (</ td >
< td class = "paramtype" > uint16_t  </ td >
< td class = "paramname" >< em > interval</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertising interval. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > interval</ td >< td > The advertising interval in 0.625ms units, 0 = use default. </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
< a id = "a1f4e1ae9552400fb2bb3cd73b2a483b0" name = "a1f4e1ae9552400fb2bb3cd73b2a483b0" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a1f4e1ae9552400fb2bb3cd73b2a483b0" > ◆  </ a ></ span > setAppearance()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setAppearance </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
< td class = "paramtype" > uint16_t  </ td >
< td class = "paramname" >< em > appearance</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
2024-12-15 00:45:58 +00:00
< p > Set the device appearance in the advertising data. </ p >
2021-08-05 01:02:30 +00:00
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > appearance</ td >< td > The appearance of the device in the advertising data. If the appearance value is 0 then the appearance will not be in the advertisement. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the appearance was set successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "ae49d2bd91cabca46ec7c4bbd7fc49407" name = "ae49d2bd91cabca46ec7c4bbd7fc49407" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ae49d2bd91cabca46ec7c4bbd7fc49407" > ◆  </ a ></ span > setConnectableMode()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setConnectableMode </ td >
< td > (</ td >
< td class = "paramtype" > uint8_t  </ td >
< td class = "paramname" >< em > mode</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the type of connectable mode to advertise. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > mode</ td >< td > The connectable mode:< ul >
< li > BLE_GAP_CONN_MODE_NON (0) - not connectable advertising</ li >
< li > BLE_GAP_CONN_MODE_DIR (1) - directed connectable advertising</ li >
< li > BLE_GAP_CONN_MODE_UND (2) - undirected connectable advertising </ li >
</ ul >
</ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the connectable mode was set, false if the mode is invalid. </ dd ></ dl >
</ div >
</ div >
< a id = "a710eacfc97ecea1bf9a9a3569c58d410" name = "a710eacfc97ecea1bf9a9a3569c58d410" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a710eacfc97ecea1bf9a9a3569c58d410" > ◆  </ a ></ span > setDiscoverableMode()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setDiscoverableMode </ td >
< td > (</ td >
< td class = "paramtype" > uint8_t  </ td >
< td class = "paramname" >< em > mode</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the discoverable mode to use. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > mode</ td >< td > The discoverable mode:< ul >
< li > BLE_GAP_DISC_MODE_NON (0) - non-discoverable</ li >
< li > BLE_GAP_DISC_MODE_LTD (1) - limited discoverable</ li >
< li > BLE_GAP_DISC_MODE_GEN (2) - general discoverable </ li >
</ ul >
</ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the discoverable mode was set, false if the mode is invalid. </ dd ></ dl >
</ div >
</ div >
< a id = "ac9f3a7270e1cefedf8547c5188d06120" name = "ac9f3a7270e1cefedf8547c5188d06120" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ac9f3a7270e1cefedf8547c5188d06120" > ◆  </ a ></ span > setManufacturerData() < span class = "overload" > [1/3]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setManufacturerData </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
< td class = "paramtype" > const std::string &  </ td >
< td class = "paramname" >< em > data</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertised manufacturer data. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the manufacturer data was set successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "aac1b5e560aa497a274985a22083bfc97" name = "aac1b5e560aa497a274985a22083bfc97" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#aac1b5e560aa497a274985a22083bfc97" > ◆  </ a ></ span > setManufacturerData() < span class = "overload" > [2/3]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setManufacturerData </ td >
< td > (</ td >
< td class = "paramtype" > const std::vector< uint8_t > &  </ td >
< td class = "paramname" >< em > data</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertised manufacturer data. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the manufacturer data was set successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "ac433e3458ac5259ae21c4bdbd1198781" name = "ac433e3458ac5259ae21c4bdbd1198781" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ac433e3458ac5259ae21c4bdbd1198781" > ◆  </ a ></ span > setManufacturerData() < span class = "overload" > [3/3]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setManufacturerData </ td >
< td > (</ td >
< td class = "paramtype" > const uint8_t *  </ td >
< td class = "paramname" >< em > data</ em > , </ td >
</ tr >
< tr >
< td class = "paramkey" ></ td >
< td ></ td >
< td class = "paramtype" > size_t  </ td >
< td class = "paramname" >< em > length</ em >   </ td >
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertised manufacturer data. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > length</ td >< td > The length of the data. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the manufacturer data was set successfully. </ dd ></ dl >
</ div >
</ div >
< a id = "a97bf63603b9aabdf0a5284269dfc5549" name = "a97bf63603b9aabdf0a5284269dfc5549" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a97bf63603b9aabdf0a5284269dfc5549" > ◆  </ a ></ span > setMaxInterval()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEAdvertising::setMaxInterval </ td >
< td > (</ td >
< td class = "paramtype" > uint16_t  </ td >
2024-12-15 00:45:58 +00:00
< td class = "paramname" >< em > maxInterval</ em ></ td >< td > )</ td >
2021-08-05 01:02:30 +00:00
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the maximum advertising interval. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > maxInterval</ td >< td > Maximum value for advertising interval in 0.625ms units, 0 = use default. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a6b5be947a5e188d512e3338d36a039cb" name = "a6b5be947a5e188d512e3338d36a039cb" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a6b5be947a5e188d512e3338d36a039cb" > ◆  </ a ></ span > setMinInterval()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEAdvertising::setMinInterval </ td >
< td > (</ td >
< td class = "paramtype" > uint16_t  </ td >
2024-12-15 00:45:58 +00:00
< td class = "paramname" >< em > minInterval</ em ></ td >< td > )</ td >
2021-08-05 01:02:30 +00:00
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the minimum advertising interval. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > minInterval</ td >< td > Minimum value for advertising interval in 0.625ms units, 0 = use default. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a7fb4b74eb7acb1f46e57ff772baccd88" name = "a7fb4b74eb7acb1f46e57ff772baccd88" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a7fb4b74eb7acb1f46e57ff772baccd88" > ◆  </ a ></ span > setName()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setName </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
< td class = "paramtype" > const std::string &  </ td >
< td class = "paramname" >< em > name</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertised name of the device. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > name</ td >< td > The name to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the name was set successfully. </ dd ></ dl >
< dl class = "section note" >< dt > Note</ dt >< dd > If the name is too long it will be truncated.</ dd ></ dl >
< p > If scan response is enabled the name will be set in the scan response data. </ p >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a9dbb66ca66aa040731fcfd737f881469" name = "a9dbb66ca66aa040731fcfd737f881469" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a9dbb66ca66aa040731fcfd737f881469" > ◆  </ a ></ span > setPreferredParams()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setPreferredParams </ 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 ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the preferred min and max connection intervals to advertise. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > minInterval</ td >< td > The minimum preferred connection interval. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > maxInterval</ td >< td > The Maximum preferred connection interval. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the preferred connection interval was set successfully.</ dd ></ dl >
< p > Range = 0x0006(7.5ms) to 0x0C80(4000ms), values not within the range will be limited to this range. </ p >
</ div >
</ div >
< a id = "aa3da80c7d17a7824484ee254076e4790" name = "aa3da80c7d17a7824484ee254076e4790" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#aa3da80c7d17a7824484ee254076e4790" > ◆  </ a ></ span > setScanFilter()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void NimBLEAdvertising::setScanFilter </ td >
< td > (</ td >
< td class = "paramtype" > bool  </ td >
< td class = "paramname" >< em > scanRequestWhitelistOnly</ em > , </ td >
</ tr >
< tr >
< td class = "paramkey" ></ td >
< td ></ td >
< td class = "paramtype" > bool  </ td >
< td class = "paramname" >< em > connectWhitelistOnly</ em >   </ td >
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the filtering for the scan filter. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > scanRequestWhitelistOnly</ td >< td > If true, only allow scan requests from those on the white list. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > connectWhitelistOnly</ td >< td > If true, only allow connections from those on the white list. </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a97798e6d9d7721eb588c5e67d54e97ef" name = "a97798e6d9d7721eb588c5e67d54e97ef" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a97798e6d9d7721eb588c5e67d54e97ef" > ◆  </ a ></ span > setScanResponseData()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setScanResponseData </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
2024-12-15 00:45:58 +00:00
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_advertisement_data.html" > NimBLEAdvertisementData</ a > &  </ td >
< td class = "paramname" >< em > data</ em ></ td >< td > )</ td >
2021-08-05 01:02:30 +00:00
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
2024-12-15 00:45:58 +00:00
< p > Set the data that is to be provided in a scan response. </ p >
2021-08-05 01:02:30 +00:00
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to be provided in the scan response </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the data was set successfully.</ dd ></ dl >
< p > The scan response data is sent in response to a scan request from a peer device. If this is set without setting the advertisement data when advertising starts this may be overwritten. </ p >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a708384c4b9af3006893afbdef74362bc" name = "a708384c4b9af3006893afbdef74362bc" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a708384c4b9af3006893afbdef74362bc" > ◆  </ a ></ span > setServiceData() < span class = "overload" > [1/3]</ span ></ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setServiceData </ td >
2021-08-05 01:02:30 +00:00
< 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" > const std::string &  </ td >
< td class = "paramname" >< em > data</ em >   </ td >
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the service data advertised for the 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 the service data belongs to. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service data was set successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
< dl class = "section note" >< dt > Note</ dt >< dd > If data length is 0 the service data will not be advertised. </ dd ></ dl >
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a65123182c5218758433e4acf0432fc84" name = "a65123182c5218758433e4acf0432fc84" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a65123182c5218758433e4acf0432fc84" > ◆  </ a ></ span > setServiceData() < span class = "overload" > [2/3]</ span ></ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
2024-12-15 00:45:58 +00:00
< td class = "memname" > bool NimBLEAdvertising::setServiceData </ 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" > const std::vector< uint8_t > &  </ td >
< td class = "paramname" >< em > data</ em >   </ td >
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the service data advertised for the 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 the service data belongs to. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service data was set successfully. </ dd ></ dl >
< dl class = "section note" >< dt > Note</ dt >< dd > If data length is 0 the service data will not be advertised. </ dd ></ dl >
</ div >
</ div >
< a id = "a815faed49fb4f29337fda94bd39c0bbc" name = "a815faed49fb4f29337fda94bd39c0bbc" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a815faed49fb4f29337fda94bd39c0bbc" > ◆  </ a ></ span > setServiceData() < span class = "overload" > [3/3]</ span ></ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setServiceData </ 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" > const uint8_t *  </ td >
< td class = "paramname" >< em > data</ em > , </ td >
</ tr >
< tr >
< td class = "paramkey" ></ td >
< td ></ td >
< td class = "paramtype" > size_t  </ td >
< td class = "paramname" >< em > length</ em >   </ td >
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the service data advertised for the 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 the service data belongs to. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > data</ td >< td > The data to advertise. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > length</ td >< td > The length of the data. </ td ></ tr >
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the service data was set successfully. </ dd ></ dl >
< dl class = "section note" >< dt > Note</ dt >< dd > If data length is 0 the service data will not be advertised. </ dd ></ dl >
</ div >
</ div >
< a id = "a9fe23a52ac3f699095d84d2ba8f90c28" name = "a9fe23a52ac3f699095d84d2ba8f90c28" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a9fe23a52ac3f699095d84d2ba8f90c28" > ◆  </ a ></ span > setURI()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::setURI </ td >
2021-08-05 01:02:30 +00:00
< td > (</ td >
< td class = "paramtype" > const std::string &  </ td >
< td class = "paramname" >< em > uri</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the advertised URI. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > uri</ td >< td > The URI to advertise. </ td ></ tr >
</ table >
</ dd >
</ dl >
2024-12-15 00:45:58 +00:00
< dl class = "section return" >< dt > Returns</ dt >< dd > True if the URI was set successfully. </ dd ></ dl >
2021-08-05 01:02:30 +00:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a8a5c880ee36fd44e0c72c14c47c8e15e" name = "a8a5c880ee36fd44e0c72c14c47c8e15e" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a8a5c880ee36fd44e0c72c14c47c8e15e" > ◆  </ a ></ span > start()</ h2 >
2021-08-05 01:02:30 +00:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::start </ td >
< td > (</ td >
< td class = "paramtype" > uint32_t  </ td >
< td class = "paramname" >< em > duration</ em > = < code > 0</ code > , </ td >
</ tr >
< tr >
< td class = "paramkey" ></ td >
< td ></ td >
2024-12-15 00:45:58 +00:00
< td class = "paramtype" > const < a class = "el" href = "class_nim_b_l_e_address.html" > NimBLEAddress</ a > *  </ td >
< td class = "paramname" >< em > dirAddr</ em > = < code > nullptr</ code >   </ td >
2021-08-05 01:02:30 +00:00
</ tr >
< tr >
< td ></ td >
< td > )</ td >
< td ></ td >< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Start advertising. </ p >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
2024-12-15 00:45:58 +00:00
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > duration</ td >< td > The duration, in milliseconds, to advertise, 0 == advertise forever. </ td ></ tr >
< tr >< td class = "paramdir" > [in]</ td >< td class = "paramname" > dirAddr</ td >< td > The address of a peer to directly advertise to. </ td ></ tr >
2021-08-05 01:02:30 +00:00
</ table >
</ dd >
</ dl >
< dl class = "section return" >< dt > Returns</ dt >< dd > True if advertising started successfully. </ dd ></ dl >
2022-07-31 11:38:16 -06:00
</ div >
</ div >
2024-12-15 00:45:58 +00:00
< a id = "a3ab772936ace18c9a7e509740aa59800" name = "a3ab772936ace18c9a7e509740aa59800" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a3ab772936ace18c9a7e509740aa59800" > ◆  </ a ></ span > stop()</ h2 >
2022-07-31 11:38:16 -06:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool NimBLEAdvertising::stop </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ 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 >
2021-08-05 01:02:30 +00: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_advertising.html" > NimBLEAdvertising</ a ></ li >
2024-12-15 00:45:58 +00: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 01:02:30 +00:00
</ ul >
</ div >
</ body >
</ html >