Commit Graph

470 Commits

Author SHA1 Message Date
h2zero 9f7b9042e0 Fix docs build 2025-09-02 14:36:02 -06:00
h2zero 2cd5dc2aa2 Fix build with idf v5.5+ and specific roles are defined. 2025-08-25 09:11:13 -06:00
h2zero 9df8cc7dd1 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-08-24 16:35:38 -06:00
iranl 88df909cfb 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-08-24 16:07:59 -06:00
h2zero 8cefc0a562 [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-08-01 17:08:44 -06:00
h2zero 8af38e7eb9 Change default security settings to BLE secure connections off.
Fixing some connection issues when enabled, users should enable if desired.
2025-06-27 18:08:42 -06:00
h2zero e7fead903c [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-06-27 18:07:46 -06:00
h2zero a57c45e1de Fix build with idf versions < 5.x 2025-06-27 18:07:41 -06:00
h2zero edfc838bef [Bugfix] allow peripheral and central roles without broadcast/scan. 2025-06-20 10:41:28 -06:00
h2zero f1ead9959d Bump idf_component version 2025-06-11 11:40:42 -06:00
h2zero b30421c19d Fix library.json version 2025-06-11 11:34:10 -06:00
h2zero bdb868d125 Release 2.3.1 2.3.1 2025-06-11 11:14:52 -06:00
h2zero 503939c66f Update docs 2025-06-11 11:11:58 -06:00
Larry Davis 2640c44b45 Support passing data directly from NimBLEBeacon.getData() to NimBLEAdvertisementData.setManufacturerData() 2025-06-11 11:11:11 -06:00
h2zero fec2d7a279 [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-09 17:13:30 -06:00
h2zero e2cee2d994 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-09 17:13:12 -06:00
h2zero 39f974625c Fix builds when exluding roles 2025-06-02 18:06:40 -06:00
John Boiles 169290f047 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-05-21 11:14:43 -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
h2zero a6c03a2aaa Release 2.2.1 2025-02-28 09:51:31 -07:00
h2zero 9df8445241 [Bugfix] Check if remote descriptor vector has increased. 2025-02-25 17:08:01 -07:00
h2zero e5f4d52a5a Update changelog 2025-02-25 14:26:57 -07:00
h2zero 7ef247c8db Partially revert Commit 052c0a04 to restore client connect with device parameter. 2025-02-25 14:23:25 -07:00
h2zero c582c8c67e Release 2.2.0 2025-02-24 17:58:21 -07:00
William Emfinger 74b5c59887 fix(NimBLEDevice): fix crash when pairing table is full
* Add missing definition for default device callbacks (which prevents calling the `setDeviceCallbacks` method)
* Ensure `m_pDeviceCallbacks` inital value is set to `&defaultDeviceCallbacks` to prevent crash when pairing table is full

After #295 any time the pairing table fills up, the device will crash on the next pairing attempt.
2025-02-13 06:58:54 -07:00