| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
passing all tests w/ gcc + clang + java17 build
|
|
|
|
| |
147e17b0b41a123b2f4040cbd6df5b73b7e97164)
|
| |
|
| |
|
| |
|
|
|
|
| |
aligned for all cases (C++ and Java, via setSMPKey() or manual)
|
|
|
|
| |
have full startDiscovery variant use DBGattServerRef default nullptr arg
|
|
|
|
| |
array) with extra capacity and size
|
|
|
|
| |
array)
|
|
|
|
| |
add sendOnly(..) to skip waiting for response
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GATTRole::Client; BTAdapter::startDiscovery() add DBGattServerRef ref
A GattServerHandler(DBGattServer) is also possible for LL master (GATT client) connections
where the server inquires certain data points within the client's GATT.
User can pass DBGattServer to BTAdapter::startDiscovery() to enable the GattServerHandler for such cause.
Test case: Avalun's LabPad device
- DBTLabPadClient01.java
- dbt_labpadclient01.cpp
|
|
|
|
| |
for C++ for general use (commonly used to ctor a DBGattServer)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
utilizing sec_level_server, io_cap_server in server mode
In server mode, pre-set and validated sec_level_server, io_cap_server
are handled as follows:
(1) io_cap_server gets set in the manager before start advertising
and actual when connected at mgmtEvDeviceConnectedHCI() the manager setting
is propagated to the device via notifyConnected()
(2) sec_level_server is also propagated to the device
when connected at mgmtEvDeviceConnectedHCI() via notifyConnected().
It subsequently is set on the L2CAP at BTDevice::processL2CAPSetup()
on the server l2cap connection.
+++
Renamed 'ioCap'* -> 'io_cap'* for readability
as we don't regularly use camel-case for fields here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using RPA/IRK crypto matcher for HCI events (passing RPA)
HCIConnectionRef and BTDevice store both address pairs, naming the potential RPA as 'visibleAddressAndType'.
BTAdapter's findDevice*() method seeks through all device's address first
and if the potential RPA is not found queries each device whether it
matches with its IRK (if existing).
In case the latter is positive, the identity address has been found.
Naturally, to have this work, the adapter (in server mode) needs to upload all
keys to the host adapter to allow resolving as well as instantiating
all devices per key-set.
This concept has already been implemented,
hence the IRK resolution change-set is not too dramatic.
Trial unit tests passed.
|
| |
|
|
|
|
| |
supported, fix DBG_PRINT, add missing declarations
|
|
|
|
| |
id_address), SMPKeyBin storage and host upload, w/ clearing all IRKs on startup
|
|
|
|
| |
Random Address, made available in SMPIdentityResolvingKey and BTDevice
|
|
|
|
| |
using AdapterStatusListener::devicePairingState() + SMPPairingState::PASSKEY_NOTIFY to display generated PassKey
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
read.., set..
NOTE that the following seem not to be supported in Linux/BlueZ:
- LE_READ_PEER_RESOLV_ADDR
- LE_READ_LOCAL_RESOLV_ADDR
The others are coded within BlueZ,
but I received 0x01 UNKNOWN_COMMAND as a HCIStatusCode
Used kernel for analysis:
- bluetooth-next 2022-04-01
- 38a1944deda4d96ca04b9aaa51ee5ae879b61aa0
|
|
|
|
|
|
|
|
| |
API Changes for v3.2.0:
- BTAdapter:
- setPrivacy(bool) added
- initialize() w/o args or default args removed
- initialize(final BTMode btMode, boolean powerOn) added
|
|
|
|
|
|
|
|
|
| |
new-IRK
FIXME: Passing a HCILEOwnAddressType other than PUBLIC for "LE set scan Param"
after setPrivacy(true) via BTManager results in failure.
TBD: Seems like the mngr API and HCI is not aligned or my adapter revolts.
|
|
|
|
| |
setDiscoverable() mode change replies
|
|
|
|
| |
subsequent power-off settings w/o toggling power again
|
|
|
|
| |
use it for BTAdapter::startDiscovery() and BTDevice::connectLE()
|
|
|
|
| |
zero pin-code array first; Support PinCode throughout BTManager/BTDevice.
|
|
|
|
| |
param types and enum types in algebraic expressions
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- AdapterStatusListener
- BTGattHandler::NativeGattCharListener
- DBGattServer::Listener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See also jaulib commit 9160f9a4b74f5e5ae07f715025ea4d3aafdf6ab3
Details:
- Using 'const T&' as method argument type where applicable, i.e. not when required to pass value off-thread.
- Notable: Can also hold a default value!
- Using `const T&` in range-loop where applicable
- Drop std::move for trivial types
- ...
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Details
- Use 'size_type' instead of 'int',
propagate same 'size_type' into 'darray' etc.
- Use 'std::make_shared', 'std::make_unique'
- Use range-based for loops
- Remove redundant 'virtual', use 'override' in derived classes
- Use 'nullptr'
- Use default impl for dtor, ctor (incomplete)
- Use copy and std::move (incomplete)
- Explcitly catch std::bad_alloc in 'new' in 'noexcept' -> 'abort'
- 'abort' was issued implicitly in noexcept methods
- L2CAPServer, L2CAPClient, NopGattServerHandler,
DBGattServerHandler, FwdGattServerHandler
- Use local close_impl(), usable in virtual destructor
- L2CAPClient::read, HCIComm::read
- preset 'poll' result 'n', avoid garbage comparison
- BTAdapter::enableListening
- loop through addMgmtEventCallback() result
- JNI code
- explicit size_type is cast to jsize or jint w/o check
- unchanged semantics
|
|
|
|
| |
vtable-mess; Have all msg creation ctor check range.
|
|
|
|
| |
jau::function<void(A...)>
|
| |
|
|
|
|
|
|
|
| |
argument, allowing BTAdapter::reset() to wait until all devices are disconnected before powering-up again
Waiting for all disconnections within reset after shutdown phase determines the state of all devices
before powering up.
|
|
|
|
| |
getDevicesPausingDiscoveryCount() w/ getConnectedDeviceCount(), both return nsize_t
|
| |
|
|
|
|
|
|
| |
discovery
startDiscoveryBackground() -> discovery_service + discoveryServerWork()
|
|
|
|
| |
always perform off thread BTAdapter::startDiscoveryBackground()
|
| |
|
|
|
|
|
|
| |
is always used with value 'true'
Hence BTAdapter::startDiscoveryBackground() is always started off-thread.
|
|
|
|
| |
Missing: FreeBSD kernel BT functionality (currently just aborts)
|
|
|
|
| |
5.9 (Ubuntu 20.04), tolerate it.
|
|
|
|
| |
== ( mask & bit )`
|