| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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.
|
|
|
|
| |
if not connected
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
function header, ensure dev_id shown
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
retry=false @ action block start, then determine retry or not
|
| |
|
|
|
|
| |
Missing: FreeBSD kernel BT functionality (currently just aborts)
|
|
|
|
| |
c88abd8359be48b19425dffe154b0eb469401bb9)
|
| |
|
| |
|
|
|
|
| |
5.9 (Ubuntu 20.04), tolerate it.
|
|
|
|
| |
macro w/o for-loop and switch
|
|
|
|
| |
== ( mask & bit )`
|
|
|
|
| |
Fix is_set() bit-type enum: '0 != ( mask & bit )' -> 'bit == ( mask & bit )'
|
| |
|
| |
|
|
|
|
| |
reference to perihperal-server mode to overview.
|
| |
|
|
|
|
|
|
| |
See commits
- cc53af990263bfa09947ad3127e0de6a6ffcb493
- ca228cd0512be4642a41468ff92e688dbf296fcd
|
|
|
|
|
|
|
|
|
|
| |
trial tests
Commit ca228cd0512be4642a41468ff92e688dbf296fcd defined that AdapterstatusListener::deviceFound()
is only called if not already connected and if initially found .
This change removes using the 'device processing' list,
as already the case for the trial tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
true == no_ioerror, initClientGatt() checks content.
Fix in commit 82ecfd8e19c88e3e4d0ddb04796874834292a05e contains bugs in its BTGattHandler discovery:
- discoverDescriptors() shall just return true == no_ioerror, its OK to have no descriptors
- discoverCharacteristics() shall just return true == no_ioerror, we may tolerate to have no characteristics
- discoverPrimaryServices() shall just return true == no_ioerror, we check services later on
- discoverCompletePrimaryServices() shall only return false if above signaled an ioerror, we check services later on
- initClientGatt() bails out on ioerror or failed services content - here we perform the services checks.
Fixed
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a.removeAllStatusListener() and new mngr.removeAllChangedAdapterSet{Callbacks|Listener}() ensuring clean state even if previous test failed.
On the C++ trials using Catch2, not having issued at test launch via setupTest():
- adapter.removeAllStatusListener()
- manager.removeAllChangedAdapterSetCallbacks()
and if first test failed, the second tests
had two ChangedAdapterSetCallbacks registered and hence added the AdapterStatusListener twice
as well still had the previous test listener included.
This in turn lead to a SIGSEGV when the previous
AdapterStatusListener::deviceDisconnected() has been called
in the server's processDisconnectedDevice()
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
zero sized array of BTGattServices on error
BTGattHandler::discoverCompletePrimaryServices():
- just discover the services and its characteristics and descriptors
- return bool, success of failor as returned by discovery methods (incl. their send*() command)
BTGattHandler::initClientGatt():
- clear services before retrieval and on error
- error response on
- BTGattHandler::discoverCompletePrimaryServices() failure
- no services
- no GenericAccess services
- only return true and leave services if no error
BTDevice::getGattService():
- perform BTGattHandler::initClientGatt() error checks as well
- update method API doc, describing failure included no GenericAccess service
|
|
|
|
|
|
|
|
| |
such in BTAdapter, ... (API CHANGE)
BTAdapter removes itself from BTManager, hence needs to ensure BTManager is not yet destructed.
This goes well along with our new JNI mapping, holding the shared_ptr reference in nativeInstance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DBTNativeDownlink and JavaUplink like AdapterStatusListener change, clean listener API + impl.
AdapterStatusListener adopted fully linked via DBTNativeDownlink (java->native) and JavaUplink (native->java).
This allows intrinsic lifecycle management.
Native destruction leads to its reference removal from the java object
and destruction of the java object removes its reference from the native object.
Both reference removals may lead to their destruction if reaching zero.
(was commit 9c5f25ccd1637728d6e79592279e4b38ecd32f59)
Same applies to BTGattCharListener:
- This removed BTGattChar::Listener, simply use BTGattCharListener
- Using private BTGattHandler::GattCharListenerPair struct for BTGattChar mapping
- No more manual or exposed BTGattChar mapping
- Java: An added BTGattCharListener instance can be used for removal now,
no more wrapper object magic returned.
Further:
- moved removed `namespace impl`, moved StatusListenerPair into private BTAdapter
- have all add/remove*Listener methods noexcept
Unit tests validating BTGattCharListener add and remove.
|
|
|
|
| |
impl::StatusListenerPair for BTDevice::addStatusListener() only -> Simplifying API
|
|
|
|
| |
possible
|
|
|
|
|
|
|
| |
JavaUplink/DBTNativeDownlink, resolving BTAdapter::removeAllStatusListener() and use shared_ptr_ref<T>
- AdapterStatusListener's native instance is now created at java object construction, etc .. same pattern like BTDevice ..
- Java/Native object relation is inherently thread safe due to using use shared_ptr_ref<T>
|
|
|
|
| |
its static singleton instance nature, dtor only called at shutdown/exit
|
|
|
|
| |
a paranoid safeguard - should never happen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handle` -> `const bool discovered`
Motivation:
- the connection handle is known to the device already and can be retrieved, redundant information
- the flag discovered gives information whether BTAdapter has sent out a deviceFound message, i.e. the user actually issued the connection (default).
We like to detect issues where devices are automatically connected by the underlying host implementation,
i.e. BlueZ/kernel's whitelist mechanism or otherwise - an unsusal and undesired situation.
In such case, no `DEVICE FOUND` advertising is promoted and the underlying BlueZ/kernel
issues the connection itself.
Here `discovered` will be `false`.
|
|
|
|
| |
BTObject::{isValid()->isValidInstance()} for clarity; BTAdapter adds `adapter_operational` flag for its own isValid()
|
| |
|
| |
|
|
|
|
| |
out-of-loop absolute timeout_time, avoiding deadlocks
|
| |
|
|
|
|
| |
shall_stop()
|
| |
|