| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTGattChar::Listener and have implementation handle the BTGattChar association match for notifications
Turns out previous API and code moved the burden to user to only have the calling BTGattChar object to be matched,
which is not only not intuitive, but also a potential source of issues.
Now we provide a naive interface BTGattChar::Listener to be passed
and BTGattChar::addCharListener(..) wraps its instance in a BTGattCharListener to be delegated.
BTGattChar::removeCharListener(..) has been removed due to high implementation
burden on the Java side. This shall not cause harm to the user, as it isn't useful in a user application.
BTGattChar::removeAllAssociatedCharListener(..) is available on the C++ and Java side,
i.e. fixed API in C++ where we had BTGattChar::removeAllCharListener(..).
Tested and demonstrated in dbt_scanner10.cpp and DBTScanner10.java, as usual.
Both examples also print the service, characteristic and declaration in a more readable fashion.
|
|
|
|
| |
each two digits
|
|
|
|
|
|
| |
NewObject(.., deviceClazzCtor, ..) used wrong argument order.
Aligned Java BTDevice ctor using private method for JNIAdapterStatusListener::deviceFound(..) and JNIAdapterStatusListener::deviceConnected(..).
|
| |
|
|
|
|
| |
setcap/capsh; README: Clean MD; Refine Direct-BT application launch options
|
| |
|
|
|
|
| |
':', hinting its type.
|
| |
|
|
|
|
| |
address
|
|
|
|
| |
EUI48Sub <-> string conversion
|
|
|
|
| |
or name to allow empty EUI48Sub for all devices
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
basic use cases
Universal methods use a 'matcher' interface (Java) or function pointer (C++),
which can be defined 'on the fly' using lambda expressions.
Basic use cases BTDeviceRegistry:
- use 'contains' in general to match for awaited, processed etc devices
Basic use cases BTDeviceRegistry:
- For getOrCreate() uses 'equals' for a 100% match
- For sec_level use getStartOf() with actual address and name
- For PASSKEY etc use getStartOf() with actual addess only - no fuzzy name
|
| |
|
|
|
|
| |
(C++ and Java)
|
|
|
|
| |
Java)
|
| |
|
| |
|
|
|
|
| |
adapter.toString() in WARN_PRINT
|
| |
|
|
|
|
| |
exceptions to preserve the backtrace
|
|
|
|
| |
exceptions to preserve the backtrace
|
|
|
|
|
|
|
| |
devicesInProcessing and devicesProcessed for O(1) processing.
Add hash_code()/hashCode() and equality operation to DeviceID using BDAddressAndType only,
allowing devicesInProcessing and devicesProcessed to be mostly operated within O(1).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to lib, support full EUI84Sub and name-sub pattern matching
Same naming-schema and functionality C++/Java
Due to using EUI48Sub and name-sub pattern matching,
we naturally had to drop the hash-set fast-lookup approach.
However, looking up device names via pattern-matching is essential
to handle device groups, i.e.
- specific security settings (level, passkey, ..)
- actually accepting them to connect (waitForDevices)
|
|
|
|
| |
operator==() etc; EUI48[Sub]: Add static 'scanEUI48[Sub]'(string&) and static 'indexOf()'
|
|
|
|
| |
etc; EUI48[Sub]: Add static 'scanEUI48[Sub]'(string&) and static 'indexOf()'
|
|
|
|
|
|
|
| |
e8e7f0958ed452a79eb2977555c2281b3ff3ba19): Call native getNameImpl() only if instance is valid.
Bring back a cached name (name_cached), but only cach on ctor and getName() calls if viable,
otherwise use it if instance is invalid.
|
|
|
|
|
|
|
|
|
|
|
| |
BTSecurityLevel must be >= given minimum; Remove key file if invalid or failed otherwise
Drop paramter 'removeInvalidFile', since read(..) and readAndApply(..) shall always delete invalid files
or key files with non-matching BTSecurityLevel.
This ensures valid, usable and current key files.
This also resolved scenario reading a key file with BTSecurityLevel NONE, but requested higher BTSecurityLevel.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shared, update)
+ ------+------------+----------+----------+-------------------------------------------+
| # | discovered | shared | update |
+-------+------------+----------+----------+-------------------------------------------+
| 1.1 | false | false | ignored | New undiscovered/unshared -> deviceFound(..)
| 1.2 | false | true | ignored | Undiscovered but shared -> deviceFound(..) [deviceUpdated(..)]
| 2.1.1 | true | false | name | Discovered but unshared, name changed -> deviceFound(..)
| 2.1.2 | true | false | !name | Discovered but unshared, no name change -> Drop(1)
| 2.2.1 | true | true | any | Discovered and shared, updated -> deviceUpdated(..)
| 2.2.2 | true | true | none | Discovered and shared, not-updated -> Drop(2)
+-------+------------+----------+-----------------------------------------------------+
|
|
|
|
| |
update dependency)
|
|
|
|
|
|
|
|
| |
via AdapterStatusListener::deviceUpdated(..) (NAME)
This resolves the problem to detect devices by their name, using active scanning.
User shall also listen to deviceUpdated with updateMask EIRDataType::NAME set.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
HCIHandler::le_set_scan_param(..): Add le_scan_active and filter_policy; Java: Add all.
Also changing order of parameter, allowing to use default values in a most reasonable sense.
Motivation: Expose `le_scan_active` to retrieve the AD EIR package with event-type SCAN_RSP,
which gets queried via active scanning only and usually holds the device name if supported.
TODO: Resolve propagating device found on SCAN_RSP message (name),
since SCAN_IND is received before (w/o name).
The 2nd SCAN_RSP is dropped, even though the BTDevice's name has changed properly.
|
| |
|
|
|
|
| |
producing a working binary anyways
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTAdapter::get[Address->AddressAndType]() using BDAddressAndType, preparing for random address
Thoroughly changes
- 'EUI48 AdapterInfo::address' -> 'BDAddressAndType AdapterInfo::addressAndType'
- BTAdapter C++
- BTAdapter and its DBTAdapter/DBusAdapter implementations (Java)
Motivation:
- The adapter's address as initially reported by the system is always its public address, i.e. BDAddressType::BDADDR_LE_PUBLIC
- The adapter's visible BDAddressAndType might be set to BDAddressType::BDADDR_LE_RANDOM before scanning / discovery mode (TODO).
|
|
|
|
| |
explicitly declare enum class name
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTAdapter; Add AD_EIR debug flag
MgmtEvtDeviceFound changes: Stringent ownership
- field eireport type `std::shared_ptr<EInfoReport>` -> `std::unique_ptr<EInfoReport>`
- getEIR() returns immutable EInfoReport pointer
BTAdapter::mgmtEvDeviceFoundHCI(): Cleanup confusion
- Expect coming from HCIHandler (we only listen to it), ABORT otherwise
- Cleanup confusion of ownership etc
Debug:
- HCIHandler env.DEBUG_SCAN_AD_EIR `direct_bt.debug.hci.scan_ad_eir`
|
|\ |
|
| |
| |
| |
| | |
the first one is done
|
|/ |
|
| |
|
| |
|
|
|
|
| |
properties.
|
| |
|
|
|
|
|
|
|
|
| |
using a shallow copy of ArrayList
Actually this was the intention here, but due to mixed C++/Java programming I missed this nuance.
In C++ the simple assignment is sufficient, not in Java.
|