| 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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
passing all tests w/ gcc + clang + java17 build
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GATTRole::Client; BTAdapter::startDiscovery() add DBGattServerRef ref
A GattServerHandler(DBGattServer) is also possible for LL master (GATT client) connections
where the server inquires certain data points within the client's GATT.
User can pass DBGattServer to BTAdapter::startDiscovery() to enable the GattServerHandler for such cause.
Test case: Avalun's LabPad device
- DBTLabPadClient01.java
- dbt_labpadclient01.cpp
|
|
|
|
|
|
|
|
|
|
|
| |
server mode
The actual used security level shall match the required (user-set) level as follows
- Don't care if request is < ENC_ONLY
- If request == ENC_ONLY, actual must be >= ENC_ONLY
- If request >= ENC_AUTH, actual must be >= ENC_AUTH
Here we do ignore ENC_AUTH_FIPS, as not all devices/adapter support it yet.
|
|
|
|
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
| |
lib-loading
|
|
|
|
| |
clang-tidy and VSCodium and IDE integration
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Details
- Use 'size_type' instead of 'int',
propagate same 'size_type' into 'darray' etc.
- Use 'std::make_shared', 'std::make_unique'
- Use range-based for loops
- Remove redundant 'virtual', use 'override' in derived classes
- Use 'nullptr'
- Use default impl for dtor, ctor (incomplete)
- Use copy and std::move (incomplete)
- Explcitly catch std::bad_alloc in 'new' in 'noexcept' -> 'abort'
- 'abort' was issued implicitly in noexcept methods
- L2CAPServer, L2CAPClient, NopGattServerHandler,
DBGattServerHandler, FwdGattServerHandler
- Use local close_impl(), usable in virtual destructor
- L2CAPClient::read, HCIComm::read
- preset 'poll' result 'n', avoid garbage comparison
- BTAdapter::enableListening
- loop through addMgmtEventCallback() result
- JNI code
- explicit size_type is cast to jsize or jint w/o check
- unchanged semantics
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
run-native-trial-until.sh (error), long term testing of one trial, triage
Passed 20 rounds of debug code w/ valgrind using test_client_server10_NoEnc,
after applying jaulib v0.16.2 - fix of jau::service_runner::start().
No leaks and no deadlocks or endless loops occured.
|
| |
|
|
|
|
|
|
| |
- example symlinks: remove prefix 'run-'
- can invoke from project root dir like in jaulib and cipherlib
- using {build|dist}-OS_NAME-ARCHABI for multi OS support
|
|
|
|
| |
5.9 (Ubuntu 20.04), tolerate it.
|
| |
|
|
|
|
| |
resetStates also pre-test for clear adapter state (POWERED)
|
|
|
|
| |
scripts/run-native-trials-forever.sh, i.e. run forever and mark log files as OK or ERROR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
survives while Java crashes (known issue)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
invocation as trial unit tests (non-fat jar)
|
| |
|
|
|
|
| |
build scripts
|
|
|
|
| |
Also add scripts/run-trials-until.sh script.
|
| |
|
| |
|
|
|
|
|
|
|
| |
(already annoying)
While valgrinding JVM is annoying and pretty much verbose,
at least have a look for libdirect_bt related reports.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
server functionality
Building with enabled *trial* and *testing* , i.e. live testing with 2 Bluetooth adapter
is provided via the *cmake* build argument `-DBUILD_TRIAL=ON`, see above.
The *trial* tests utilize one or more actual Bluetooth adapter,
hence using the *capsh* launch for the required permissions as described above.
Therefor, *sudo* will be called and a user interaction to enter the *sudo* password may occur.
The *trial* tests cover *Direct-BT*'s Bluetooth functionality,
having its *master/client* and *slave/server peripheral* facilities communicating via actual adapter,
supporting regression testing of the API, its implementation and adapter.
|
|
|
|
| |
run-native-example.sh
|
| |
|
|
|
|
| |
Adding rebuild-cross.sh
|
| |
|
| |
|
|
|
|
| |
server-path.
|
|
|
|
| |
(active) and DEBUG (commented out)
|
| |
|
| |
|