BLE Library onRead Callback fix and Client disconnect feature (#2913)

* BLEServer::disconnect()

* Invoke Read callback first, to make data update possible before read
This commit is contained in:
Roman Savrulin
2019-07-09 19:35:07 +03:00
committed by Me No Dev
parent e1548e9b7e
commit 05de017bd5
3 changed files with 10 additions and 4 deletions

View File

@ -412,4 +412,9 @@ void BLEServer::updateConnParams(esp_bd_addr_t remote_bda, uint16_t minInterval,
conn_params.timeout = timeout; // timeout = 400*10ms = 4000ms
esp_ble_gap_update_conn_params(&conn_params);
}
void BLEServer::disconnect(uint16_t connId) {
esp_ble_gatts_close(m_gatts_if, connId);
}
#endif // CONFIG_BT_ENABLED