summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tools/mgmt-tester: Enable High-Speed(HS) test casesTedd Ho-Jeong An2021-06-232-5/+6
| | | | | This patch enables the BT High-Speed(HS) test cases by enabling the HS in the kernel config.
* device: Fix enabling temporary timer when TemporaryTimeout=0Luiz Augusto von Dentz2021-06-181-23/+25
| | | | | | | When TemporaryTimeout is set to 0 it is supposed to disable the temporary timeout so devices never desappear. Fixes: https://github.com/bluez/bluez/issues/146
* avdtp: Fix parsing capabilitiesArchie Pusaka2021-06-171-2/+2
| | | | | | | This patch fixes size comparison and variable misassignment. Reviewed-by: Alain Michaud <alainm@chromium.org> Reviewed-by: Michael Sun <michaelfsun@google.com>
* monitor: Adding missing device found flag in the parserAlain Michaud2021-06-161-3/+4
| | | | | | | | A new flag was added to the kernel implementation of the Device Found event, but had not been added to the parser leading to an "Unknown device flag" error in btmon. Reviewed-by: Yu Liu <yudiliu@google.com>
* gatt-client: Check length of notify multiple opSebastian Urban2021-06-161-0/+3
| | | | | | Check that specfied length of value in received data does not exceed length of PDU. Otherwise data may be read from beyond the end of the buffer.
* mgmt-tester: Fix typoLuiz Augusto von Dentz2021-06-161-2/+2
| | | | This fixes debup typo.
* monitor: Fix typosLuiz Augusto von Dentz2021-06-151-2/+2
| | | | This fixes interval typos.
* doc: Add initial draft of security bugs handling documentMarcel Holtmann2021-06-151-0/+88
|
* gatt-database: No multiple calls to AcquireWriteSebastian Urban2021-06-141-8/+33
| | | | | | | | | | | | This checks if an outstanding call to AcquireWrite is already in progress. If so, the write request is placed into the queue, but AcquireWrite is not called again. When a response to AcquireWrite is received, acquire_write_reply sends all queued writes over the acquired socket. Making multiple simultaneous calls to AcquireWrite makes no sense, as this would open multiple socket pairs and only the last returned socket would be used for further writes.
* gatt-server: Flush notify multiple buffer when full and fix overflowSebastian Urban2021-06-141-7/+36
| | | | | | | | | | | This fixes the calculation of available buffer space in bt_gatt_server_send_notification and sends pending notifications immediately when there is no more room to add a notification. Previously there was a buffer overflow caused by incorrect calculation of available buffer space: data->offset can equal data->len from a previous call to this function, leading (data->len - data->offset) to underflow after data->offset += 2.
* mgmt-tester: Enable Kernel Debug Experimental FeatureLuiz Augusto von Dentz2021-06-141-0/+27
| | | | | This attempts to enable Kernel Debug Experimental Feature if debug is enabled.
* Release 5.595.59Marcel Holtmann2021-06-132-1/+7
|
* Revert "doc/mgmt-api - Add a new error code for HCI status 0x3e"Marcel Holtmann2021-06-131-2/+0
| | | | This reverts commit 9ad67264d97b882fa58391982ecb5b003368fef0.
* mgmt-tester: Fix adding padding for Ext Adv (Scan Response) DataLuiz Augusto von Dentz2021-06-091-51/+3
| | | | | These commands are actually of variable size so they don't expect padding like in the non-extended version.
* btdev: Check advertising/scanning states when changing Resolving ListLuiz Augusto von Dentz2021-06-091-0/+40
| | | | | | | | | Resolving List cannot be changed when advertising/scanning: • Advertising (other than periodic advertising) is enabled, • Scanning is enabled, or • an HCI_LE_Create_Connection, HCI_LE_Extended_Create_Connection, or HCI_LE_Periodic_Advertising_Create_Sync command is outstanding.
* btdev: Check advertising/scanning states when changing White ListLuiz Augusto von Dentz2021-06-091-0/+68
| | | | | | | | | | | | White List cannot be changed when advertising/scanning: • any advertising filter policy uses the White List and advertising is enabled, • the scanning filter policy uses the White List and scanning is enabled, or • the initiator filter policy uses the White List and an HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is outstanding.
* btdev: Remove debugsLuiz Augusto von Dentz2021-06-041-9/+0
| | | | Remove left-over util_debugs.
* tools/mgmt-tester: Fix expected HCI command accountingInga Stotland2021-06-041-1/+4
| | | | | | | | | | | | | | | | | | This fixes test condition count in the expected HCI command callback. When the expected HCI opcode is detected, mark the condition as done. Any subsequent HCI commands are ignored. Without this fix, in couple of test cases where the expected HCI command is detected more than once, the test may be erroneously reported as a failure or prematurely declared as a success before waiting on an expected MGMT event condition. The test cases where this behavior is fixed: Remove Ext Advertising - Success 1 Remove Ext Advertising - Success 2 Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
* shared/mgmt: Fix not processing request queueLuiz Augusto von Dentz2021-06-041-0/+11
| | | | | | | | | | | | | | | | | | If the kernel returns an invalid opcode like below the request won't be processed making it unusable: @ MGMT Command: Read Advertising Features (0x003d) plen 0 {0x0001} [hci0] 14:25:11.096370 @ MGMT Event: Command Status (0x0002) plen 3 {0x0001} [hci0] 14:25:11.096373 Set Advertising (0x0029) Status: Not Supported (0x0c) In order to fix this attempts to remove the first request pending on the given index: = bluetoothd: src/advertising.c:read_adv_features_callback() Failed to read advertising features: Not Supported (0x0c)
* btdev: Fix handling of white/resolving listLuiz Augusto von Dentz2021-06-041-55/+103
| | | | | | | | le_cig.cis entries was not properly checked which could lead to overwriting le_wl/le_rl field. While at it this also makes changes so have proper struct/fields for le_wl and le_rl so they easier to manage.
* btdev: Fix crash when generating disconnected event for BISLuiz Augusto von Dentz2021-06-031-2/+4
| | | | | When generating disconnected event for a BIS it would not have any link as the ISO is in fact we are broadcasting and don't have an ACL.
* tools/mgmt-tester: Add setup condition to resolve listInga Stotland2021-06-031-0/+10
| | | | | | | | This adds expected setup HCI command condition to "Start Discovery - Disable Resolve List" case. Check that on setup HCI command Set LE Resolve Enable is complete with "enable" parameter set to 1.
* tools/mgmt-tester: Adjust test setup complete checkInga Stotland2021-06-031-1/+2
| | | | | | | This changes check for setup complete in client_cmd_complete() callback from tester_setup_complete() to test_setup_condition_complete(). This allows for combining setup conditions when setup_bthost() is called. Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
* tools/mgmt-tester: Add tests for whitelist and resolving listTedd Ho-Jeong An2021-06-011-0/+363
| | | | | This patch adds test cases for checking the whitelist and resolving list HCI commands when the LL Privacy feature is enabled.
* tools/mgmt-tester: Add tests for experimental feature commandTedd Ho-Jeong An2021-06-011-0/+137
| | | | This patch adds test cases for Read/Set Experimenal Feature commands.
* emulator/btdev: Enable LE Privacy featureTedd Ho-Jeong An2021-06-011-0/+1
| | | | This patch enables LE Privacy to support LL Privacy feature.
* tools/mgmt-tester: Add test cases for get/set device flagsTedd Ho-Jeong An2021-05-261-0/+182
| | | | This patch adds test cases for get/set device flags commands.
* tools/mgmt-tester: Print hexdump if mgmt event parameters not matchTedd Ho-Jeong An2021-05-261-0/+3
| | | | | This patch displays the hexdump of expected and received mgmt event parameters.
* lib: Align mgmt header with documentTedd Ho-Jeong An2021-05-261-1/+6
| | | | | This patch updates the mgmt header to align with the mgmt api document (doc/mgmt-api.txt)
* tools/btmgmt: Add device flags commandsTedd Ho-Jeong An2021-05-261-0/+174
| | | | | | | | | | | | | | | | | | | | This patch adds commands for get/set device flags mgmt ops. Usage: get-flags [-t type] <address> -t type Address Type 0 BR/EDR 1 LE Public 2 LE Random set-flags [-f flags] [-t type] <address> -t type Address Type 0 BR/EDR 1 LE Public 2 LE Random -f flags Device flag. 1 Remote Wake Enable
* mgmt: Add missing opcodes to mgmt_opLuiz Augusto von Dentz2021-05-241-0/+3
| | | | This adds the missing opcodes to mgmt_op so they are properly decoded.
* lib/uuid: Fix string to uuid32 conversionArchie Pusaka2021-05-241-1/+1
| | | | | | Use strtoul to prevent 32 bit overflow Reviewed-by: Yun-Hao Chung <howardchung@chromium.org>
* core: Add RSSI sampling period in system parameterYun-Hao Chung2021-05-244-2/+34
| | | | | | | | | Add an option in main.conf to configure the default RSSI sampling period for advertisement monitor. Reviewed-by: apusaka@chromium.org Reviewed-by: mmandlik@chromium.org Reviewed-by: mcchou@chromium.org
* tools/mgmt-tester: Fix "Remove Ext Advertising" caseInga Stotland2021-05-211-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the expected behavior of the following test case: "Remove Ext Advertising - Success 1", when the fail status was erroneously overwritten with success: <log snip> New Advertising Removed event received Test condition complete, 2 left HCI Command 0x2039 length 6 Invalid parameter size for HCI command Remove Ext Advertising - Success 1 - test failed HCI Command 0x203c length 1 HCI Command 0x2039 length 2 Test condition complete, 1 left Remove Advertising (0x003f): Success (0x00) Test condition complete, 0 left Remove Ext Advertising - Success 1 - test passed The expected HCI command to disable extended advertisement for a non-zero number of sets should contain the specified number the advertising sets. In this particular test case, number of sets is set to 1 and, as a result, the expected HCI command should be: "00 | 01 | 01 00 00 00" disable | number of sets | set info Also, to avoid false positives/negatives, skip exmination of HCI commands after the test conditions are met.
* avrcp: Fix unregister AVRCP playerHuang-Huang Bao2021-05-211-0/+6
| | | | | | | | | | | | | | | | | | 'notify_addressed_player_changed()' expected to be called with 'player->changed_id' set to a non-zero value. player->changed_id = g_idle_add(notify_addressed_player_changed, player); And 'avrcp_player_event()' relies on 'player->changed_id' to perform Addressed Player Changed notification. However, 'avrcp_unregister_player()' calls 'notify_addressed_player_changed()' without adding it to the main loop and set 'player->changed_id'. To indicate addreddsed player changed for both scenarios, we set 'player->changed_id' to 1 at the head of 'notify_addressed_player_changed()'. Fixes https://github.com/bluez/bluez/issues/142
* src/main: Fix double free strTedd Ho-Jeong An2021-05-211-1/+0
| | | | | | This patch fixes the double free the string. The string variable is always freed within its if statement so no need to free it again in the end.
* tools/mgmt-tester: Add test cases for remove uuid commandTedd Ho-Jeong An2021-05-211-0/+143
| | | | This patch adds test cases for the Remove UUID command.
* tools/mgmt-tester: Add test cases for set device id commandTedd Ho-Jeong An2021-05-211-0/+163
| | | | This patch adds test cases for the Set Device ID command.
* monitor: Decode MSFT LE Monitor AdvertisementMarcel Holtmann2021-05-201-1/+28
|
* mesh: Fix race condition memory leakBrian Gix2021-05-191-0/+2
| | | | | | | This is a minor fix of a memory leak triggered on process exit if proceess has been killed right after requesting an outbound advertisement be sent. It is harmless, but will cause an occasional static analysis failure.
* mesh: Add single threading to prov-acp ob messagingBrian Gix2021-05-192-33/+56
| | | | | | | | Certain IOP and stress testing scenarios can cause additional outbound messages to be attempted before the prior outbound message completes. This patch adds queuing if outbpund messages are attempted too quickly so that the additional message is not sent until the prior message is ACKed.
* test/mesh: Add support for testing more OOB authBrian Gix2021-05-191-0/+23
| | | | | | | To pass IOP testing, we need to be able to support Input OOB and Out of band Public Key exchange, This patch adds agent methods to support those capabilities, but are turned off because the test code uses insecure fixed values instead of randomized values.
* tools/mesh: Add all supported OOB methods to cfgclientBrian Gix2021-05-191-5/+27
| | | | | To support the widest range of mesh devices, we need to support any possible capability combinations that a remote device may request.
* mesh: Normalize endian of public/private ECC keysBrian Gix2021-05-192-1/+10
| | | | | | | | | | The Mesh profile specification defines a Mesh byte order of Big Endian for Public keys used to calculate shared secrets. Further the specification sample data also show this same byte order for Private keys. However, our internal ECDH shared secret calculation requires Little Endian byte ordering. This fixes our DBus interface, and debugging output to use Mesh Byte Ordering (Big Endian) for all human readable input/output.
* mesh: Fix delivery of PB-ACK to acceptorsBrian Gix2021-05-191-1/+0
| | | | | Remove unneeded initialization that prevented the Acceptor roll of ever recognizing a valid PB-ACK.
* mesh: Add manpage for bluetooth-meshd daemonInga Stotland2021-05-194-1/+83
| | | | | This adds manpage with a brief description of BLuettoth Mesh daemon command line options.
* core: Fix loading AVDTP optionsYun-Hao Chung2021-05-191-1/+3
| | | | | | | | | | Fix misassigned AVDTP StreamMode option, which causes StreamMode not being set. Fix AVDTP SessionMode option not freed. Reviewed-by: mmandlik@chromium.org Reviewed-by: apusaka@chromium.org Reviewed-by: Tedd Ho-Jeong An <tedd.an@intel.com>
* Fix memory leaks in obexSteve Grubb2021-05-192-2/+7
| | | | | | | | | This patch fixes a couple memory leaks. In filesystem, g_file_get_contents allocates fresh memory to buf. It needs to be freed after conversion to a GString object. Destination was missed on an error path as is mld.
* core: Enable experimental MGMT when experimental is setLuiz Augusto von Dentz2021-05-191-10/+116
| | | | This enables experimental MGMT features when experimental has been set.
* btmon: Use bt_uuid128_to_str when printing UUIDs of 128 bitsLuiz Augusto von Dentz2021-05-181-21/+6
| | | | | This ensures that know UUIDs names are printed including those used by experimental features.