476 Commits

Author SHA1 Message Date
h2zero
815c5556e0 Release 2.3.3 2.3.3 2025-09-05 16:11:57 -06:00
h2zero
14f8737c41 Support up to 1650 bytes of advertisement with extended advertising. 2025-09-05 16:11:54 -06:00
h2zero
5b4e4bd7dc [Bugfix] Extended advertisements not reporting full data.
Extended advertisement reports would be truncated incorrectly as the handler was not checking the data status.

Correct advertisement length and set status on update.
2025-09-05 16:11:51 -06:00
h2zero
91f9b979d4 [Bugfix] NimBLEAdvertisedDevice::isConnectable incorrect result 2025-09-05 16:11:49 -06:00
h2zero
f80605aff8 Release 2.3.2 2.3.2 2025-09-02 14:54:56 -06:00
h2zero
e26c7406fb Improve macros for code enablement 2025-09-02 14:42:46 -06:00
h2zero
a547f2529a Fix docs build 2025-09-02 14:42:42 -06:00
h2zero
ad145ad503 Fix build with idf v5.5+ and specific roles are defined. 2025-09-02 14:42:40 -06:00
h2zero
ecc617f9eb Refactor to use MYNEWT_VAL macros.
This replaces the previously prefixed CONFIG_BT_X config macros with the underlying MYNEWT_VAL_X config macros that they affected.
2025-09-02 14:42:38 -06:00
iranl
485a01b78c Fix undefined reference to ble_svc_gap_device_name_set when GATT server is disabled (#349)
* Fix undefined reference to ble_svc_gap_device_name_set when GATT server is disabled

* Do not affect ESP-IDF <5.5.0
2025-09-02 14:42:32 -06:00
h2zero
f0ca3bf35d [Bugfix] OnConnectfail not called when connection not established.
Workaround for when the disconnect event is sent when no connection has been established.
Espressif changed this from a connect event with error code to disconnect event.
2025-09-02 14:42:30 -06:00
h2zero
ac55482b18 Change default security settings to BLE secure connections off.
Fixing some connection issues when enabled, users should enable if desired.
2025-09-02 14:42:28 -06:00
h2zero
8b9e430e5b [Bugfix](workaround) OnConnect not being called.
Upstream changes have resulted in a possible status of BLE_ERR_UNSUPP_REM_FEATURE, this resulted in the onConnect callback not being called despite the connection actually being created.
This works around that bug to ensure that the connections are correctly tracked.
2025-09-02 14:42:26 -06:00
h2zero
6da9905235 Fix build with idf versions < 5.x 2025-09-02 14:42:23 -06:00
h2zero
18cc463c2c [Bugfix] allow peripheral and central roles without broadcast/scan. 2025-09-02 14:42:21 -06:00
h2zero
e7a1462a99 Bump idf_component version 2025-06-11 11:40:56 -06:00
h2zero
9e141c9f58 Fix library.json version 2025-06-11 11:34:26 -06:00
h2zero
e5dbd26693 Release 2.3.1 2025-06-11 11:16:49 -06:00
h2zero
2272e3c4a7 Update docs 2025-06-11 11:16:46 -06:00
Larry Davis
8c6a9d4258 Support passing data directly from NimBLEBeacon.getData() to NimBLEAdvertisementData.setManufacturerData() 2025-06-11 11:16:42 -06:00
h2zero
e4d202f1ce [Bugfix] NimBLEScan delete.
Calling NimBLEDevice::deint with the `clearAll` parameter set to `true` will delete the scan and any scan results but it was calling `clearall` which uses critical sections, this could cause a crash because the stack has already been de-initialized.
2025-06-11 11:16:38 -06:00
h2zero
20349d9e8b Fix server client read/write not returning when encryption is used.
When the client created by the server reads or writes to an attribute and it triggers a pairing action the task will not be released because the client does not get the event.
This passes the event to the client to prevent the task from being hung.
2025-06-11 11:16:35 -06:00
h2zero
96c142034e Fix builds when exluding roles 2025-06-11 11:16:22 -06:00
John Boiles
252b4f5644 Allow esp_wifi_remote >= 0.5.3
`esp_wifi_remote` >= v0.10.0 is necessary to use esp-nimble-cpp with the latest ESP-IDF master branch.
2025-06-11 11:16:16 -06:00
h2zero
067274973d Release 2.3.0 2.3.0 2025-05-19 16:54:59 -06:00
h2zero
30877344bd Add support for esp32c5 2025-05-19 14:50:28 -06:00
h2zero
68dd0b37b5 [Bugfix] Attribute getValue fails with some data types 2025-05-19 14:28:53 -06:00
h2zero
e615deb1af Add Scan duplicate cache reset time feature.
Adds the ability to set a time for the scan duplicate filter cache to reset which will start reporting devices previously seen again.
2025-05-19 13:21:26 -06:00
h2zero
e29d1ce3cf Refactor L2Cap (style) 2025-05-05 18:30:37 -06:00
h2zero
a5702746c5 Add missed pointer parameter to const ref fix 2025-05-05 18:11:01 -06:00
h2zero
f8e8830112 [Bugfix] Incorrectly passing a pointers to a funtion taking const reference
Passing a pointer to to NimBLEUtils::taskWait and NimBLEUtils::taskRelease would compile due to the first argument in the constructor being
a pointer to void, a surprisingly not a compiler error in this instance. Also does not cause a crash but instead a hung task when called.
2025-05-05 18:06:34 -06:00
h2zero
80def6663b Fix preprocessor statement 2025-05-05 14:38:26 -06:00
h2zero
7a8d10bb71 Set max connections correctly for esp32s3/c3 2025-05-05 14:38:26 -06:00
h2zero
ce1b8bc2ec Fix build with non-esp devices 2025-05-05 14:38:07 -06:00
h2zero
dadbc0d423 [Bugfix] Correct NimBLEClient array initialization. 2025-05-03 15:00:43 -06:00
h2zero
da31f90436 Fix build when host based privacy is enabled without connection roles 2025-05-03 14:59:24 -06:00
Dr. Michael Lauer
e55ad9019c Introduce L2CAP infrastructure.
L2CAP is the underlying technology powering GATT.
BLE 5 exposes L2CAP COC (Connection Oriented Channels)
allowing a streaming API that leads to much higher throughputs
than you can achieve with updating GATT characteristics.

The patch follows the established infrastructure very closely.
The main components are:

- `NimBLEL2CAPChannel`, encapsulating an L2CAP COC.
- `NimBLEL2CAPServer`, encapsulating the L2CAP service.
- `Examples/L2CAP`, containing a client and a server application.

Apart from these, only minor adjustments to the existing code was
necessary.
2025-04-28 10:54:32 -06:00
h2zero
59e111ab55 Allow PHY updates without enabling extended advertising. 2025-04-25 09:07:23 -06:00
h2zero
e00dd88add [Bugfix] notify/indicate incorrectly returning success with custom value
When sending an array of data with a length value the wrong overload/template was being
used and the length value was being interpreted as the connection handle.

This updates the template to disable it when an array is passed and will now also report the error.
2025-04-24 17:08:19 -06:00
h2zero
e18d78678f [Bugfix] Explicit getValue template returning nil value with convertable types. 2025-04-24 17:07:42 -06:00
h2zero
54ec3f4c92 [Bugfix] Clear attribute value when zero length value is written. 2025-04-24 17:07:20 -06:00
thekurtovic
9ac9551a2b fix(Utils): Update gapEventToString switch case 2025-04-22 16:08:57 -06:00
h2zero
0172cb4b39 Only ignore scan discovery events when scan is stopped. 2025-04-14 08:52:32 -06:00
h2zero
856adebad5 Fix potential exception when scan is restarted.
If the scan is restarted in NimBLEScan::start, there is a chance that a result from
the previous scan arrives and the device is deleted when the callback is called.
This change ignores any results that come when the scan has stopped.
2025-04-14 08:39:28 -06:00
h2zero
033c7c27ad Fix extended server example - data too long error 2025-04-13 16:06:34 -06:00
h2zero
d134276d2d Bugfix - Characteristic onRead callback not called.
Fixes detection of the original read request vs a followup read for characteristic values greater than MTU - 3.
2025-04-13 15:13:53 -06:00
h2zero
01976cec54 [Bugfix] Incorrect onSubscribe value when indications are set. 2025-03-28 16:56:54 -06:00
Ryan Powell
723cdf0a66 Merge pull request #312 from iranl/patch-3
Fix ESP32-P4 compile when using Arduino as an ESP-IDF component
2025-03-10 18:30:44 -06:00
iranl
148087c508 Fix ESP32-P4 compile when using Arduino as an ESP-IDF component 2025-03-02 21:46:34 +01:00
h2zero
88c5d0c7b7 Bump docs version 2025-02-28 14:56:46 -07:00