summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools/test-runner: add option to start Pipewire inside the VMHEADmasterPauli Virtanen2023-05-171-4/+145
| | | | | | | | Add option for launching Pipewire inside the VM to serve Bluetooth endpoints, which can be used in tests. Make the option to optionally take path to the audio daemon, so e.g. Pulseaudio support can be added later.
* test-runner: revert udevd and audio supportPauli Virtanen2023-05-171-105/+3
| | | | | | | | Tests running inside the VM don't need access to sound cards running on the host. This reverts commit 91a48af52efb0751fab396b2b9026c9186b10b88 This reverts commit e20e7e0b05c7edb74255c9b092916ac5bb99c97f
* tools/iso-tester: Add Broadcast tests for encrypted BIGIulia Tanasescu2023-04-191-7/+57
| | | | | | | This adds the following tests for encrypted broadcast: ISO Broadcaster Encrypted - Success ISO Broadcaster Receiver Encrypted - Success
* tools/isotest: Add BIG encryption optionsIulia Tanasescu2023-04-192-29/+91
| | | | Add command line options for BIG encryption and broadcast code.
* iso-tester: Add BAP Audio Configuration testsLuiz Augusto von Dentz2023-04-131-8/+262
| | | | | | | | | | | | | | | | | | This adds the following tests based on BAP Audio Configurations: ISO AC 1 & 4 - Success ISO AC 2 & 10 - Success ISO AC 3 & 5 - Success ISO AC 6(i) - Success ISO AC 6(ii) - Success ISO AC 7(i) - Success ISO AC 7(ii) - Success ISO AC 8(i) - Success ISO AC 8(ii) - Success ISO AC 9(i) - Success ISO AC 9(ii) - Success ISO AC 11(i) - Success ISO AC 11(ii) - Success
* mgmt-tester: Fix Get/Set PHY testsLuiz Augusto von Dentz2023-04-071-30/+19
| | | | | | | | | This fixes the following tests now that all supported PHYs are enabled by default: Start Discovery LE - (Ext Scan Param) Failed Get PHY Success Failed Set PHY 1m 2m coded Succcess Timed out
* Split bt_iso_qos into dedicated structuresIulia Tanasescu2023-03-313-82/+291
| | | | | Split bt_iso_qos into dedicated unicast and broadcast structures and add additional broadcast parameters.
* mgmt-tester: Add devcoredump testsManish Mandlik2023-03-301-0/+173
| | | | | | Add mgmt-tester tests for hci devcoredump. These testa trigger the devcoredump with a test data and verifies the generated devcoredump file for the test data and correct devcoredump header fields.
* l2test: Fix setting mode for BR/EDR l2cap socketSimon Mikuda2023-03-281-1/+21
| | | | | BT_MODE_* enums are used only for socket SOL_BLUETOOTH, option BT_MODE Otherwise we should use L2CAP_MODE_* enums.
* l2test: Enable hex input for PSMSimon Mikuda2023-03-281-1/+1
|
* tools/mesh-cfgclient: Auto request own composition dataInga Stotland2023-03-174-2/+26
| | | | | | | | When attaching a local provisioner node, always request own composition data to accommodate functional consolidation of regular and remote provisioning mechanisms. The knowledge of the own node composition is necessary for provisioning initiation and self configuration.
* tools/mesh-cfgclient: Prevent storing duplicate modelsInga Stotland2023-03-172-5/+21
| | | | | | | This fixes the situation when subsequent requests to get a node composition result in appending element's model list with duplicate models. This adds a check for a presence of a model on an element when attempting to add a new model ID to a model list on this element.
* btmon: Fix decoding truncated dataƁukasz Rymanowski2023-03-141-3/+3
| | | | | | | | Some platforms use different filtering and for this purpose, some of the ACL/SCO/ISO/SDP data is truncated. In such a case, included length is smaller than the original size. Without this fix, btmon stops working after first truncated packet.
* tools: Add support to generate RSI using SIRKSathish Narasimman2023-03-101-2/+78
| | | | | | | | | | | | | The patch helps to generate Resolvable set identifier adv data. which can be used as ADV data during advertisement. It will be used to identify the device as part of setmember for Coordinated set identification profile. Example: $<path to advtest/>advtest -i "761FAE703ED681F0C50B34155B6434FB" SIRK: 761FAE703ED681F0C50B34155B6434FB RSI: 0x71 0xcb 0xbc 0x7e 0x01 0x84 Random: bccb71 Hash: 84017e
* iso-tester: Update High Reliability presetsLuiz Augusto von Dentz2023-03-101-16/+16
| | | | | | This updates High Reliability presets as published in BAP 1.0.1: https://www.bluetooth.com/specifications/bap-1-0-1/
* l2cap-tester: Add server tests for Ext-FlowctlLuiz Augusto von Dentz2023-03-091-24/+228
| | | | | | | | | | This adds the following tests: L2CAP Ext-Flowctl Server - Success L2CAP Ext-Flowctl Server - Nval SCID L2CAP LE EATT Client - Success L2CAP LE EATT Server - Success L2CAP LE EATT Server - Reject
* iso-tester: Add test for central receiving timestamped ISO packetPauli Virtanen2023-02-271-1/+15
| | | | | | | | | This attempts to receive a timestamped HCI ISO data packet on central. With kernel 6.2 HCI ISO packet parsing this test fails with Bluetooth: Frame malformed (len 40, expected len 0) Link: https://lore.kernel.org/linux-bluetooth/1fd2d4523c139deda93aab2c31f1508d79c32472.1676921889.git.pav@iki.fi/
* bthost: Allow sending ISO packets with sequence number and timestampPauli Virtanen2023-02-271-1/+2
| | | | | | | | Change bthost_send_iso to take packet sequence number and timestamp, and allow it to send timestamped HCI ISO data packets. Currently, btdev passes through ISO packets, so this can also be used to test RX timestamping.
* tools/btmgmt: add MGMT setting bit names for CIS feature supportPauli Virtanen2023-02-131-0/+2
| | | | | | | | | | | | | | | | Add names for CIS Central/Peripheral MGMT setting bits: [mgmt]# info Index list with 1 item hci0: Primary controller addr XX:XX:XX:XX:XX:XX version 12 manufacturer 2 class 0x7c0104 supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr le advertising secure-conn debug-keys privacy configuration static-addr phy-configuration wide-band-speech cis-central cis-peripheral current settings: powered bondable ssp br/edr le secure-conn cis-central cis-peripheral name xxx short name hci0: Configuration options supported options: public-address missing options:
* tools/mesh-cfgtest: Support extended device compositionInga Stotland2023-01-301-20/+168
| | | | | | | This adds support for extended device composition to account for new fundamental models supported by bluetooth-meshd daemon. Also, update to include explicit element locations and handle different ordering of model IDs in the composition data.
* tools/mesh: Add support for Mesh Private BeaconsBrian Gix2023-01-303-12/+62
| | | | | This allows generation of Mesh Private Beacon server commands, and recognition of the resulting Status messages.
* tools/mesh: Optimize for multiple RPR servers and NPPIBrian Gix2023-01-306-87/+598
| | | | | | | | | | These changes allow the mesh-cfgclient tool to request remote node compositions from page 128. Depending on the differences between there and what is stored in the local configuration database, it may recomend reprovisioning with NPPI-1 (Address Refresh) or NPPI-2 (Composition Refresh). Additionally, NPPI-0 may be performed to refresh the Device Key only.
* isotest: Fix not calculating time to waitLuiz Augusto von Dentz2022-12-091-0/+4
| | | | | The difference of time start and current time may have advanced just enough to add a second leaving start nanoseconds to be bigger.
* iso-tester: Add test when peer rejects CISLuiz Augusto von Dentz2022-12-071-6/+31
| | | | | | | This adds the following test for testing when remote stack rejects the CIS: ISO Connect - Reject Passed
* bthost: Add callback to accept ISO connectionsLuiz Augusto von Dentz2022-12-061-1/+1
| | | | | This enables setting an accept callback which can return reject reason if the connection shall not be accepted.
* 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.
* 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")
* 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.
* 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.
* tools: Fix mesh-tester to expect end of ADVBrian Gix2022-09-271-0/+12
| | | | Tester was failing by not clearing the HCI queue of expected events
* rctest: Fix scan-build warningLuiz Augusto von Dentz2022-09-271-1/+1
| | | | | | | | | This fixes the following warning: tools/rctest.c:131:2: warning: 1st function call argument is an uninitialized value [core.CallAndMessage] sdp_list_free(protos, NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~
* tools/mpris-proxy: unregister object path if player registration failsHaochen Tong2022-09-261-0/+1
| | | | | | | The `owner' string, passed as user data, is freed if the player fails registration, but the object path still exists. Upon program exiting, the lingering path will be enumerated and the attached user data will be freed again.
* tools: fix printf format stringsChristian Eggers2022-09-262-4/+6
| | | | time_t is 64 bit (long long) on many 32 bit platforms (e.g. ARM) now
* tools/ioctl-tester - Add ioctl-testerTedd Ho-Jeong An2022-09-212-0/+962
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ioctl-tester which tests the IOCTL commands. HCI Down Device List Device List - Invalid Param 1 Device Info Reset Stat Set Link Mode - ACCEPT Set Link Mode - MASTER Set Pkt Type - DM Set Pkt Type - DH Set Pkt Type - HV Set Pkt Type - 2-DH Set Pkt Type - 2-DH Set Pkt Type - ALL Set ACL MTU - 1 Set ACL MTU - 2 Set SCO MTU - 1 Set SCO MTU - 2 Block BDADDR - Success Block BDADDR - Fail Unblock BDADDR - Success Unblock BDADDR - Fail Connection List - No Conn Connection List Connection Info Connection Info - No Connection Connection Info - Wrong Type Authentication Info - No Connection Authentication Info
* rfcomm-tester: Add test to close socket while connectingLuiz Augusto von Dentz2022-09-131-4/+37
| | | | | This adds Basic RFCOMM Socket Client - Close test which attempt to close socket while connecting.
* rfcomm-tester: Use latest Bluetooth versionLuiz Augusto von Dentz2022-09-021-1/+1
| | | | | | This makes rfcomm-tester use the latest Bluetooth supported by the emulator which is useful the detect regression related to ACL data transfer.
* mgmt-tester: Adds turning on Mesh Experimental featureBrian Gix2022-09-011-2/+38
| | | | | | Turns on experimental Mesh feature, and expects it in report when querying which experimental features are supported and have been enabled.
* tools: Add mesh-tester to test Kernel mesh supportBrian Gix2022-09-012-0/+1443
| | | | Ever growing set of tests for Mesh kernel support
* tools/btmgmt: add missing return statementChristian Eggers2022-08-291-1/+1
| | | | Leave function on error instead of printing (possibly) invalid flags.
* client/player: Use QoS interval on transport.sendLuiz Augusto von Dentz2022-08-291-1/+0
| | | | This makes use of QoS interval when sending a file.
* client/player: Add support for PACS endpointsLuiz Augusto von Dentz2022-08-291-1/+1
| | | | | This adds support for PAC_SINK and PAC_SOURCE endpoints as well as LC3 presets.
* iso-tester: Make use of bthost_add_iso_hook destroy callbackLuiz Augusto von Dentz2022-08-221-21/+31
| | | | | | | This makes use of bthost_add_iso_hook to track when an ISO connection has been disconnected and then set its handle to 0x0000 which is then checked when the socket HUP to confirm the remote has properly disconnected (e.g. received Disconnected Complete).
* bthost: Add destroy callback to bthost_add_iso_hookLuiz Augusto von Dentz2022-08-221-1/+1
| | | | | This adds a destroy callback to bthost_add_iso_hook so its user can detect when the hook is freed when the connection is disconnected.
* iso-tester: Fix using shutdown(SHUT_RDWR)Luiz Augusto von Dentz2022-08-191-6/+6
| | | | | | shutdown(SHUT_RDWR) results in socket being HUP immeditaly instead of waiting for Disconnect Complete event so instead just use SHUT_WR to start the disconnect procedure without causing the socket to HUP.
* iso-tester: Introduce tests for Disconnect/ReconnectLuiz Augusto von Dentz2022-08-151-0/+80
| | | | | | This introduces a test that do use shutdown to disconnect an ISO socket and then another one that attempts to reconnect it again to emulate upper profile transitions.
* iso-tester: Add ISO 48_2_1 Defer Receive - SuccessLuiz Augusto von Dentz2022-08-051-1/+19
| | | | | This adds a test to check if different QoS are properly handled when acting as peripheral.
* bthost: Add qos support to bthost_set_cig_paramsLuiz Augusto von Dentz2022-08-051-1/+1
| | | | This enables setting QoS other then the mandatory 16_2_1.
* build: Fix make check failingLuiz Augusto von Dentz2022-08-041-0/+7
| | | | | This fixes make check failing because lack of suppression for bind on bt_log_open.