summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* main.conf: Add SecureConnections optionSimon Mikuda2022-11-214-1/+35
| | | | | | | | | | This introduces SecureConnections option to main.conf that can be used to configure this on adapter initialization. This is useful for: - disable for adapters that have a problems with SecureConnections enabled - if you want to disable CTKD (cross transport key derivation) - add option to enable only SecureConnections
* client/player: Fix scan-build warningLuiz Augusto von Dentz2022-11-211-0/+3
| | | | | | | | | This fixes the following warning: client/player.c:1775:25: warning: Dereference of null pointer [core.NullDereference] iov_append(&cfg->caps, preset->data.iov_base, preset->data.iov_len); ^~~~~~~~~~~~~~~~~~~~~
* tools: Use portable 64 bit data formatsBrian Gix2022-11-171-2/+3
| | | | | The isotest executable was using the non-portable %zd string formatter for loging 64 bit integers. This replaces them with PRId64.
* hostname: Fallback to transient hostnameBastien Nocera2022-11-161-2/+55
| | | | | | | | | | | | | | | | After pretty hostname, and static hostname, also support transient hostname as a last resort before 'BlueZ X.XX'. This happens on Fedora's Workstation installation as it calls "hostnamectl set-hostname" on startup. In Fedora Silverblue, the default hostname is set as fedora in /etc/os-release. In both cases, we should fall back to that transient hostname, as bad as it could be. Note that the transient hostname needs to be monitored through the kernel directly, as explained in: https://www.freedesktop.org/software/systemd/man/org.freedesktop.hostname1.html
* hostname: Add '' around printed stringsBastien Nocera2022-11-161-3/+3
| | | | Otherwise we can't see whether the string is nul, or empty.
* unit: Introduce test-bapLuiz Augusto von Dentz2022-11-152-0/+574
| | | | | | | | | | | | Test Summary ------------ BAP/UCL/DISC/BV-01-C Passed BAP/UCL/DISC/BV-02-C Passed BAP/UCL/DISC/BV-06-C Passed BAP/UCL/DISC/BV-05-C Passed BAP/UCL/DISC/BV-03-C Passed BAP/UCL/DISC/BV-04-C Passed Total: 6, Passed: 6 (100.0%), Failed: 0, Not Run: 0
* shared/bap: Fix crash when canceling requestsLuiz Augusto von Dentz2022-11-151-1/+10
| | | | | | | | | | | If bt_bap_unref/bap_free is called while there is an ongoing pending request it may endup calling into bap_notify_ready which will try to notify ready callbacks while holding a reference, but in case the reference is already 0 that means it would switch to 1 and back 0 causing a double free. To prevent that bap_notify_ready now checks that the reference is not 0 with use of bt_bap_ref_safe.
* shared/tester: Add tester_io_set_complete_funcLuiz Augusto von Dentz2022-11-152-0/+17
| | | | | This adds tester_io_set_complete_func which can be used to set a callback when all iovec has been sent/received.
* shared/bap: Make use of util_iov helpersLuiz Augusto von Dentz2022-11-151-132/+51
| | | | This make use of util_iov helpers instead of reimplementing them.
* shared/util: Add iovec helpersLuiz Augusto von Dentz2022-11-152-0/+113
| | | | This adds iovec helpers functions.
* monitor/att: Fix not dequeing att_read on error responseLuiz Augusto von Dentz2022-11-151-51/+58
| | | | | | If a read/read by type fails it needs to be dequeued otherwise it can cause the next operation of the same type to return the wrong request and possible decoding as if it was a different attribute type.
* Release 5.665.66Marcel Holtmann2022-11-102-1/+9
|
* build: Update library versionMarcel Holtmann2022-11-101-1/+1
|
* monitor: Add some definitions from Bluetooth 5.3 Core specificationMarcel Holtmann2022-11-071-0/+13
|
* monitor/att: Add support for decoding Characteristic DeclarationLuiz Augusto von Dentz2022-11-041-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds supports for decoding the so called Characteristic Declaration (0x2803): > ACL Data RX: Handle 3585 flags 0x02 dlen 76 ATT: Read By Type Response (0x09) len 71 Attribute data length: 7 Attribute data list: 10 entries Handle: 0x0002 Value: 200300052a Properties: 0x20 Indicate (0x20) Value Handle: 0x0003 Value UUID: Service Changed (0x2a05) Handle: 0x0015 Value: 021600002a Properties: 0x02 Read (0x02) Value Handle: 0x0016 Value UUID: Device Name (0x2a00) Handle: 0x0017 Value: 021800012a Properties: 0x02 Read (0x02) Value Handle: 0x0018 Value UUID: Appearance (0x2a01) Handle: 0x0019 Value: 021a00a62a Properties: 0x02 Read (0x02) Value Handle: 0x001a Value UUID: Central Address Resolution (0x2aa6) Handle: 0x0029 Value: 102a00372a Properties: 0x10 Notify (0x10) Value Handle: 0x002a Value UUID: Heart Rate Measurement (0x2a37) Handle: 0x002c Value: 022d00382a Properties: 0x02 Read (0x02) Value Handle: 0x002d Value UUID: Body Sensor Location (0x2a38) Handle: 0x002e Value: 082f00392a Properties: 0x08 Write (0x08) Value Handle: 0x002f Value UUID: Heart Rate Control Point (0x2a39) Handle: 0x0031 Value: 0a32008a2a Properties: 0x0a Read (0x02) Write (0x08) Value Handle: 0x0032 Value UUID: First Name (0x2a8a) Handle: 0x0033 Value: 0a3400902a Properties: 0x0a Read (0x02) Write (0x08) Value Handle: 0x0034 Value UUID: Last Name (0x2a90) Handle: 0x0035 Value: 0a36008c2a Properties: 0x0a Read (0x02) Write (0x08) Value Handle: 0x0036 Value UUID: Gender (0x2a8c)
* monitor/att: Add handler support for Read by TypeLuiz Augusto von Dentz2022-11-042-61/+152
| | | | | This adds handler support for Read by Type so it can further decode the values when the procedure is used.
* tools: Switch hciattach_qualcomm to FAILIF macro completelyMarek Vasut2022-11-011-16/+8
| | | | Use the FAILIF() macro consistently to avoid unused variable n warnings.
* tools: Make hciattach_* firmware path build-time configurableMarek Vasut2022-11-014-6/+8
| | | | | | Make hciattach_qualcomm.c and hciattach_tialt.c behave the same way as hciattach_bcm43xx.c does, where FIRMWARE_DIR can be overridden at build time by using -DFIRMWARE_DIR= CFLAGS.
* tools/test-runner: Remove bluetooth.enable_ecredLuiz Augusto von Dentz2022-10-281-1/+0
| | | | | | L2CAP ECRED is now enabled by default by the following kernel change: 98f18bb78b7d ("Bluetooth: Add CONFIG_BT_LE_L2CAP_ECRED")
* doc/ci.config: Add configuration for CI testTedd Ho-Jeong An2022-10-251-0/+122
| | | | | This patch adds the bluetooth kernel config file used by CI test, which enables all bluetooth features.
* monitor: Ellisys: Add iso packet supportYao Xiao2022-10-241-0/+6
| | | | | | | | | Ellisys Bluetooth Analyzer Injection API Services.pdf HCI Packet Type Object Value HCI Packet Type 0x05 HCI ISO Data (host to controller) 0x85 HCI ISO Data (controller to host)
* client: Fix advertise.data commandLuiz Augusto von Dentz2022-10-201-1/+1
| | | | | | advertise.data when no parameter is given shall print what is set on ad.data not the ad.manufacturer which is a different field set by advertise.manufacturer.
* shared/util: Increase debug trace buffer sizeFrédéric Danis2022-10-191-1/+1
| | | | | Most of the debug traces are longer than 78 characters, increase the buffer to not lost trace's end
* monitor/att: Revert treating Notification/Indication as a requestLuiz Augusto von Dentz2022-10-181-1/+1
| | | | | | | | | | Notification/Indication shall be treated as response (rsp=true) so the correct database is used: > ACL Data RX: Handle 3585 flags 0x02 dlen 14 ATT: Handle Value Notification (0x1b) len 9 Handle: 0x002a Type: Report (0x2a4d) Data: 0000feffff0000
* monitor/att: Detect cache changesLuiz Augusto von Dentz2022-10-181-12/+29
| | | | | This attempts to detect if the were any changes on cache files since they were last loaded and then attempt to reload them.
* settings: Fix scan-build warningLuiz Augusto von Dentz2022-10-181-0/+1
| | | | | | | | | This fixes the following warning: src/settings.c:281:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch] if (ret) { ^~~
* monitor/att: Add decoding support for GMCSAbhay Maheta2022-10-181-0/+513
| | | | | | | | | | | | | | | | | | | This adds decoding support for GMCS attributes. < ACL Data TX: Handle 3585 flags 0x00 dlen 7 ATT: Read Request (0x0a) len 2 Handle: 0x0056 Type: Media Control Point Opcodes Supported (0x2ba5) > ACL Data RX: Handle 3585 flags 0x02 dlen 9 ATT: Read Response (0x0b) len 4 Value: 33180000 Handle: 0x0056 Type: Media Control Point Opcodes Supported (0x2ba5) Supported Opcodes: 0x00001833 Play (0x00000001) Pause (0x00000002) Stop (0x00000010) Move Relative (0x00000020) Previous Track (0x00000800) Next Track (0x00001000)
* profiles: Add initial code for mcp pluginAbhay Maheta2022-10-183-0/+439
| | | | | | | | This adds initial code for mcp plugin which handles Media Control Profile and Generic Media Control Service for Client Role. The plugin exposes dbus methods for media control operations like play, pause which can be invoked using player menu in bluetoothctl.
* shared/mcp: Add initial code for handling MCPAbhay Maheta2022-10-184-0/+1546
| | | | This adds initial code for Media Control Profile for Client Role.
* lib/uuid: Add GMCS UUIDsAbhay Maheta2022-10-181-0/+15
| | | | This adds GMCS UUIDs which will be used by Media Control Profile.
* monitor: Fix incorrect vendor name for vendor cmd and evtTedd Ho-Jeong An2022-10-141-15/+31
| | | | | This patch fixes the issue that the vendor name for all vendor HCI command and event are display as Microsoft.
* mesh: Keep cancelled SAR data for at least 10 secIsak Westin2022-10-121-5/+26
| | | | | | | When a SAR transmission has been completed or cancelled, the recipent should store the block authentication values for at least 10 seconds and ignore new segments with the same values during this period. See MshPRFv1.0.1 section 3.5.3.4.
* mgmt-tester: Fix Set Static Address testsLuiz Augusto von Dentz2022-10-101-12/+51
| | | | | | Set Static Address tests needs to power after setting the address since the programming of the address using the HCI command only happens during power on procedure.
* vhci: Add function to interact with force_static_addressLuiz Augusto von Dentz2022-10-102-0/+11
| | | | | This adds functions that can be used to set debugfs force_static_address.
* btdev: Add support for setting bdaddrLuiz Augusto von Dentz2022-10-102-0/+12
| | | | | This adds btdev_set_bdaddr so it is possible to set an arbritrary address.
* shared/bap: Fixing memory overwrite during ASE Enable OperationAbhay Maheta2022-10-101-2/+6
| | | | | | | | This fixes memory overwrite during ASE Enable operation handling. It avoids crashing of bluetoothd if metadata of more than sizeo of size_t is received. This also fixes storing metadata to stream structure.
* mesh: Fix msg cache ring bufferIsak Westin2022-10-071-2/+1
| | | | | The message cache should be a strict ring buffer, suppressed message should not move to the front of the queue.
* tools: mgmt-tester - Test for HCI cmd after static addr setBrian Gix2022-10-061-0/+6
| | | | | This change checks for the expected HCI command after Static Address change requested.
* mesh: provisionee: Check prov start parametersIsak Westin2022-10-061-11/+46
| | | | | Verify that all parameters in a Provisioning Start PDU are valid, also compared to the capabilities that has been sent.
* mesh: provisionee: Handle failed provisioningIsak Westin2022-10-061-1/+6
| | | | | | When a provisioning fails, all additionally received PDU should be unexpected until link is closed by provisioner. See MshPRFv1.0.1 section 5.4.4.
* mesh: provisionee: Handle unknown PDUsIsak Westin2022-10-061-2/+7
| | | | | If an unknown PDU is received during provisioning, the provisioning should fail with "Invalid PDU".
* mesh: Update Key Refresh flag after provisionIsak Westin2022-10-061-2/+2
| | | | | The Key Refresh flag in the Secure Network beacon is now correctly updated based on provisioning data after being successfully provisioned.
* mesh: Always relay messages from Low Power nodesIsak Westin2022-10-061-11/+36
| | | | | | | If we receive a message from one of our Low Power nodes, which is encrypted using frendship credentials and where the destination is not us, we must relay that message using master credentials. See MshPRFv1.0.1 section 3.6.6.2.
* mesh: Queue a friend update on IV Update changeIsak Westin2022-10-061-0/+1
| | | | | A friend update should be queued when we receive a Secure Network beacon that changes the IV Update state.
* mesh: Verify padding bits in Friend Poll messagesIsak Westin2022-10-061-1/+1
| | | | | The padding bits in a Friend Poll message must be zero. See MshPRFv1.0.1 section 3.6.5.1.
* mesh: Correct size of friend cacheIsak Westin2022-10-061-1/+1
| | | | | The cache size communicated to the Low Power node should be the same as the cache size actually used.
* mesh: Fix mesh to work with MESH_IO_TYPE_UNIT_TESTInga Stotland2022-10-052-2/+8
| | | | | | | This fixes mesh io flow for MESH_IO_TYPE_UNIT_TEST which got broken after: commit 9966cb8b6999a5f54fc13acbd7e1526512a84342 ("mesh: Add new kernel MGMT based IO transport")
* README: Update Mesh required Kernel Config sectionInga Stotland2022-10-031-0/+1
| | | | | Add CONFIG_CRYPTO_USER_API_SKCIPHER to the list of the required .config options
* build: Deprecate meshctl toolInga Stotland2022-10-031-2/+5
| | | | | This marks meshctl tool as deprecated since it is not longer maintained.
* mesh: Allow Key Refresh Phase 0 to 3 transitionIsak Westin2022-10-031-0/+4
| | | | | Transition to Phase 3 from Phase 0 does not cause any state change, but is a valid transition. See MshPRFv1.0.1 section 4.2.14.