Release v1.4.0

This commit is contained in:
h2zero committed 2022-07-31 11:38:16 -06:00
1 parent 6ae5666f7a
commit a116f0d0c0
238 files changed
+9929 -4077

No files matched your search

+10 -10
View File
@@ -26,7 +26,7 @@
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">esp-nimble-cpp
&#160;<span id="projectnumber">1.3.2</span>
&#160;<span id="projectnumber">1.4.0</span>
</div>
</td>
</tr>
@@ -86,42 +86,42 @@ $(document).ready(function(){initNavTree('md__usage_tips.html',''); initResizabl
<div class="title">Usage Tips </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1><a class="anchor" id="autotoc_md71"></a>
<div class="textblock"><h1><a class="anchor" id="autotoc_md77"></a>
Put BLE functions in a task running on the NimBLE stack core</h1>
<p>When commands are sent to the stack from a differnt core they can experience delays in execution. <br />
<p>When commands are sent to the stack from a different core they can experience delays in execution. <br />
This library detects this and invokes the esp32 IPC to reroute these commands through the correct core but this also increases overhead. <br />
Therefore it is highly recommended to create tasks for BLE to run on the same core, the macro <code>CONFIG_BT_NIMBLE_PINNED_TO_CORE</code> can be used to set the core. <br />
<br />
</p>
<h1><a class="anchor" id="autotoc_md72"></a>
<h1><a class="anchor" id="autotoc_md78"></a>
Do not delete client instances unless necessary or unused</h1>
<p>When a client instance has been created and has connected to a peer device and it has retrieved service/characteristic information it will store that data for the life of the client instance. <br />
If you are periodically connecting to the same devices and you have deleted the client instance or the services when connecting again it will cause a retrieval of that information from the peer again. <br />
This results in significant energy drain on the battery of the devices, fragments heap, and reduces connection performance. <br />
</p>
<p>Client instances in this library use approximately 20% of the original bluedroid library, deleteing them will provide much less gain than it did before. <br />
<p>Client instances in this library use approximately 20% of the original bluedroid library, deleting them will provide much less gain than it did before. <br />
</p>
<p>It is recommended to retain the client instance in cases where the time between connecting to the same device is less than 5 minutes. <br />
<br />
<br />
</p>
<h1><a class="anchor" id="autotoc_md73"></a>
Only retrieve the services and characteriscs needed</h1>
<h1><a class="anchor" id="autotoc_md79"></a>
Only retrieve the services and characteristics needed</h1>
<p>As a client the use of <code><a class="el" href="class_nim_b_l_e_client.html#acb9007569b3bb13b3b49f3c4cb47b21a" title="Get a pointer to the vector of found services.">NimBLEClient::getServices</a></code> or <code><a class="el" href="class_nim_b_l_e_remote_service.html#a2c9e91c842598a6a9576c7b87af0863a" title="Get a pointer to the vector of found characteristics.">NimBLERemoteService::getCharacteristics</a></code> and using <code>true</code> for the parameter should be limited to devices that are not known. <br />
Instead <code>NimBLEClient::getService(NimBLEUUID)</code> or <code>NimBLERemoteService::getCharacteristic(NimBLEUUID)</code> should be used to access certain attributes that are useful to the application. <br />
This reduces energy consumed, heap allocated, connection time and improves overall efficiency. <br />
<br />
<br />
</p>
<h1><a class="anchor" id="autotoc_md74"></a>
<h1><a class="anchor" id="autotoc_md80"></a>
Check return values</h1>
<p>Many user issues can be avoided by checking if a function returned successfully, by either testing for true/false such as when calling <code><a class="el" href="class_nim_b_l_e_client.html#aab311f0a8af21fb63f78e7fbac29951a" title="Connect to an advertising device.">NimBLEClient::connect</a></code>, <br />
<p>Many user issues can be avoided by checking if a function returned successfully, by either testing for true/false such as when calling <code><a class="el" href="class_nim_b_l_e_client.html#ae9b3e8a9b47c7eaad040b485bda958a1" title="Connect to an advertising device.">NimBLEClient::connect</a></code>, <br />
or nullptr such as when calling <code><a class="el" href="class_nim_b_l_e_client.html#ae22379ab10bd82932d2303fb3753c366" title="Get the service BLE Remote Service instance corresponding to the uuid.">NimBLEClient::getService</a></code>. The latter being a must, as calling a method on a nullptr will surely result in a crash. <br />
Most of the functions in this library return something that should be checked before proceeding. <br />
<br />
<br />
</p>
<h1><a class="anchor" id="autotoc_md75"></a>
<h1><a class="anchor" id="autotoc_md81"></a>
There will be bugs - please report them</h1>
<p>No code is bug free and unit testing will not find them all on it's own. If you encounter a bug, please report it along with any logs and decoded backtrace if applicable. <br />
Best efforts will be made to correct any errors ASAP. <br />