Skip to content

Commit 19b8af5

Browse files
committed
Update documentation.
* typo fix
1 parent 213ad0d commit 19b8af5

File tree

5 files changed

+18
-30
lines changed

5 files changed

+18
-30
lines changed

README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,8 @@ More advanced examples highlighting many available features are in examples/ Nim
6363

6464
Beacon examples provided by @beegee-tokyo are in examples/ BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
6565

66-
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project, such as increasing max connections, default is 3.
67-
68-
**Note To increase max connections in Arduino it is also required to change the controller max connections defined in sdkconfig.h.**
69-
70-
This is located in your Arduino/hardware/espressif/esp32/tools/sdk/include/config folder.
71-
72-
The values in `sdkconfig.h` you will need to change are:
73-
```
74-
#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN 3
75-
#define CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 3
76-
```
77-
In `nimconfig.h` the value is:
78-
```
79-
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
80-
```
81-
Espressif has stated the hard maximum connections is 9.
66+
Change the settings in the `src/nimconfig.h` file to customize NimBLE to your project,
67+
such as increasing max connections, default is 3, absolute maximum connections is 9.
8268
<br/>
8369

8470
# Development Status

docs/Migration_guide.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,19 @@ This can be changed to use passkey authentication or numeric comparison. See [Se
209209

210210
<a name="advertising-api"></a>
211211
## Advertising API
212-
Advertising works the same as the original API except with the removal of:
212+
Advertising works the same as the original API except:
213213
> BLEAdvertising::setMinPreferred
214214
> BLEAdvertising::setMaxPreferred
215215
216216
These methods were found to not provide useful functionality and consumed valuable advertising space (6 bytes of 31) if used unknowingly.
217-
If you wish to advertise these parameters you can still do so manually via `NimBLEAdvertisementData::addData`.
217+
If you wish to advertise these parameters you can still do so manually via `BLEAdvertisementData::addData` (`NimBLEAdvertisementData::addData`).
218+
<br/>
219+
220+
Calling `NimBLEAdvertising::setAdvertisementData` will entirely replace any data set with `NimBLEAdvertising::addServiceUUID`, or
221+
`NimBLEAdvertising::setAppearance`. You should set all the data you wish to advertise within the `NimBLEAdvertisementData` instead.
222+
223+
Calling `NimBLEAdvertising::setScanResponseData` without also calling `NimBLEAdvertising::setAdvertisementData` will have no effect.
224+
When using custom scan response data you must also use custom advertisement data.
218225
<br/>
219226

220227
<a name="client-api"></a>

src/NimBLEAdvertising.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ void NimBLEAdvertising::setScanFilter(bool scanRequestWhitelistOnly, bool connec
178178
/**
179179
* @brief Set the advertisement data that is to be published in a regular advertisement.
180180
* @param [in] advertisementData The data to be advertised.
181+
* @details The use of this function will replace any data set with addServiceUUID\n
182+
* or setAppearance. If you wish for these to be advertised you must include them\n
183+
* in the advertisementData parameter sent.
181184
*/
182185

183186
void NimBLEAdvertising::setAdvertisementData(NimBLEAdvertisementData& advertisementData) {
@@ -196,6 +199,8 @@ void NimBLEAdvertising::setAdvertisementData(NimBLEAdvertisementData& advertisem
196199
/**
197200
* @brief Set the advertisement data that is to be published in a scan response.
198201
* @param [in] advertisementData The data to be advertised.
202+
* @details Calling this without also using setAdvertisementData will have no effect.\n
203+
* When using custom scan response data you must also use custom advertisement data.
199204
*/
200205
void NimBLEAdvertising::setScanResponseData(NimBLEAdvertisementData& advertisementData) {
201206
NIMBLE_LOGD(LOG_TAG, ">> setScanResponseData");

src/NimBLEAdvertising.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class NimBLEAdvertising {
8484
void setMaxInterval(uint16_t maxinterval);
8585
void setMinInterval(uint16_t mininterval);
8686
void setAdvertisementData(NimBLEAdvertisementData& advertisementData);
87-
void setScanFilter(bool scanRequertWhitelistOnly, bool connectWhitelistOnly);
87+
void setScanFilter(bool scanRequestWhitelistOnly, bool connectWhitelistOnly);
8888
void setScanResponseData(NimBLEAdvertisementData& advertisementData);
8989
void setScanResponse(bool);
9090

src/nimconfig.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,7 @@
101101
*/
102102
#define CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL 1
103103

104-
/**
105-
* @brief Sets the number of simultaneous connections (esp controller max is 9)
106-
* @details To increase max connections in Arduino it is also required to change the
107-
* controller max connections defined in sdkconfig.h.\n
108-
*
109-
* This is located in your Arduino/hardware/espressif/esp32/tools/sdk/include/config folder.\n\n
110-
*
111-
* The values in sdkconfig.h you will need to change are:\n\n
112-
* `CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN 3`\n
113-
* `CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF 3`
114-
*/
104+
/** @brief Sets the number of simultaneous connections (esp controller max is 9) */
115105
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
116106

117107
/** @brief Sets the number of devices allowed to store/bond with */

0 commit comments

Comments
 (0)