aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* scripts/build-doc.sh: Create tar archive of doc (Bump jaulib for same change)Sven Gothel2021-11-041-1/+3
|
* scripts/run-*-example.sh: Set kernel core pattern, to be sure of name and ↵Sven Gothel2021-11-022-0/+2
| | | | location (current dir) of core file.
* Adding blues-btreset.sh: Reset and 'disable' one or more adapter ..Sven Gothel2021-10-291-0/+14
|
* Add BTAdapter's Slave Peripheral SMP Key ManagementSven Gothel2021-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To have full SMP key persitency in peripheral slave mode, BTAdapter requires fine grained control over - Passing stored keys to BTDevice's PairingData (w/o uploading them) - Uploading BTDevice's PairingData to the adapter This required interaction in certain places, only enabled if adapter is BTRole::Slave (peripheral): - BTAdapter::mgmtEvDeviceConnectedHCI() Only issue unpairDevice() if not pre-paired. Unpairing is required for new pairing to avoid DHKey Check failures! - BTAdapter::mgmtEvDeviceDisconnectedHCI() - First unpairDevice() will be issued via notifyDisconnect() - Set and upload stored keys for disconnected device (if existing), preparing for next connect. - BTAdapter::sendDevicePairingState() - SMPPairingState::COMPLETED && not SMPPairingState::PRE_PAIRED: Store keys - SMPPairingState::COMPLETED && SMPPairingState::PRE_PAIRED: Refresh keys to BTDevice (set), no upload! - SMPPairingState::FAILED: Remove and delete keys +++ BTAdapter::setSMPKeyPath(path) allows user to enable the persistent key storage by setting its local filesystem path. It will also read all key files (SMPKeyBin) and if valid and matching with the adapter, uploads them for pre-pairing. See dbt_peripheral00.cpp: adapter->setSMPKeyPath(ADAPTER_KEY_PATH); +++
* scripts/run-native-example.sh: Enforce using bash to preserve command-line ↵Sven Gothel2021-09-291-14/+21
| | | | quotes
* scripts/run-java-scanner10.sh: Removed (missed in previous unified launch ↵Sven Gothel2021-09-271-133/+0
| | | | script commit)
* Examples: Build using a set of idiomatic names, one recipe for each ↵Sven Gothel2021-09-272-2/+0
| | | | examples; Add jar install for example/java!
* Add build-cross.sh using chroot to target system (from my pi-gen work, using ↵Sven Gothel2021-09-262-0/+95
| | | | images also build by our pi-gen branch)
* scripts/run*: Unify launch scripts using single defintion and symbolic links ↵Sven Gothel2021-09-2611-454/+194
| | | | with definite name
* Moved EUI48, EUI48Sub (C++/Java) and uuid_t, *Octets (C++) to jaulib for ↵Sven Gothel2021-09-181-1/+1
| | | | | | | | | general use. Notable, the java classes EUI48, EUI48Sub and BasicTypes are included in direct_bt's jar file to avoid any inconvenience. Hence BTUtils's byte[s]HexString(..) simply uses jaulib's BasicTypes s' implementation.
* Add advertising support (start with set-data and -params, stop) via HCIHandlerSven Gothel2021-09-152-0/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reasonable default values have been chosen from the BT spec, which can be overriden using the HCIHandler and BTAdapter operations. The extended advertising operations are also supported (Bluetooth 5.0). +++ Successfully tested running: (0) Test machine with 2 adapter - adapter-1 DC:FB:48:00:90:19 (acting as client) - adapter-2 00:1A:7D:DA:71:08 (acting as peripheral) (1) Running dbt_peripheral00.cpp or DBTPeripheral.java as the advertising peripheral on the test machine. `direct_bt/dist-amd64$ ../scripts/run-dbt_peripheral00.sh -adapter 00:1A:7D:DA:71:08` or `direct_bt/dist-amd64$ ../scripts/run-java-peripheral00.sh -adapter 00:1A:7D:DA:71:08` (2) Running dbt_scanner10.cpp or DBTScanner10.java as the listeninig and connection-initiator client on the same test machine. `direct_bt/dist-amd64$ sh ../scripts/run-dbt_scanner10.sh -adapter DC:FB:48:00:90:19 -dev 00:1A:7D:DA:71:08 -seclevel 00:1A:7D:DA:71:08 1` or `direct_bt/dist-amd64$ sh ../scripts/run-java-scanner10.sh -adapter DC:FB:48:00:90:19 -dev 00:1A:7D:DA:71:08 -seclevel 00:1A:7D:DA:71:08 1`
* scripts/run-dbt_scanner10.sh: Fix '-root' launchSven Gothel2021-09-031-1/+1
|
* Direct-BT: Remove TinyB and Cleanup Java API (1)Sven Gothel2021-08-311-1/+0
| | | | | | | | | | | | | | | | | | Starting with version 2.3, the previously refactored *TinyB* has been removed completely. Motivation was lack of detailed Bluetooth support, inclusive increasing diversion with *Direct-BT*. Furthermore, work is underway for `BLE slave periphal and GATT server` support and its mapping to *BlueZ D-Bus* is questionable and would be resource intensive. Java API changed as follows: - Objects no more Clonable - Removed dead unsupported code - Removed deprecated code - Added 'GattCharPropertySet', representing property bit mask for BTGattChar, replacing the string array.