diff options
author | Sven Gothel <[email protected]> | 2020-07-02 07:46:19 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-07-02 07:46:19 +0200 |
commit | 613fbbef65c4d9593c97fb84d3b6a0e27037f9bf (patch) | |
tree | 4d9088252ea626e516e9344ec0ac05fe4d8f3b9c /api | |
parent | c92aec05cbea8703a23bc5827680dd6e7a787e55 (diff) |
Support BDADDR_LE_RANDOM (p1.2): Map BLERandomAddressType::STATIC_PUBLIC -> RANDOM; L2CAPComm uses device->getAddressType()
Map BLERandomAddressType::STATIC_PUBLIC -> HCILEPeerAddressType::RANDOM
This only works for a static random address not changing at all,
i.e. between power-cycles - hence a temporary hack.
We need to use 'resolving list' and/or LE Set Privacy Mode (HCI) for all devices.
+++
L2CAPComm uses device->getAddressType(), i.e. no need for a (wrong) public argument flag.
Diffstat (limited to 'api')
-rw-r--r-- | api/direct_bt/L2CAPComm.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/api/direct_bt/L2CAPComm.hpp b/api/direct_bt/L2CAPComm.hpp index 0f2e484f..5af7b4c8 100644 --- a/api/direct_bt/L2CAPComm.hpp +++ b/api/direct_bt/L2CAPComm.hpp @@ -68,7 +68,6 @@ namespace direct_bt { const std::string deviceString; const uint16_t psm; const uint16_t cid; - const bool pubaddr; std::atomic<int> _dd; // the l2cap socket std::atomic<bool> isConnected; // reflects state std::atomic<bool> hasIOError; // reflects state @@ -76,7 +75,7 @@ namespace direct_bt { std::atomic<pthread_t> tid_connect; public: - L2CAPComm(std::shared_ptr<DBTDevice> device, const uint16_t psm, const uint16_t cid, const bool pubaddr=true); + L2CAPComm(std::shared_ptr<DBTDevice> device, const uint16_t psm, const uint16_t cid); std::shared_ptr<DBTDevice> getDevice() { return device; } |