| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
info in test.
|
| |
|
|
|
|
| |
passing all tests w/ gcc + clang + java17 build
|
|
|
|
| |
147e17b0b41a123b2f4040cbd6df5b73b7e97164)
|
| |
|
|
|
|
|
|
| |
device if not pre-paired
Avoid losing device pairing if performed via Direct-BT in case explicit startDiscovery() purged discovered devices.
|
| |
|
|
|
|
| |
aligned for all cases (C++ and Java, via setSMPKey() or manual)
|
|
|
|
| |
state
|
| |
|
|
|
|
| |
properties: Use irk_resp (copy/paste bug) and SMPIdentityResolvingKey::Property::RESPONDER
|
|
|
|
| |
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
|
|
|
|
| |
Vol 3, Part G GATT: 4.8.2 Read Using Characteristic UUID
|
|
|
|
|
|
|
|
|
|
|
| |
server mode
The actual used security level shall match the required (user-set) level as follows
- Don't care if request is < ENC_ONLY
- If request == ENC_ONLY, actual must be >= ENC_ONLY
- If request >= ENC_AUTH, actual must be >= ENC_AUTH
Here we do ignore ENC_AUTH_FIPS, as not all devices/adapter support it yet.
|
|
|
|
|
|
| |
authentication in server mode; Read-out l2cap's actual sec_level when paired
This state works w/ pairing against an Android phone using Random Private Address and authentication.
|
|
|
|
| |
authentication mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
removed even if disconnect failed (power-off case)
Notable was a failed pairing attempt causing the adapter to reset (power cycle).
The disconnect command was unable to succeed, hence survived in the connected list
and subsequent startAdvertising faild.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
BTAdapter clear resolvable list at 1st init, BTDevice del from resolvable list at disconnect
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
status
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
LE for clarity
|
|
|
|
| |
setDiscoverable() mode change replies
|
|
|
|
| |
subsequent power-off settings w/o toggling power again
|
|
|
|
| |
use it for BTAdapter::startDiscovery() and BTDevice::connectLE()
|
|
|
|
| |
BTDevice::updatePairingState/hciSMPMsgCallback: Clear smp_events after pairing completion
|
|
|
|
| |
zero pin-code array first; Support PinCode throughout BTManager/BTDevice.
|
| |
|
|
|
|
| |
param types and enum types in algebraic expressions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
positive '-Werror=stringop-overflow=' using std::atomic_bool::load()
|
|
|
|
| |
jau::function<void(A...)>
|
| |
|
|
|
|
| |
naming it.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
pull-down to clear all its states instead of just deleting all refs if !active
BTAdapter::poweredOff()'s active argument shall only impact issuing stopDiscoveryImpl().
Without disconnectAllDevices(), non removed devices will have states uncleared,
e.g. isConnected, certain SMP states etc.
|