Skip to content

Commit efa48c0

Browse files
committed
Release 1.4.0
* Fix typos * Update docs
1 parent 70ed6e2 commit efa48c0

27 files changed

+159
-164
lines changed

CHANGELOG.md

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

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

5+
## [1.4.0] - 2022-07-31
6+
7+
### Fixed
8+
- Fixed missing data from long notification values.
9+
- Fixed NimbleCharacteristicCallbacks::onRead not being called when a non-long read command is received.
10+
- Prevent a potential crash when retrieving characteristics from a service if the result was successful but no characteristics found.
11+
- logs/typos.
12+
13+
### Changed
14+
- AD flags are no longer set in the advertisements of non-connectable beacons, freeing up 3 bytes of advertisement room.
15+
- Save resources when retrieving descriptors if the characteristic handle is the same as the end handle (no descriptors).
16+
- Subscribing to characteristic notifications/indications will now always use write with response, as per BLE specifications.
17+
- `NimBLEClient::discoverAttributes` now returns a bool value to indicate success/failure.
18+
- Scan result callbacks are no longer called when the scan response data is updated in order to reduce duplicates.
19+
20+
### Added
21+
- Preliminary support for non-esp devices, NRF51 and NRF52 devices supported with [n-able arduino core](https://github.com/h2zero/n-able-Arduino)
22+
- Alias added for `NimBLEServerCallbacks::onMTUChange` to `onMtuChanged` in order to support porting code from original library.
23+
- `NimBLEAttValue` Class added to reduce and control RAM footprint of characteristic/descriptor values and support conversions from Arduino Strings and many other data types.
24+
- Bluetooth 5 extended advertising support for capable devices. CODED Phy, 2M Phy, extended advertising data, and multi-advertising are supported, periodic advertising will be implemented in the future.
25+
526
## [1.3.3] - 2022-02-15
627

728
### Changed

Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ config NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT
4242
messages in the debug log. This will use approximately 1kB
4343
of flash memory.
4444

45-
config NIMBLE_CPP_ENABLE_ADVERTISMENT_TYPE_TEXT
45+
config NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT
4646
bool "Show advertisment types as text in debug log."
4747
default "n"
4848
help

docs/Doxyfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = esp-nimble-cpp
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 1.3.2
41+
PROJECT_NUMBER = 1.4.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
@@ -2267,7 +2267,8 @@ PREDEFINED = _DOXYGEN_ \
22672267
CONFIG_BT_NIMBLE_ROLE_CENTRAL \
22682268
CONFIG_BT_NIMBLE_ROLE_OBSERVER \
22692269
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL \
2270-
CONFIG_BT_NIMBLE_ROLE_BROADCASTER
2270+
CONFIG_BT_NIMBLE_ROLE_BROADCASTER \
2271+
CONFIG_BT_NIMBLE_EXT_ADV
22712272

22722273
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
22732274
# tag can be used to specify a list of macro names that should be expanded. The

docs/Migration_guide.md

Lines changed: 69 additions & 69 deletions
Large diffs are not rendered by default.

docs/index.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ NimBLE is a completely open source Bluetooth Low Energy stack produced by [Apach
1313
It is more suited to resource constrained devices than bluedroid and has now been ported to the ESP32 by Espressif.
1414
<br/>
1515

16-
# Arduino Installation
17-
**Arduino Library manager:** Go to `sketch` -> `Include Library` -> `Manage Libraries` and search for NimBLE and install.
18-
19-
**Alternatively:** Download as .zip and extract to Arduino/libraries folder, or in Arduino IDE from Sketch menu -> Include library -> Add .Zip library.
20-
21-
`#include "NimBLEDevice.h"` at the beginning of your sketch.
22-
23-
Call `NimBLEDevice::init` in `setup`.
24-
25-
Tested and working with esp32-arduino in Arduino IDE and platform IO.
26-
<br/>
27-
2816
# ESP-IDF Installation
2917
### v4.0+
3018
Download as .zip and extract or clone into the components folder in your esp-idf project.
@@ -57,21 +45,6 @@ Also see [Improvements and updates](Improvements_and_updates.md) for information
5745
For more advanced usage see [Usage tips](Usage_tips.md) for more performance and optimization.
5846
<br/>
5947

60-
### Arduino specific
61-
See the Refactored_original_examples in the examples folder for highlights of the differences with the original library.
62-
63-
More advanced examples highlighting many available features are in examples/NimBLE_Server, NimBLE_Client.
64-
65-
Beacon examples provided by [beegee-tokyo](https://github.com/beegee-tokyo) are in examples/BLE_Beacon_Scanner, BLE_EddystoneTLM_Beacon, BLE_EddystoneURL_Beacon.
66-
67-
Change the settings in the nimconfig.h file to customize NimBLE to your project, such as increasing max connections (default is 3).
68-
<br/>
69-
70-
### Arduino command line and platformio
71-
As an alternative to changing the configuration in nimconfig.h, Arduino command line and platformio.ini options are available.
72-
See the command line configuration options available in [Command line config](Command_line_config.md).
73-
<br/>
74-
7548
# Need help? Have a question or suggestion?
7649
Come chat on [gitter](https://gitter.im/NimBLE-Arduino/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link) or open an issue at [NimBLE-Arduino](https://github.com/h2zero/NimBLE-Arduino/issues) or [esp-nimble-cpp](https://github.com/h2zero/esp-nimble-cpp/issues)
7750
<br/>

src/NimBLE2904.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
#include "NimBLE2904.h"
2323

2424

25-
NimBLE2904::NimBLE2904(NimBLECharacteristic* pCharacterisitic)
25+
NimBLE2904::NimBLE2904(NimBLECharacteristic* pCharacteristic)
2626
: NimBLEDescriptor(NimBLEUUID((uint16_t) 0x2904),
2727
BLE_GATT_CHR_F_READ,
2828
sizeof(BLE2904_Data),
29-
pCharacterisitic)
29+
pCharacteristic)
3030
{
3131
m_data.m_format = 0;
3232
m_data.m_exponent = 0;

src/NimBLEAddress.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ std::string NimBLEAddress::toString() const {
156156

157157

158158
/**
159-
* @brief Convienience operator to check if this address is equal to another.
159+
* @brief Convenience operator to check if this address is equal to another.
160160
*/
161161
bool NimBLEAddress::operator ==(const NimBLEAddress & rhs) const {
162162
return memcmp(rhs.m_address, m_address, sizeof m_address) == 0;
163163
} // operator ==
164164

165165

166166
/**
167-
* @brief Convienience operator to check if this address is not equal to another.
167+
* @brief Convenience operator to check if this address is not equal to another.
168168
*/
169169
bool NimBLEAddress::operator !=(const NimBLEAddress & rhs) const {
170170
return !this->operator==(rhs);
@@ -186,7 +186,7 @@ NimBLEAddress::operator std::string() const {
186186

187187

188188
/**
189-
* @brief Convienience operator to convert the native address representation to uint_64.
189+
* @brief Convenience operator to convert the native address representation to uint_64.
190190
*/
191191
NimBLEAddress::operator uint64_t() const {
192192
uint64_t address = 0;

src/NimBLEAdvertisedDevice.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ NimBLEAddress NimBLEAdvertisedDevice::getAddress() {
5252
* @brief Get the advertisement type.
5353
* @return The advertising type the device is reporting:
5454
* * BLE_HCI_ADV_TYPE_ADV_IND (0) - indirect advertising
55-
* * BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD (1) - direct advertisng - high duty cycle
55+
* * BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_HD (1) - direct advertising - high duty cycle
5656
* * BLE_HCI_ADV_TYPE_ADV_SCAN_IND (2) - indirect scan response
57-
* * BLE_HCI_ADV_TYPE_ADV_NONCONN_IND (3) - indirect advertisng - not connectable
57+
* * BLE_HCI_ADV_TYPE_ADV_NONCONN_IND (3) - indirect advertising - not connectable
5858
* * BLE_HCI_ADV_TYPE_ADV_DIRECT_IND_LD (4) - direct advertising - low duty cycle
5959
*/
6060
uint8_t NimBLEAdvertisedDevice::getAdvType() {
@@ -66,7 +66,7 @@ uint8_t NimBLEAdvertisedDevice::getAdvType() {
6666
* @brief Get the appearance.
6767
*
6868
* A %BLE device can declare its own appearance. The appearance is how it would like to be shown to an end user
69-
* typcially in the form of an icon.
69+
* typically in the form of an icon.
7070
*
7171
* @return The appearance of the advertised device.
7272
*/
@@ -308,7 +308,7 @@ std::string NimBLEAdvertisedDevice::getServiceData(const NimBLEUUID &uuid) {
308308

309309

310310
/**
311-
* @brief Get the UUID of the serice data at the index.
311+
* @brief Get the UUID of the service data at the index.
312312
* @param [in] index The index of the service data UUID requested.
313313
* @return The advertised service data UUID or an empty UUID if not found.
314314
*/
@@ -448,7 +448,7 @@ uint8_t NimBLEAdvertisedDevice::getServiceUUIDCount() {
448448

449449

450450
/**
451-
* @brief Check advertised services for existance of the required UUID
451+
* @brief Check advertised services for existence of the required UUID
452452
* @param [in] uuid The service uuid to look for in the advertisement.
453453
* @return Return true if service is advertised
454454
*/
@@ -794,7 +794,7 @@ void NimBLEAdvertisedDevice::setPayload(const uint8_t *payload, uint8_t length,
794794

795795
/**
796796
* @brief Get the length of the advertisement data in the payload.
797-
* @return The number of bytes in the payload that is from the advertisment.
797+
* @return The number of bytes in the payload that is from the advertisement.
798798
*/
799799
uint8_t NimBLEAdvertisedDevice::getAdvLength() {
800800
return m_advLength;

src/NimBLEAdvertising.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ int NimBLEAdvertising::handleGapEvent(struct ble_gap_event *event, void *arg) {
758758
*/
759759
void NimBLEAdvertisementData::addData(const std::string &data) {
760760
if ((m_payload.length() + data.length()) > BLE_HS_ADV_MAX_SZ) {
761-
NIMBLE_LOGE(LOG_TAG, "Advertisement data length exceded");
761+
NIMBLE_LOGE(LOG_TAG, "Advertisement data length exceeded");
762762
return;
763763
}
764764
m_payload.append(data);

src/NimBLEAttValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct Has_c_str_len<T, decltype(void(std::declval<T &>().c_str())),
5454
/**
5555
* @brief A specialized container class to hold BLE attribute values.
5656
* @details This class is designed to be more memory efficient than using\n
57-
* standard container types for value storage, while being convertable to\n
57+
* standard container types for value storage, while being convertible to\n
5858
* many different container classes.
5959
*/
6060
class NimBLEAttValue

0 commit comments

Comments
 (0)