From d3910d9e4c8b188961c56e88395a87fccd80a044 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 2 Jul 2020 03:05:46 +0200 Subject: Support BDADDR_LE_RANDOM (p1): Add BLERandomAddressType, distinguish HCIAddressType..., Move EUI48 into direct_bt namespace Add BLERandomAddressType Exposed in DBTDevice and BluetoothDevice C++ and Java. See "BT Core Spec v5.2: Vol 6 LE, Part B Link Layer Specification: 1.3.2 Random device Address" +++ Distinguish HCIAddressType -> HCILEPeerAddressType + HCILEOwnAddressType As used for HCIHandler::le_create_conn(..) See "BT Core Spec v5.2: Vol 4, Part E Host Controller Interface (HCI) Functionality: 7.8.12: LE Create Connection command" DBTDevice::connectLE(..) translates its own BDAddressType -> HCILEPeerAddressType using BLERandomAddressType (BDAddressType, address). Currently only HCILEPeerAddressType::STATIC_PUBLIC is allowed and passed through. +++ Move EUI48 into direct_bt namespace --- java/tinyb/dbus/DBusDevice.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/tinyb') diff --git a/java/tinyb/dbus/DBusDevice.java b/java/tinyb/dbus/DBusDevice.java index 19d33aa6..ac12d01e 100644 --- a/java/tinyb/dbus/DBusDevice.java +++ b/java/tinyb/dbus/DBusDevice.java @@ -31,6 +31,7 @@ package tinyb.dbus; import java.util.List; import java.util.Map; +import org.tinyb.BLERandomAddressType; import org.tinyb.BluetoothAddressType; import org.tinyb.BluetoothDevice; import org.tinyb.BluetoothException; @@ -116,6 +117,9 @@ public class DBusDevice extends DBusObject implements BluetoothDevice @Override public BluetoothAddressType getAddressType() { return BluetoothAddressType.BDADDR_LE_PUBLIC; /* FIXME */} + @Override + public BLERandomAddressType getBLERandomAddressType() { return BLERandomAddressType.UNDEFINED; /* FIXME */ } + @Override public native String getName(); -- cgit v1.2.3