| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
also use cmake target_{link|compile}_options instead of globals
Example run scripts were also adopted.
Unit and trial tests passed on amd64 machine.
VSCode(ium) IDE integration manually tested.
|
| |
|
| |
|
|
|
|
| |
'bugprone-chained-comparison' for Catch2)
|
|
|
|
| |
info in test.
|
| |
|
|
|
|
| |
147e17b0b41a123b2f4040cbd6df5b73b7e97164)
|
|
|
|
| |
have full startDiscovery variant use DBGattServerRef default nullptr arg
|
|
|
|
| |
for C++ for general use (commonly used to ctor a DBGattServer)
|
|
|
|
|
|
|
|
|
|
|
| |
'SMPIOCapability adapter_sec_io_cap' commandline param to enable IO for auth
Currently I limit my tests for ENC + AUTH to:
- BTSecurityLevel: ENC_AUTH (3) and ENC_AUTH_FIPS(4)
- SMPIOCapability.DISPLAY_ONLY (0) to have a PASSKEY being display by the user application.
Current unit tests cover the ENC_ONLY(2) with IO NONE (0xff) only
and shall be enhanced for these enc+auth cases as well.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
- AdapterStatusListener
- BTGattHandler::NativeGattCharListener
- DBGattServer::Listener
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
- ...
|
|
|
|
| |
jau::function<void(A...)>
|
| |
|
| |
|
|
|
|
|
| |
- When passing client and server in test8x_fullCycle() overload, expect them to be setup already.
- client: KEEP_CONNECTED -> do_disconnect for clarity and along do_disconnect_randomly
|
| |
|
| |
|
|
|
|
| |
5.9 (Ubuntu 20.04), tolerate it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
| |
using jau::latch
- Helps avoiding runaway threads at unit test closing and object destruction (if at all)
- Shows running_thread count
|
|
|
|
|
|
| |
dbt_[client|server]00 to simplify maintenance
Client code adds success dependency to completedGATTCommands >= 1, considered a fix.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
service start and stop is completed
|
|
|
|
| |
closing and listener this state might not be 'on time'
|
|
|
|
| |
check) in this error provoking method
|
|
|
|
| |
set by timout_func() instead of abort() producing a core dump
|
|
|
|
| |
DBTServerTest::stop(), which calls close()
|
|
|
|
| |
common test file dbt_client_server1x, ..
|
|
|
|
|
|
|
|
|
| |
first; Native dtor must check for pulseSenderThread and join if still running
Ensuring AdapterStatusListener is removed first, otherwise it may kick off another 'action off-thread' for disconnect.
Native dtor must check for pulseSenderThread and join if still running,
otherwise C++ gives us a terminate.
|
|
|
|
| |
forward them via success==false, no direct off-thread Assert/REQUIRE causing issues
|
|
|
|
| |
and remove)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
survives while Java crashes (known issue)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
|
|
|
|
|
| |
abstraction to plug-in any client/server instance into DBTClientServer1x
Further add TestDBTProvokeClientServer_i470 (java trial, copied from native trial)
|
| |
|
| |
|
|
|
|
| |
and mark super virtual requirement
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we use a new custom client and server code,
where client:
- does not filter found devices whether they are already connected
and server:
- disconnects 100 ms after Gatt MTU change,
disrupting client's getGattServices discovery process
+++
Note: Usage of dbt_client* and dbt_server* has been untangled
in the header files, i.e. included at top level.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Native trials match the java trial.
Passed native and java tests alike, i.e. may fail w/ BT5 on SC0 or SC1 if no keys are delivered (known issue).
Add counting successful protocol sessions next to the total,
client determined and send to server via GattCmd.
protocolSessionCount allows multiple connection and protocol sessions within one instance,
which allows for further stability and leak (valgrind) testing later on.
Each tests class's 1st test uses 1 protocolSession, where the 2nd test uses 2 protocolSessions.
timeout is detected by the waiting loop thread.
max_connection per protocolSession is 5
and shall help with analyzing the known BT5 lack of key delivery.
Further renamed the test class numbers to match the test suffix number better.
|
| |
|