| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
|
|
|
| |
location (current dir) of core file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
+++
|
|
|
|
| |
quotes
|
|
|
|
| |
script commit)
|
|
|
|
| |
examples; Add jar install for example/java!
|
|
|
|
| |
images also build by our pi-gen branch)
|
|
|
|
| |
with definite name
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|