aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Align to jaulib 1.3.3: Full cmake-presets usage w/ vscode support update; ↵v3.3.3Sven Göthel2024-08-0914-320/+225
| | | | | | | | | | 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.
* scripts/run-native-trial.sh: Optionally pass build dir as 1st argSven Göthel2024-05-251-0/+4
|
* scripts/run-native-trial.sh: Use build/default ..Sven Göthel2024-05-201-3/+2
|
* scripts/rebuild-doc.sh: Fix build targetSven Göthel2024-05-121-1/+1
|
* scripts/rebuild-doc.sh: Make it work with new cmake build setupSven Göthel2024-05-121-16/+10
|
* Cleanup/Fix: C++20, clang-16 + clang-tidy-16, gcc 12.2, latest jaulib, ↵Sven Göthel2024-05-045-13/+154
| | | | passing all tests w/ gcc + clang + java17 build
* BTGattHandler::BTGattHandler: Pick BTAdapter::getGATTServerData() also in ↵Sven Gothel2023-10-272-0/+2
| | | | | | | | | | | | | 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
* GATT Server Auth: Validate encryption and authentication requirements in ↵Sven Gothel2023-10-261-2/+1
| | | | | | | | | | | 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.
* GATT Server Auth: Prepare dbt_peripheral00 (C++ and java), add ↵Sven Gothel2023-10-254-2/+5
| | | | | | | | | | | '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.
* Adopt to jaulib java changes PlatformProps -> RuntimeProps for native ↵Sven Gothel2023-01-231-1/+3
| | | | lib-loading
* Add C++20 support, use Eclipse via cmake prepare and external make, mention ↵Sven Gothel2022-12-312-11/+55
| | | | clang-tidy and VSCodium and IDE integration
* scripts/build*: Fix 'time' command detectionSven Gothel2022-11-282-12/+16
|
* clang-tidy fixes part-1Sven Gothel2022-11-273-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* clang-tidy and vscode: Provision w/ initial config (tested by jaulib)Sven Gothel2022-11-271-1/+3
|
* Fix manual trial/test scripts using capsh: Use `USER` env-varSven Gothel2022-10-173-5/+5
|
* scripts/run-native-trial.sh: Return proper exit code for ↵Sven Gothel2022-09-172-2/+49
| | | | | | | | | 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.
* scripts/build.sh: Reverst to system compile (gcc on GNU/Linux)Sven Gothel2022-07-261-1/+1
|
* Update scripts, analog to jaulib v0.14.0-37-g8e76c99Sven Gothel2022-07-2624-326/+305
| | | | | | - 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
* BTAdapter::setDefaultConnParam() may fail w/ UNKNOWN_COMMAND on GNU/Linux < ↵Sven Gothel2022-06-181-3/+3
| | | | 5.9 (Ubuntu 20.04), tolerate it.
* Enhance run-*-trial.sh scriptsSven Gothel2022-06-172-3/+23
|
* Tests: Have test_bringup00.cpp/TestBringup00.java pass valgrind and ↵Sven Gothel2022-05-161-0/+89
| | | | resetStates also pre-test for clear adapter state (POWERED)
* scripts/run-java-trials-forever.sh: added, similar to ↵Sven Gothel2022-05-161-0/+12
| | | | scripts/run-native-trials-forever.sh, i.e. run forever and mark log files as OK or ERROR
* Trial C++/Java: Fix BaseDBTClientServer::setupTest(): Add ↵Sven Gothel2022-05-161-0/+12
| | | | | | | | | | | | | | | | 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()
* C++/JNI Lifecycle Fix: BTManager must be passed as shared_ptr<> and hold as ↵Sven Gothel2022-05-144-11/+126
| | | | | | | | 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.
* Add scripts/run-native-trial*.sh, split valgrind-jvm.supp from valgrind.suppSven Gothel2022-05-136-72/+152
|
* JNI Lifecycle Fix: BTGattCharListener: Adopt full Java/Native link via ↵Sven Gothel2022-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* trial i470 test_provoke (C++) / TestDBTProvoke (Java) demonstrating C++ ↵Sven Gothel2022-05-071-9/+9
| | | | survives while Java crashes (known issue)
* Trial C++: Add 'provoke_' native test to be run manually, provoking issues ..Sven Gothel2022-05-032-3/+3
| | | | | | | | | | | | | | | 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.
* build scripts: Only use OpenJDK 17 if available (Not available on Debian 10)Sven Gothel2022-04-245-6/+26
|
* scripts/run-trials-until.sh: Allow preferred path build/trial/javaSven Gothel2022-04-241-2/+2
|
* scripts/run-java-trial.sh: Convenient java trial launch script using same ↵Sven Gothel2022-04-241-0/+46
| | | | invocation as trial unit tests (non-fat jar)
* scripts/run-trials-until.sh: Add notice to run from build directory (if not)Sven Gothel2022-04-241-0/+5
|
* Build and testing using OpenJDK 17 (min requirement still 11) using our ↵Sven Gothel2022-04-234-4/+4
| | | | build scripts
* README: Bump v2.6.4. Convert Connection_Paramter.md to markdown and link.v2.6.4Sven Gothel2022-04-191-0/+7
| | | | Also add scripts/run-trials-until.sh script.
* build.sh: Detail trial/testing w/ and w/o DEBUGSven Gothel2022-04-181-1/+3
|
* valgrind for jvm: Don't show reachable (OK) leaksSven Gothel2022-04-161-1/+1
|
* valgrind suppressed file: Adding a few sections to silence JVM memcheck ↵Sven Gothel2022-04-161-0/+64
| | | | | | | (already annoying) While valgrinding JVM is annoying and pretty much verbose, at least have a look for libdirect_bt related reports.
* scripts/run-native-example.sh: Fix runit_capsh() EXE_WRAPPERSven Gothel2022-04-151-1/+1
|
* README.md: Bump for v2.6.3v2.6.3Sven Gothel2022-04-111-1/+1
|
* Adjust *build-doc.shSven Gothel2022-02-072-4/+4
|
* Added online unit testing using actual BT adapter, testing client with ↵Sven Gothel2022-02-072-2/+4
| | | | | | | | | | | | | | | 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.
* scripts/run-java-example.sh: Escape cmd args to preserve quoting like ↵Sven Gothel2022-02-021-11/+12
| | | | run-native-example.sh
* Remove obsolete and unmaintained examples: dbt_scanner00 and dbt_scanner01Sven Gothel2022-02-022-2/+0
|
* [re]build.sh: Fully specify `logfile` incl $rootdir and $archabi part; ↵Sven Gothel2022-01-253-4/+37
| | | | Adding rebuild-cross.sh
* bluez-btreset: Add setting local nameSven Gothel2022-01-171-0/+4
|
* run-native-example-simple.sh: Don't sudo ..Sven Gothel2022-01-021-2/+2
|
* Examples: Use clear 'client_keys' and 'server_keys' for key client- and ↵Sven Gothel2022-01-014-6/+8
| | | | server-path.
* scripts/build.sh: Cleanup alternative cmake invocation, emphasize on RELEASE ↵Sven Gothel2021-11-151-1/+4
| | | | (active) and DEBUG (commented out)
* DBGattServer::Listener: Fix API docSven Gothel2021-11-082-0/+46
|
* Add example: dbt_readsmpkey.cpp: Read SMPKeyBin files and dump themSven Gothel2021-11-083-0/+120
|