forked from h2zero/esp-nimble-cpp
Compare commits
18 Commits
bugfix/onr
...
release/2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec5600d40b | ||
|
|
bc3e342046 | ||
|
|
865ec9f760 | ||
|
|
e2de3f6268 | ||
|
|
bdb86274c9 | ||
|
|
8aa824ef32 | ||
|
|
cc7f97a37d | ||
|
|
8723121ff9 | ||
|
|
90b721ed55 | ||
|
|
d1ef98a4c8 | ||
|
|
70eee888eb | ||
|
|
80b61ffa3d | ||
|
|
ee895d386e | ||
|
|
5add3442e9 | ||
|
|
aea55ccda2 | ||
|
|
83e9919457 | ||
|
|
edeaf3977a | ||
|
|
4e80e1ee38 |
@@ -844,7 +844,7 @@ bool NimBLEDevice::init(const std::string& deviceName) {
|
||||
if (!m_initialized) {
|
||||
# ifdef ESP_PLATFORM
|
||||
|
||||
# if defined(CONFIG_ENABLE_ARDUINO_DEPENDS) && SOC_BT_SUPPORTED
|
||||
# ifdef CONFIG_ENABLE_ARDUINO_DEPENDS
|
||||
// make sure the linker includes esp32-hal-bt.c so Arduino init doesn't release BLE memory.
|
||||
btStarted();
|
||||
# endif
|
||||
|
||||
@@ -620,10 +620,13 @@ 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 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);
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
|
||||
ble_npl_hw_enter_critical();
|
||||
|
||||
Reference in New Issue
Block a user