| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
toString() only shows the set EIRDataType
|
| |
|
|
|
|
|
|
|
| |
setConnSecurity() and setConnSecurityAuto() only
Also revert change allowing BTDevice::setConnSecurity*(..) on connected devices, IF BTAdapter is server,
i.e. method must be called pre-connection notification (commit f4118b41672c17b2f0845ea9a23c87cfaa04cf39).
|
| |
|
|
|
|
|
|
|
|
|
| |
EIRDataType[Set] AD masks ..
.. allowing user to detail actual EIR AD (extended information advertising) instead of using the default.
This is required to programmatically setup specific advertising information
of the created server.
|
|
|
|
| |
range; Add Java GAPFlags mapping.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTAdapter::removeDevicePausingDiscovery() and getCurrentDiscoveryPolicy()
Using a weak_ptr<BTDevice> list avoid stopping BTDevice destruction.
BTAdapter::removeDevicePausingDiscovery() allows manual DiscoveryPolicy intervention point,
allowing user to remove the ready device from the queue of pausing-discovery devices.
Manual intervention might be desired, if using DiscoveryPolicy::PAUSE_CONNECTED_UNTIL_DISCONNECTED,
but allowing discovery at an earlier processing step from AdapterStatusListener::deviceReady().
+++
Further added removeDevicePausingDiscovery() call in BTAdapter::removeDevice() as a last resort.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
discovery-off and detailed 'keep alive' options
API change (earmark version 2.5.0):
- AdapterStatusListener::discoveringChanged()
- BTAdapter::startDiscovery()
BTAdapter::startDiscovery() takes DiscoveryPolicy instead of bool keep_alive,
allowing fine tuned discovery keep-alive policy
and covering HCI host OS's implied discovery turn-off when connected (BlueZ/Linux).
dbt_scanner10.cpp and DBTScanner10.java covery the new DiscoveryPolicy
and user may pass its integer value via '-discoveryPolicy <0-4>'.
These example were further adjusted as follows:
- Removed WHITELIST variation of connection w/o discovery,
cleaning up and simplifying example code
- Remove manual start- and stopDiscovery() handling,
ending up in a single startDiscovery() call @ init (and power-on).
|
|
|
|
| |
Java: Same, but no default value possible (minor API change)
|
|
|
|
| |
DBGattServer.[add|remove]Listener(..)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
org.direct.bt.DBGattServer.Listener callbacks
Finally bringing JavaUplink back, sorry for the earlier confusion of removing them.
However, this commit better shows the C++/Java connection used here.
The JavaUplink is used at manually ctor of the native counterpart from the Java object,
as they will also dtor the native instance.
This w/o DBTNativeDownlink, since we pass arguments directly for the native ctor.
On the java side, close() properly synchronizes the atomic volatile nativeInstance swap,
avoiding data races.
|
|
|
|
|
|
|
|
|
| |
jau::InternalError(..), remove dead code
Also:
- Use jau::search_field(..) instead of copied-code
- Use BTDeviceRef, instead of std::shared_ptr<BTDevice> (same)
-
|
|
|
|
| |
BTAdapter held reference on disconnect, align ref holding in Java BTAdapter; Add explicit shutdown test
|
|
|
|
| |
Java side.
|
|
|
|
| |
length -> Skip sending and return true
|
|
|
|
|
|
|
|
|
|
| |
DBGatt[Server|Service|Char|Desc] to Java ; BTAdapter.startAdvertising(..) Adds DBGattServer arg
- Implementation is not yet functional, i.e. types are not yet mapped to native instance.
- DBGattChar and DBGattDesc value currently just a 'byte[]' and lacks capacity:
- Its capacity defines the maximum writable variable length
- and its size defines the maximum writable fixed length.
|
|
|
|
| |
_characteristicClazzCtorArgs
|
|
|
|
| |
getGattServices(); connect() -> connectDefault()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To have full SMP key persitency in peripheral slave mode,
BTAdapter requires fine grained control over
- Passing stored keys to BTDevice's PairingData (w/o uploading them)
- Uploading BTDevice's PairingData to the adapter
This required interaction in certain places,
only enabled if adapter is BTRole::Slave (peripheral):
- BTAdapter::mgmtEvDeviceConnectedHCI()
Only issue unpairDevice() if not pre-paired.
Unpairing is required for new pairing to avoid DHKey Check failures!
- BTAdapter::mgmtEvDeviceDisconnectedHCI()
- First unpairDevice() will be issued via notifyDisconnect()
- Set and upload stored keys for disconnected device (if existing),
preparing for next connect.
- BTAdapter::sendDevicePairingState()
- SMPPairingState::COMPLETED && not SMPPairingState::PRE_PAIRED: Store keys
- SMPPairingState::COMPLETED && SMPPairingState::PRE_PAIRED: Refresh keys to BTDevice (set), no upload!
- SMPPairingState::FAILED: Remove and delete keys
+++
BTAdapter::setSMPKeyPath(path) allows user to enable the persistent key storage
by setting its local filesystem path.
It will also read all key files (SMPKeyBin) and if valid and matching with the adapter,
uploads them for pre-pairing.
See dbt_peripheral00.cpp:
adapter->setSMPKeyPath(ADAPTER_KEY_PATH);
+++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uploading keys (required for peripheral BTAdapter key management)
SMPKeyBin has the key apply action revoked.
SMPKeyBin is reduced to store keys, address and security settings,
as well adding persistence (read/write to filesystem).
BTDevice::setSMPKeyBin(SMPKeyBin&) shall be used copy the key data over
and BTDevice::uploadKeys() to upload them to the adapter for pre-pairing.
See dbt_scanner10.cpp's use of convenient API (same efficiency as before)
device->uploadKeys(KEY_PATH, req_sec_level, true /* verbose_ */);
BTDevice::setSMPKeyBin(SMPKeyBin&) fully restored BTDevice's PairingData
- keys
- key caps
- user security level and IOCaps
+++
The reduced 'set<Name>Key(..)' methods only
- copy the key to BTDevice's PairingData
- set the KeyType bit for keys_<role>_[init|resp], fully restoring key caps
|
| |
|
|
|
|
| |
Expose SMPIdentityResolvingKey (IRK) adding get/set methods; Add setSignatureResolvingKey();
|
|
|
|
| |
peripheral with legacy mode
|
|
|
|
|
|
| |
descriptor)
GattDesc.cpp: Convert TYPE* to std::shared_ptr<jau::uuid_t> (missed in prev commit)
|
|
|
|
| |
incl connectable)
|
|
|
|
| |
objects for the Gatt Server database
|
|
|
|
|
|
| |
uuid_t
Equality and compare of uuid_t shall always be performed on uuid128_t if underlying types differ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Origins'
Removed remaining TinyB API artifacts:
- BTType.java and related search functions (class_type())
- Java's clone()
- BTManager's device/gatt functionality, only covers adapter.
+++
Direct-BT originated from TinyB.
Major TinyB autors were:
- Andrei Vasiliu <[email protected]>
- Petre Eftime <[email protected]>
TinyB Copyright (c) 2016 Intel Corporation.
With the removal of TinyB from Direct-BT
we removed all substantial parts (if not all, i.e. > 99.9%)
of its copyright holder.
This change removes remaining source file Intel (c) notices.
This change does not disregard the author's original work,
on the contrary, we keep attribution about Direct-BT's history
in the README.md file 'Direct-BT Origins' section.
The Intel (c) notice and TinyB authors stay in the COPYING file.
We are grateful for their excellent work.
This change is to clarify authorship and copyright of Direct-BT's work,
as well as to not mislead association with the work of TinyB.
|
|
|
|
| |
to simply reuse LE_PHYs bitmap zero to ignore either
|
| |
|
| |
|
| |
|
|
|
|
| |
Respect BTRole in SMP key handling: responder=slave, initiator=master.
|
|
|
|
|
|
|
| |
setDefaultLE_PHY(); Add LE_Features and LE_PHYs class
Supporting added LE_PHYs features of commit 61bfb0757a1c337eaf86f9df8b0524bec1b7bc0f
in Java
|
|
|
|
|
|
|
| |
successful, same goes with BTAdapter::setPowered(bool)
Adapting dbt_scanner10/DBTScanner10 and dbt_peripheral/DBTPeripheral10,
while also adding notion of earmarking chosen BTAdapter to avoid initializing two adapter (cough cough).
|
| |
|
|
|
|
| |
and BTGattHandler (C++) incl. well referenced API doc
|
|
|
|
| |
layer (connection initiator): Initially for BTAdapter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reasonable default values have been chosen from the BT spec,
which can be overriden using the HCIHandler and BTAdapter operations.
The extended advertising operations are also supported (Bluetooth 5.0).
+++
Successfully tested running:
(0) Test machine with 2 adapter
- adapter-1 DC:FB:48:00:90:19 (acting as client)
- adapter-2 00:1A:7D:DA:71:08 (acting as peripheral)
(1) Running dbt_peripheral00.cpp or DBTPeripheral.java
as the advertising peripheral on the test machine.
`direct_bt/dist-amd64$ ../scripts/run-dbt_peripheral00.sh -adapter 00:1A:7D:DA:71:08`
or
`direct_bt/dist-amd64$ ../scripts/run-java-peripheral00.sh -adapter 00:1A:7D:DA:71:08`
(2) Running dbt_scanner10.cpp or DBTScanner10.java
as the listeninig and connection-initiator client
on the same test machine.
`direct_bt/dist-amd64$ sh ../scripts/run-dbt_scanner10.sh -adapter DC:FB:48:00:90:19 -dev 00:1A:7D:DA:71:08 -seclevel 00:1A:7D:DA:71:08 1`
or
`direct_bt/dist-amd64$ sh ../scripts/run-java-scanner10.sh -adapter DC:FB:48:00:90:19 -dev 00:1A:7D:DA:71:08 -seclevel 00:1A:7D:DA:71:08 1`
|
|
|
|
| |
settable via setName(..) while powered-off.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
initialize adapter with given BTMode, leave others untouched.
Only mutating the desired adapter within one application allows
running multiple Direct-BT applications on one platform,
each using one selected adapter.
BTMode:
- Use byte value, matching native counterpart
BTManager:
- Remove (default) BTMode
BTAdapter:
- Add initialze(const BTMode btMode=BTMode::DUAL),
must be called by user for desired adapter when found
via ChangedAdapterSetFunc/BTManager.ChangedAdapterSetListener.
AdapterInfo:
- Expose mutable ops to public, remove friend decl.
|
|
|
|
| |
BTFactory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with version 2.3, the previously refactored *TinyB* has been removed completely.
Motivation was lack of detailed Bluetooth support, inclusive increasing diversion with *Direct-BT*.
Furthermore, work is underway for `BLE slave periphal and GATT server` support and its mapping to *BlueZ D-Bus* is questionable
and would be resource intensive.
Java API changed as follows:
- Objects no more Clonable
- Removed dead unsupported code
- Removed deprecated code
- Added 'GattCharPropertySet', representing property bit mask for BTGattChar,
replacing the string array.
|
|
|
|
|
|
| |
NewObject(.., deviceClazzCtor, ..) used wrong argument order.
Aligned Java BTDevice ctor using private method for JNIAdapterStatusListener::deviceFound(..) and JNIAdapterStatusListener::deviceConnected(..).
|
|
|
|
| |
exceptions to preserve the backtrace
|