2
0
Fork 0
mirror of https://github.com/h2zero/esp-nimble-cpp.git synced 2025-01-06 09:44:34 +01:00
Commit graph

399 commits

Author SHA1 Message Date
h2zero
fa468d360a Release 2.0.3 2025-01-05 15:11:08 -07:00
h2zero
2759b1b69d Increase timeout paramter in server example. 2025-01-05 14:31:43 -07:00
h2zero
1a0b7a8e31 Add missing migration information to docs. 2025-01-05 14:24:28 -07:00
thekurtovic
1d01af0f8c NimBLEAdvertisementData emit error on failure, remove magic numbers. 2025-01-05 09:23:32 -07:00
h2zero
f7d3c5e0c2 Fix characteristic value unable to be updated in callback 2025-01-05 08:57:01 -07:00
h2zero
bc2bc35a8a Fix advertising data not set if scan response enabled later. 2025-01-05 08:56:57 -07:00
thekurtovic
15cb6bc7c6 Add checks in case NIMBLE_CPP_DEBUG_ASSERT is not defined. 2025-01-04 15:20:01 -07:00
afpineda
aae70dfd21 Allow the same report ID in multiple input/output/feature reports 2025-01-04 15:16:01 -07:00
h2zero
ad12a48e9e Fix build error when using platformio library 2025-01-02 08:29:44 -07:00
thekurtovic
09297fb72a NimBLEScan increment m_callbackSent before callback.
Fixes heap corruption observed on CONFIG_HEAP_POISONING_COMPREHENSIVE.
2025-01-02 08:29:17 -07:00
h2zero
b50a1b50b1 Release 2.0.2 2024-12-21 17:04:48 -07:00
h2zero
954ba0b5a7 Update Changelog 2024-12-21 16:05:38 -07:00
h2zero
015217c764 Fix compile error for advertiser only config. 2024-12-21 15:47:13 -07:00
thekurtovic
9a1ae677b8 NimBLELog allow custom log level colors. 2024-12-20 13:32:34 -07:00
afpineda
6ee5174ba0 Fix NimBLEHIDDevice not being able to create more than one in/out/feature report + temporal coupling 2024-12-20 13:29:50 -07:00
William Emfinger
e843c6811c Fix crash that could occur when server reconnects
* Update to not change services if they have not actually changed when starting the server
Closes 
2024-12-20 13:25:00 -07:00
h2zero
0d13044703 Release 2.0.1 2024-12-16 18:35:21 -07:00
h2zero
cfca3e7500 Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h
In some cases compilation of examples would fail due to missing these headers so they should be included in NimBLEDevice.h
2024-12-15 14:15:16 -07:00
h2zero
3c80c950ae Update changelog. 2024-12-15 10:06:39 -07:00
Ryan Powell
182e3bb8a3 Fix NimBLEHIDDevice output report returning incorrect characteristic. ()
The input and output report characteristics share the same UUID and the `getOutputReport` was returning the input report characteristic.
This change will return the correct characteristic by finding it with the index parameter.
2024-12-15 10:02:47 -07:00
mr258876
a627007a31 Fix compiling errors when central is disabled.
* Fix missing member error 'm_pClient' in NimBLEServer
2024-12-15 09:35:28 -07:00
h2zero
a6ed1933bc Release 2.0.0 2024-12-14 16:25:52 -07:00
h2zero
675d6bbf0d [BREAKING] Remove NimBLEAddress type default value.
When constructing a NimBLEAddress via string or other non `ble_addr_t` parameters it is important that the address type be specified.
This will help prevent issues where applications are not able to connect or identify scanned devices when comparing their addresses.
2024-12-14 13:56:50 -07:00
h2zero
8753782425 Fix example 2024-12-13 21:25:27 -07:00
h2zero
af1872623e Silence compiler warnings 2024-12-13 15:25:07 -07:00
h2zero
62de1b23fa Add library.json
* Add fields for idf registry
2024-12-13 12:06:45 -07:00
h2zero
57e583c17a [BREAKING] Refactor NimBLELog
* Cleanup style.
* Remove NIMBLE_LOGC as it's use was limited to assertions.
* Add delay after assert printf to allow time to display the message.
2024-12-13 12:06:07 -07:00
h2zero
5afb5af81e Update license 2024-12-12 20:41:04 -07:00
h2zero
2d1e33a75e Prepare for v2 release 2024-12-12 08:46:42 -07:00
h2zero
152cc9d1b9 Fixup client logs 2024-12-10 19:04:47 -07:00
h2zero
09e8eede94 Fixup server logs 2024-12-10 14:11:35 -07:00
h2zero
49769f4aeb Update examples 2024-12-10 13:15:43 -07:00
h2zero
e4d2e991f1 Fix crash when peer disconnects from the server.
If the server has not created a client instance then the device would crash when the peer disconnects due to nullptr access.
2024-12-09 09:54:47 -07:00
h2zero
6d10f2f88f [BREAKING] - Refactor NimBLEHIDDevice
* General code cleanup.
* All functions that return a characteristic or service have been renamed to have a `get` prefix to better represent their function.
* All functions that set a value have been renamed with the prefix `set` to better represent their functionality.
* Added an `bool notify` parameter to `setBatteryLevel`, which if `true`, will send a notification of the value to the peer.
2024-12-08 17:02:17 -07:00
h2zero
a874e502c5 Update doxygen 2024-12-08 15:44:39 -07:00
h2zero
0c22666e51 Remove improvements and updates.
Removed as the changelog contians the notes and the class info has the details.
2024-12-08 15:44:39 -07:00
h2zero
eba6d8bfbb Update migration guide 2024-12-08 15:44:39 -07:00
h2zero
0e5eb9c55f 1.x to 2.x migration guide 2024-12-08 15:44:39 -07:00
h2zero
45db17f948 Update changelog 2024-12-08 15:44:39 -07:00
h2zero
c547733194 Remove NimBLEServer::getPeerNameOnConnect
With the implementation of the NimBLEServer::getClient function this is now redundant.
2024-12-05 16:03:33 -07:00
h2zero
ac3d3575cc Add support for creating a NimBLEClient from a NimBLEServer peer.
This allows the NimBLEServer instance to create a NimBLEClient instance to read/write form/to a connected peer.
Only one instance is supported subsequent calls will overwrite the previous client connection information and data.
2024-12-05 16:03:33 -07:00
h2zero
a55489fee2
Add a workaround for esp32s3 and esp32c3 tx power bug ()
* Add a workaround for esp32s3 and esp32c3 tx power bug

This adds a workaround to get the tx power when the function returns error due to a bug introduced in some versions of esp-idf.

* Added error checking, return value will be 0xFF if there was an error.
2024-12-04 10:46:33 -07:00
h2zero
b5b46661e0
Fix compilation with esp32p4 () 2024-12-03 08:47:41 -07:00
thekurtovic
6c85cfa6c3
NimBLEDevice::get/setPower support full power range. ()
* Calculates the tx power level to and from dbm to `esp_power_level` types for esp32 devices.
* Add esp32 specific funtions `NimBLEDevice::setPowerLevel` and `NimBLEDevice::getPowerLevel` which take and return the related `esp_power_level* ` types.

---------

Co-authored-by: h2zero <powell.rg@gmail.com>
2024-12-02 15:19:44 -07:00
thekurtovic
15392bf581 Add asynchronous client connection secure
* Adds parameter `rcPtr` to `NimBLEDevice::startSecurity`, default value works as the original method.
* * `rcPtr`: if not nullptr, will allow caller to obtain the internal return code.
* Adds parameter `async` to `NimBLEClient::secureConnection`, default value works as the original method.
* * `async`; if true, will send the secure command and return immediately with a true value for successfully sending the command, else false.
2024-12-02 09:54:18 -07:00
h2zero
e0fe1668de [BREAKING] - Refactor NimBLEEddystoneTLM
* `NimBLEEddystoneTLM::BeaconData` struct is now public and usable by the application.
* `NimBLEEddystoneTLM::setTemp` now takes an `int16_t` parameter instead of float to be friendly to devices without floating point support.
* `NimBLEEddystoneTLM::getTemp` now returns `int16_t` to work with devices that don't have floating point support.
* `NimBLEEddystoneTLM::setData` now takes a reference to * `NimBLEEddystoneTLM::BeaconData` instead of `std::string`.
* `NimBLEEddystoneTLM::getData` now returns a reference to * `NimBLEEddystoneTLM::BeaconData` instead of `std::string`.
2024-12-01 16:00:44 -07:00
h2zero
308b81e81a [BREAKING] Remove Eddystone URL
Removed Eddystone URL as it has been shutdown by google since 2021.
2024-12-01 16:00:28 -07:00
h2zero
36d27a2413 [BREAKING] Refactor NimBLEBeacon
* General code cleanup
* The internal data struct type `BeaconData` is now public and can be used by the application.
* `NimBLEBeacon::setData` now takes `const NimBLEBeacon::BeaconData&` instead of `std::string`.
* Added overload for `NimBLEBeacon::setData` that takes a pointer to raw `uint8_t` data and length`.
* `NimBLEBeacon::getData` now returns `const NimBLEBeacon::BeaconData&` instead of `std::string`.
2024-12-01 16:00:10 -07:00
h2zero
ecf1adc4d7 Fix compiler warnings for C++ versions < 17 2024-12-01 14:19:51 -07:00
h2zero
b4fe046c56 Refactor 2904 descriptor
* General code cleanup.
* Added method `NimBLECharacteristic::create2904` which will specifically create a CPF(0x2904) descriptor.
2024-11-30 14:21:39 -07:00