mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2025-12-25 16:18:08 +01:00
Compare commits
22 Commits
release/2.
...
bugfix/onr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ce2eec0cb | ||
|
|
723cdf0a66 | ||
|
|
148087c508 | ||
|
|
88c5d0c7b7 | ||
|
|
a6c03a2aaa | ||
|
|
9df8445241 | ||
|
|
e5f4d52a5a | ||
|
|
7ef247c8db | ||
|
|
c582c8c67e | ||
|
|
74b5c59887 | ||
|
|
60efffdf2b | ||
|
|
b6379848ae | ||
|
|
b29919df96 | ||
|
|
052c0a0455 | ||
|
|
784e6f30fa | ||
|
|
5490cef129 | ||
|
|
459e8c9fcd | ||
|
|
ffa8414747 | ||
|
|
8130f88be8 | ||
|
|
c39e288c3e | ||
|
|
8158a16fbf | ||
|
|
57fe9cb77f |
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user