Skip to content

Commit 7bec9c2

Browse files
committed
Release 1.2.0
1 parent 1210772 commit 7bec9c2

File tree

8 files changed

+75
-44
lines changed

8 files changed

+75
-44
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [Unreleased]
5+
## [1.2.0] - 2021-02-08
66

77
### Added
88
- `NimBLECharacteristic::getDescriptorByHandle`: Return the BLE Descriptor for the given handle.
@@ -47,11 +47,15 @@ Overloads to get a vector containing pointers to all the characteristics in a se
4747
- `haveTargetAddress/getTargetAddressCount/getTargetAddress(index)`: checks if a target address is present / gets a count of the addresses targeted / gets the address of the target at index.
4848

4949
### Changed
50+
- `nimconfig.h` (Arduino) is now easier to use.
51+
5052
- `NimBLEServer::getServiceByUUID` Now takes an extra parameter of instanceID to support multiple services with the same UUID.
5153

5254
- `NimBLEService::getCharacteristic` Now takes an extra parameter of instanceID to support multiple characteristics with the same UUID.
5355

54-
- `NimBLEAdvertising` Transmission power is no longer advertised by default and can be added to the advertisement by calling `NimBLEAdvertising::addTxPower`
56+
- `NimBLEAdvertising` Transmission power is no longer advertised by default and can be added to the advertisement by calling `NimBLEAdvertising::addTxPower`
57+
58+
- `NimBLEAdvertising` Custom scan response data can now be used without custom advertisment.
5559

5660
- `NimBLEScan` Now uses the controller duplicate filter.
5761

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ set(COMPONENT_SRCS
1717
"src/NimBLEDevice.cpp"
1818
"src/NimBLEEddystoneTLM.cpp"
1919
"src/NimBLEEddystoneURL.cpp"
20+
"src/NimBLEHIDDevice.cpp"
2021
"src/NimBLERemoteCharacteristic.cpp"
2122
"src/NimBLERemoteDescriptor.cpp"
2223
"src/NimBLERemoteService.cpp"

docs/Command_line_config.md

Lines changed: 59 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
11
# Arduino command line and platformio config options
22

3-
`CONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED`
4-
5-
If defined, NimBLE Client functions will not be included.
6-
- Reduces flash size by approx. 7kB.
7-
<br/>
3+
`CONFIG_BT_NIMBLE_MAX_CONNECTIONS`
84

9-
`CONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED`
10-
11-
If defined, NimBLE Scan functions will not be included.
12-
- Reduces flash size by approx. 26kB.
5+
Sets the number of simultaneous connections (esp controller max is 9)
6+
- Default value is 3
137
<br/>
148

15-
`CONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED`
9+
`CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU`
1610

17-
If defined NimBLE Server functions will not be included.
18-
- Reduces flash size by approx. 16kB.
11+
Sets the default MTU size.
12+
- Default value is 255
1913
<br/>
2014

21-
`CONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED`
15+
`CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME`
2216

23-
If defined, NimBLE Advertising functions will not be included.
24-
- Reduces flash size by approx. 5kB.
17+
Set the default device name
18+
- Default value is "nimble"
2519
<br/>
2620

2721
`CONFIG_BT_NIMBLE_DEBUG`
@@ -48,45 +42,76 @@ If defined, advertisment types will be printed as text while scanning in debug l
4842
- Uses approx. 250 bytes of flash memory.
4943
<br/>
5044

51-
`CONFIG_BT_NIMBLE_PINNED_TO_CORE`
45+
`CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE`
5246

53-
Sets the core the NimBLE host stack will run on
54-
- Options: 0 or 1
47+
Set the default appearance.
48+
- Default value is 0x00
5549
<br/>
5650

57-
`CONFIG_BT_NIMBLE_TASK_STACK_SIZE`
51+
`CONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED`
52+
53+
If defined, NimBLE Client functions will not be included.
54+
- Reduces flash size by approx. 7kB.
55+
<br/>
5856

59-
Set the task stack size for the NimBLE core.
60-
- Default is 4096
57+
`CONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED`
58+
59+
If defined, NimBLE Scan functions will not be included.
60+
- Reduces flash size by approx. 26kB.
6161
<br/>
6262

63-
`CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL`
63+
`CONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED`
6464

65-
Sets the NimBLE stack to use external PSRAM will be loaded
66-
- Must be defined with a value of 1; Default is CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL 1
65+
If defined NimBLE Server functions will not be included.
66+
- Reduces flash size by approx. 16kB.
6767
<br/>
6868

69-
`CONFIG_BT_NIMBLE_MAX_CONNECTIONS`
69+
`CONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED`
7070

71-
Sets the number of simultaneous connections (esp controller max is 9)
72-
- Default value is 3
71+
If defined, NimBLE Advertising functions will not be included.
72+
- Reduces flash size by approx. 5kB.
7373
<br/>
74-
75-
`CONFIG_BT_NIMBLE_MAX_BONDS`
74+
75+
`CONFIG_BT_NIMBLE_MAX_BONDS`
7676

7777
Sets the number of devices allowed to store/bond with
7878
- Default value is 3
7979
<br/>
8080

81-
`CONFIG_BT_NIMBLE_MAX_CCCDS`
81+
`CONFIG_BT_NIMBLE_MAX_CCCDS`
8282

8383
Sets the maximum number of CCCD subscriptions to store
8484
- Default value is 8
8585
<br/>
86-
87-
`CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME`
8886

89-
Set the default device name
90-
- Default value is "nimble"
87+
`CONFIG_BT_NIMBLE_RPA_TIMEOUT`
88+
89+
Sets the random address refresh time in seconds.
90+
- Default value is 900
91+
<br/>
92+
93+
`CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT`
94+
95+
Set the number of msys blocks For prepare write & prepare responses. This may need to be increased if
96+
you are sending large blocks of data with a low MTU. E.g: 512 bytes with 23 MTU will fail.
97+
- Default value is 12
98+
<br/>
99+
100+
`CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL`
101+
102+
Sets the NimBLE stack to use external PSRAM will be loaded
103+
- Must be defined with a value of 1; Default is CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL 1
104+
<br/>
105+
106+
`CONFIG_BT_NIMBLE_PINNED_TO_CORE`
107+
108+
Sets the core the NimBLE host stack will run on
109+
- Options: 0 or 1
110+
<br/>
111+
112+
`CONFIG_BT_NIMBLE_TASK_STACK_SIZE`
113+
114+
Set the task stack size for the NimBLE core.
115+
- Default is 4096
91116
<br/>
92117

docs/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "esp-nimble-cpp / NimBLE-Arduino"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 1.1.0
41+
PROJECT_NUMBER = 1.2.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

docs/Migration_guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,11 @@ If you wish to advertise these parameters you can still do so manually via `BLEA
220220
<br/>
221221

222222
Calling `NimBLEAdvertising::setAdvertisementData` will entirely replace any data set with `NimBLEAdvertising::addServiceUUID`, or
223-
`NimBLEAdvertising::setAppearance`. You should set all the data you wish to advertise within the `NimBLEAdvertisementData` instead.
223+
`NimBLEAdvertising::setAppearance` or similar methods. You should set all the data you wish to advertise within the `NimBLEAdvertisementData` instead.
224224

225-
Calling `NimBLEAdvertising::setScanResponseData` without also calling `NimBLEAdvertising::setAdvertisementData` will have no effect.
226-
When using custom scan response data you must also use custom advertisement data.
225+
~~Calling `NimBLEAdvertising::setScanResponseData` without also calling `NimBLEAdvertising::setAdvertisementData` will have no effect.
226+
When using custom scan response data you must also use custom advertisement data.~~
227+
No longer true as of release 1.2.0 and above, custom scan response is now supported without custom advertisement data.
227228
<br/>
228229

229230
> BLEAdvertising::start (NimBLEAdvertising::start)

src/NimBLEAdvertising.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void NimBLEAdvertising::setName(const std::string &name) {
142142

143143
/**
144144
* @brief Set the advertised manufacturer data.
145-
* @param [in] name The data to advertise.
145+
* @param [in] data The data to advertise.
146146
*/
147147
void NimBLEAdvertising::setManufacturerData(const std::string &data) {
148148
m_mfgData.assign(data.begin(), data.end());
@@ -154,7 +154,7 @@ void NimBLEAdvertising::setManufacturerData(const std::string &data) {
154154

155155
/**
156156
* @brief Set the advertised URI.
157-
* @param [in] name The URI to advertise.
157+
* @param [in] uri The URI to advertise.
158158
*/
159159
void NimBLEAdvertising::setURI(const std::string &uri) {
160160
m_uri.assign(uri.begin(), uri.end());

src/NimBLECharacteristic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ NimBLEDescriptor* NimBLECharacteristic::getDescriptorByUUID(const NimBLEUUID &uu
126126

127127
/**
128128
* @brief Return the BLE Descriptor for the given handle.
129-
* @param [in] uuid The handle of the descriptor.
129+
* @param [in] handle The handle of the descriptor.
130130
* @return A pointer to the descriptor object or nullptr if not found.
131131
*/
132132
NimBLEDescriptor *NimBLECharacteristic::getDescriptorByHandle(uint16_t handle) {

src/NimBLEDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ void NimBLEDevice::stopAdvertising() {
403403

404404

405405
/**
406-
* @brief Set the duplicate filter mode for filtering scanned devices.
406+
* @brief Set the duplicate filter cache size for filtering scanned devices.
407407
* @param [in] cacheSize The number of advertisements filtered before the cache is reset.\n
408408
* Range is 10-1000, a larger value will reduce how often the same devices are reported.
409409
* @details Must only be called before calling NimBLEDevice::init.

0 commit comments

Comments
 (0)