22 Commits

Author SHA1 Message Date
h2zero
9ce2eec0cb 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-03-14 10:57:55 -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
h2zero
60efffdf2b [BugFix] Provide default task data when retrieving all descriptors.
* Update the descriptor filter when trying again with different UUID sizes.
2025-02-08 15:08:32 -07:00
thekurtovic
b6379848ae change(2904|AdvData): Add missing parameter name in declarations 2025-02-05 15:15:49 -07:00
thekurtovic
b29919df96 feat(Device): Implement store status handler 2025-02-05 15:14:42 -07:00
thekurtovic
052c0a0455 feat(AdvDevice): Add convenience operator to NimBLEAddress 2025-02-05 14:07:10 -07:00
thekurtovic
784e6f30fa Merge pull request #301 from thekurtovic/feat-log-condition
feat(Log): Add macros for conditional log print and rc handling
2025-01-28 14:59:53 -05:00
thekurtovic
5490cef129 feat(Log): Add macros for conditional log print and rc handling 2025-01-28 13:40:19 -05:00
h2zero
459e8c9fcd Release 2.1.1 2025-01-26 18:23:11 -07:00
thekurtovic
ffa8414747 refactor(RemoteChar): Reduce nesting
* Renamed desc_filter_t to NimBLEDescriptorFilter
* Added NimBLERemoteDescriptor pointer to NimBLEDescriptorFilter
* retrieveDescriptors changed to take NimBLEDescriptorFilter pointer
* General cleanup
2025-01-26 11:28:48 -07:00
h2zero
8130f88be8 Rename config macros to enable duplicate scan options on s3/c3 2025-01-26 11:09:36 -07:00
h2zero
c39e288c3e Workaround for P4 CI build error. 2025-01-26 09:41:25 -07:00
Guo-Rong
8158a16fbf Fix characteristic discovery with no descriptors.
Avoid discovery of descriptors if there are no handles remaining.
2025-01-15 18:37:47 -07:00
h2zero
57fe9cb77f Release 2.1.0 2025-01-12 19:17:10 -07:00
2 changed files with 5 additions and 8 deletions

View File

@@ -844,7 +844,7 @@ bool NimBLEDevice::init(const std::string& deviceName) {
if (!m_initialized) {
# ifdef ESP_PLATFORM
# ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
# if defined(CONFIG_ENABLE_ARDUINO_DEPENDS) && SOC_BT_SUPPORTED
// make sure the linker includes esp32-hal-bt.c so Arduino init doesn't release BLE memory.
btStarted();
# endif

View File

@@ -620,13 +620,10 @@ int NimBLEServer::handleGattEvent(uint16_t connHandle, uint16_t attrHandle, ble_
switch (ctxt->op) {
case BLE_GATT_ACCESS_OP_READ_DSC:
case BLE_GATT_ACCESS_OP_READ_CHR: {
// Don't call readEvent if this is an internal read (handle is NONE)
if (connHandle != BLE_HS_CONN_HANDLE_NONE) {
// If the packet header is only 8 bytes then this is a follow up of a long read
// so we don't want to call the onRead() callback again.
if (ctxt->om->om_pkthdr_len > 8 || val.size() <= (ble_att_mtu(connHandle) - 3)) {
pAtt->readEvent(peerInfo);
}
// Don't call readEvent if the buffer len is 0 (this is a follow up to a previous read),
// or if this is an internal read (handle is NONE)
if (ctxt->om->om_len > 0 && connHandle != BLE_HS_CONN_HANDLE_NONE) {
pAtt->readEvent(peerInfo);
}
ble_npl_hw_enter_critical();