diff options
author | Sven Gothel <[email protected]> | 2020-11-15 07:47:26 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-11-15 07:47:26 +0100 |
commit | ea07c8872d931f2949b5900e7389aee3fd204866 (patch) | |
tree | 6d28aebd947972c43f08824fbee55aff67e74c71 /api/direct_bt/DBTDevice.hpp | |
parent | 94279b636cb59e27307656604edb77733c62d944 (diff) |
AdapterStatusListener add deviceReady(..) giving a clear 'start to use' event; Wire HCI LE_REMOTE_USER_FEATURES -> DBTDevice; ..
- DBTAdapter/Device: updatePairingStateAndMode() -> updatePairingState(), simplifying locked access
- DBTDevice::notifyConnected: Set BT_SECURITY w/ a sec_level on l2cap_att socket
- hciSMPMsgCallback:
-- FAIL: reopen l2cap_att (remove security settings) and try without security/encryption
-- issue deviceReady(..) if appropriate
- Adapt dbt_scanner10 example to deviceReady(..)
- TODO:
-- AdapterStatusListener::deviceReady(..) forwarding to Java
-- Validate GATT operation on encryption
Diffstat (limited to 'api/direct_bt/DBTDevice.hpp')
-rw-r--r-- | api/direct_bt/DBTDevice.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/api/direct_bt/DBTDevice.hpp b/api/direct_bt/DBTDevice.hpp index 38472e02..8761255a 100644 --- a/api/direct_bt/DBTDevice.hpp +++ b/api/direct_bt/DBTDevice.hpp @@ -121,7 +121,7 @@ namespace direct_bt { */ bool connectGATT() noexcept; - void updatePairingStateAndMode(SMPPairingState state, PairingMode mode) noexcept; + bool updatePairingState_locked(SMPPairingState state, PairingMode& current_mode) noexcept; /** * Forwarded from HCIHandler -> DBTAdapter -> this DBTDevice @@ -157,6 +157,12 @@ namespace direct_bt { */ void processNotifyConnected(); + /** + * Will be performed after connectLE(..) via notifyConnected() or after pairing via hciSMPMsgCallback(..), + * issuing connectGATT() off thread. + */ + void processDeviceReady(std::shared_ptr<DBTDevice> sthis, const uint64_t timestamp); + public: const uint64_t ts_creation; /** Device mac address */ |