aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* BTAdapter::mgmtEvDeviceFoundHCI: Only unpair() shared and non-discovered ↵Sven Gothel2023-11-241-1/+1
| | | | | | device if not pre-paired Avoid losing device pairing if performed via Direct-BT in case explicit startDiscovery() purged discovered devices.
* BTDevice::setSMPKeyBin: Align C++/Java code using setSMPKeyBin()Sven Gothel2023-11-243-4/+31
|
* BTDevice::pairing_data.is_pre_paired: Set on uploadKeys() post setup, ↵Sven Gothel2023-11-242-5/+13
| | | | aligned for all cases (C++ and Java, via setSMPKey() or manual)
* DBTAdapter.deviceUpdated(): Debug: Only show update events w/o EVT_TYPE, ↵Sven Gothel2023-11-242-2/+5
| | | | RSSI, BDADDR* change (java)
* BTAdapter::startDiscovery: Use given DBGattServerRef in already discovering ↵Sven Gothel2023-11-231-0/+1
| | | | state
* BTAdapter: Add debug/verbose msg w/ printDeviceLists()Sven Gothel2023-11-231-6/+35
|
* LE Resolvable Address: BTDevice::hciSMPMsgCallback: Fix IRK responder ↵Sven Gothel2023-11-051-1/+1
| | | | properties: Use irk_resp (copy/paste bug) and SMPIdentityResolvingKey::Property::RESPONDER
* BTAdapter: Remove redundant startDiscovery overload w/o DBGattServerRef and ↵Sven Gothel2023-10-294-61/+5
| | | | have full startDiscovery variant use DBGattServerRef default nullptr arg
* DBGattServer/Value: Add convenience make[_gatt]() for initializer list (byte ↵v3.2.2Sven Gothel2023-10-282-0/+19
| | | | array) with extra capacity and size
* DBGattServer/Value: Add convenience make[_gatt]() for initializer list (byte ↵Sven Gothel2023-10-282-0/+11
| | | | array)
* Update README, CHANGES and COPYING: New features, TinyCrypt, ..v3.2.1Sven Gothel2023-10-283-1/+30
|
* Bump Eclipse settingsSven Gothel2023-10-281-3/+3
|
* Bump jaulibv3.2.0Sven Gothel2023-10-281-0/+0
|
* Complete LabPad example with full BTGattCmd test validationSven Gothel2023-10-282-41/+110
|
* BTGattCmd: Response: Add DataCallback, add setting minimum response size, ↵Sven Gothel2023-10-283-30/+117
| | | | add sendOnly(..) to skip waiting for response
* BTGattHandler::BTGattHandler: Pick BTAdapter::getGATTServerData() also in ↵Sven Gothel2023-10-2713-16/+1858
| | | | | | | | | | | | | 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
* BTGattHandler::GattServerHandler::replyReadByTypeReq: Add BT Core Spec v5.2: ↵Sven Gothel2023-10-271-10/+45
| | | | Vol 3, Part G GATT: 4.8.2 Read Using Characteristic UUID
* Convenience: Add DBGattValue.make(..) for java and 'POctets make_gvalue(..)' ↵Sven Gothel2023-10-276-146/+119
| | | | for C++ for general use (commonly used to ctor a DBGattServer)
* examples/dbt_scanner10.cpp: Restore default cmd_uuid and cmd_rsp_uuid ↵Sven Gothel2023-10-271-2/+2
| | | | matching dbt_peripheral00
* examples/dbt_scanner10.cpp: Remove pincode hack, accidentially included in ↵Sven Gothel2023-10-261-9/+0
| | | | earlier commit
* GATT Server Auth: Validate encryption and authentication requirements in ↵Sven Gothel2023-10-262-2/+45
| | | | | | | | | | | 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: BTDevice::processL2CAPSetup don't set sec_level w/ ↵Sven Gothel2023-10-261-4/+7
| | | | | | authentication in server mode; Read-out l2cap's actual sec_level when paired This state works w/ pairing against an Android phone using Random Private Address and authentication.
* GATT Server Auth: BTAdapter::smp_timeoutfunc shall not timeout in ↵Sven Gothel2023-10-261-0/+5
| | | | authentication mode
* GATT Server Auth: Cleanup sec_levl + io_cap validation and transition, ↵Sven Gothel2023-10-263-147/+265
| | | | | | | | | | | | | | | | | | | | | utilizing sec_level_server, io_cap_server in server mode In server mode, pre-set and validated sec_level_server, io_cap_server are handled as follows: (1) io_cap_server gets set in the manager before start advertising and actual when connected at mgmtEvDeviceConnectedHCI() the manager setting is propagated to the device via notifyConnected() (2) sec_level_server is also propagated to the device when connected at mgmtEvDeviceConnectedHCI() via notifyConnected(). It subsequently is set on the L2CAP at BTDevice::processL2CAPSetup() on the server l2cap connection. +++ Renamed 'ioCap'* -> 'io_cap'* for readability as we don't regularly use camel-case for fields here.
* BTAdapter::disconnectAllDevices(): Ensure disconnected device is actually ↵Sven Gothel2023-10-251-1/+4
| | | | | | | | removed even if disconnect failed (power-off case) Notable was a failed pairing attempt causing the adapter to reset (power cycle). The disconnect command was unable to succeed, hence survived in the connected list and subsequent startAdvertising faild.
* GATT Server Auth: SMPPairingState: Add missing PASSKEY_NOTIFY on byte -> ↵Sven Gothel2023-10-251-3/+4
| | | | enum conversion, fix byte values
* Bump jaulibSven Gothel2023-10-251-0/+0
|
* GATT Server Auth: Prepare dbt_peripheral00 (C++ and java), add ↵Sven Gothel2023-10-259-36/+64
| | | | | | | | | | | '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.
* LE Resolvable Address: Handle identity- and resolvale-private-address (RPA), ↵Sven Gothel2023-10-2514-76/+363
| | | | | | | | | | | | | | | | | | | using RPA/IRK crypto matcher for HCI events (passing RPA) HCIConnectionRef and BTDevice store both address pairs, naming the potential RPA as 'visibleAddressAndType'. BTAdapter's findDevice*() method seeks through all device's address first and if the potential RPA is not found queries each device whether it matches with its IRK (if existing). In case the latter is positive, the identity address has been found. Naturally, to have this work, the adapter (in server mode) needs to upload all keys to the host adapter to allow resolving as well as instantiating all devices per key-set. This concept has already been implemented, hence the IRK resolution change-set is not too dramatic. Trial unit tests passed.
* HCIHandler: Remove reset{->HCI}() from publicSven Gothel2023-10-252-42/+28
|
* HCI resolvable functions: HCIHandler: Only issue resolvable function if ↵Sven Gothel2023-10-252-14/+67
| | | | supported, fix DBG_PRINT, add missing declarations
* LE Resolvable Address: Support IRK: SMPIdentityResolvingKey (IRK w/ added ↵Sven Gothel2023-10-2511-109/+336
| | | | id_address), SMPKeyBin storage and host upload, w/ clearing all IRKs on startup
* LE Resolvable Address: Add tinycrypt, supporting AES to match IRK w/ LE ↵Sven Gothel2023-10-257-13/+219
| | | | Random Address, made available in SMPIdentityResolvingKey and BTDevice
* LE Resolvable Address: Add tinycrypt, supporting AES to match IRK w/ LE ↵Sven Gothel2023-10-252-0/+3
| | | | Random Address
* HCI resolvable functions: HCIHandler shall only report DBG messages; ↵Sven Gothel2023-10-233-7/+21
| | | | BTAdapter clear resolvable list at 1st init, BTDevice del from resolvable list at disconnect
* GATT Server Auth: Expose PASSKEY_NOTIFY from BTManager -> BTDevice; App ↵Sven Gothel2023-10-2312-15/+140
| | | | using AdapterStatusListener::devicePairingState() + SMPPairingState::PASSKEY_NOTIFY to display generated PassKey
* GATT Server Auth: MgmtEvent: Add PASSKEY_NOTIFY -> MgmtEvtPasskeyNotify mappingSven Gothel2023-10-233-2/+39
|
* HCIHandler: Add support for HCI resolvable functions: add, del, clear, ↵Sven Gothel2023-10-234-3/+173
| | | | | | | | | | | | | | | read.., set.. NOTE that the following seem not to be supported in Linux/BlueZ: - LE_READ_PEER_RESOLV_ADDR - LE_READ_LOCAL_RESOLV_ADDR The others are coded within BlueZ, but I received 0x01 UNKNOWN_COMMAND as a HCIStatusCode Used kernel for analysis: - bluetooth-next 2022-04-01 - 38a1944deda4d96ca04b9aaa51ee5ae879b61aa0
* HCIHandler: Reuse opcode from request and use to_string for error messagesSven Gothel2023-10-231-5/+5
|
* HCIHandler::receiveCommandComplete(..): Preserve returned CMD_STATUS error ↵Sven Gothel2023-10-231-0/+4
| | | | status
* Eclipse: Bump settingsSven Gothel2023-10-222-6/+25
|
* Bump jaulibSven Gothel2023-10-221-0/+0
|
* Sync Java with C++ and tag API changes; All trial unit tests passedSven Gothel2023-10-2215-100/+110
| | | | | | | | 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
* Adapter Random Address (WIP): Add BTAdapter::setPrivacy() and intercepting ↵Sven Gothel2023-10-226-1/+113
| | | | | | | | | new-IRK FIXME: Passing a HCILEOwnAddressType other than PUBLIC for "LE set scan Param" after setPrivacy(true) via BTManager results in failure. TBD: Seems like the mngr API and HCI is not aligned or my adapter revolts.
* BTManager::initializeAdapter(): Disable Privacy and reorder modes BREDR -> ↵Sven Gothel2023-10-221-4/+9
| | | | LE for clarity
* BTManager::handleCurrentSettingsReply(): Added to unify setMode() and ↵Sven Gothel2023-10-222-27/+15
| | | | setDiscoverable() mode change replies
* BTAdapter/BTManager: Initialize BTAdapter w/ optional power-on, allowing ↵Sven Gothel2023-10-225-26/+23
| | | | subsequent power-off settings w/o toggling power again
* Adapter Random Address: Add visibleMACType = HCILEOwnAddressType::PUBLIC and ↵Sven Gothel2023-10-225-9/+8
| | | | use it for BTAdapter::startDiscovery() and BTDevice::connectLE()
* DBTScanner10: Fix PASSKEY_EXPECTED/NUMERIC_COMPARE_EXPECTED ↵Sven Gothel2023-10-201-2/+2
| | | | BTSecurityRegistry.Entry lookup: Add remote device name (same as dbt_scanner10.cpp)
* BTAdapter::smp_timeoutfunc: Clear smp_events after warning/ignore msg (OK); ↵Sven Gothel2023-10-202-1/+6
| | | | BTDevice::updatePairingState/hciSMPMsgCallback: Clear smp_events after pairing completion