| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This adds the following tests for encrypted broadcast:
ISO Broadcaster Encrypted - Success
ISO Broadcaster Receiver Encrypted - Success
|
|
|
|
|
| |
The code was assuming only index 0 was to be used which doesn't work
when there are multiple CIS being programmed with different parameters.
|
|
|
|
|
| |
This adds btdev_set_bdaddr so it is possible to set an arbritrary
address.
|
|
|
|
|
|
|
|
|
|
|
| |
Bluetooth Core specification says the CIG must be in configurable state
in order to accept the SetCIGParameters:
BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2553:
'If the Host issues this command when the CIG is not in the
configurable state, the Controller shall return the error
code Command Disallowed (0x0C).'
|
|
|
|
|
| |
This makes sure that all connections and advertising sets are cleanup
on reset.
|
|
|
|
|
| |
CIS Established was using the ISO latency instead of SDU interval for
transport latency.
|
|
|
|
| |
This introduces bthost_set_cig_params and bthost_create_cis.
|
|
|
|
| |
This resets ssp_status and ssp_auto_complete flags on auth_complete.
|
|
|
|
| |
This fixes status return to BIG Create Sync command.
|
|
|
|
|
| |
This adds support for sending LE BIG Info Adv Reports if LE Create BIG
has been called.
|
|
|
|
|
| |
This checks if the parameters given to Set CIG Parameters and Remove CIG
are in the valid range.
|
|
|
|
|
| |
The response should both the status and TX Power regardless if the
command succeeds or not.
|
|
|
|
|
| |
This sends BT_HCI_EVT_DISCONNECT_COMPLETE when handling
BT_HCI_CMD_LE_BIG_TERM_SYNC.
|
|
|
|
|
| |
This sends BT_HCI_EVT_LE_BIG_SYNC_ESTABLISHED when handling
BT_HCI_CMD_LE_BIG_CREATE_SYNC.
|
|
|
|
| |
This renames the use of Periodic Advertising in the API to just PA.
|
|
|
|
|
|
| |
This sends BT_HCI_EVT_LE_PER_SYNC_ESTABLISHED if remote device start
to periodic advertise when BT_HCI_CMD_LE_PERIODIC_ADV_CREATE_SYNC is
pending.
|
|
|
|
|
| |
This sends BT_HCI_EVT_LE_PER_SYNC_ESTABLISHED if scan is initiated
while BT_HCI_CMD_LE_PERIODIC_ADV_CREATE_SYNC is pending.
|
|
|
|
| |
This adds implementation of BT_HCI_CMD_LE_PERIODIC_ADV_TERM_SYNC.
|
|
|
|
|
|
| |
This adds implementation of
BT_HCI_CMD_LE_PERIODIC_ADV_CREATE_SYNC_CANCEL generating
BT_HCI_EVT_LE_PER_SYNC_ESTABLISHED if necessary.
|
|
|
|
|
|
| |
This adds implementation of BT_HCI_CMD_LE_PERIODIC_ADV_CREATE_SYNC
generating BT_HCI_EVT_LE_PER_SYNC_ESTABLISHED and
BT_HCI_EVT_LE_PER_ADV_REPORT.
|
|
|
|
|
|
| |
The PDU of Create BIG is actually fixed size as the num_bis is
related to the number of indexes to be connected and not the BIS
parameters.
|
|
|
|
|
| |
BT_HCI_CMD_LE_REMOVE_CIG should respond with the CIG ID from the
command instead of always responding with 0x00.
|
|
|
|
|
| |
The status was reporting BT_HCI_CMD_DISCONNECT instead of
BT_HCI_CMD_LE_TERM_BIG.
|
|
|
|
|
|
| |
This adds handler for BT_HCI_CMD_LE_TERM_BIG and generate
BT_HCI_EVT_LE_BIG_TERMINATE to indicate to the host stack that the
BIG has been terminated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for vendor commands reserving a single opcode (0xfc10)
so it can be extended using subcommands, similar to how MSFT works.
The first subcommand (0x00) enables the emulator to generate arbitrary
events using the commands parameters:
> tools/hcitool cmd 3f 10 00 22 24 d0 d0 d0 d0 d0 d0 ff ff
< HCI Command: Vendor (0x3f|0x0010) plen 11
00 22 24 d0 d0 d0 d0 d0 d0 ff ff
."$........
Bluetooth: hci0: Malformed HCI Event: 0x22
> HCI Event: Inquiry Result with R.. (0x22) plen 9
Num responses: 36
Page scan repetition mode: Reserved (0xff)
Page period mode: Reserved (0xff)
Class: 0xffffd0
Major class: Uncategorized, specific device code not specified
Minor class: 0x34
Limited Discoverable Mode
invalid service class
Clock offset: 0x6368
RSSI: 105 dBm (0x69)
> HCI Event: Command Complete (0x0e) plen 4
Vendor (0x3f|0x0010) ncmd 1
Status: Success (0x00)
|
|
|
|
|
| |
This adds support for BT_HCI_CMD_LE_CREATE_CONN_CANCEL so it is able to
generate proper command complete.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for LE Set Privacy mode which is required when using
Device Privacy mode:
< HCI Command: LE Set Priva.. (0x08|0x004e) plen 8
Peer Identity address type: Public (0x00)
Peer Identity address: BC:9A:78:56:34:12 (OUI BC-9A-78)
Privacy Mode: Use Device Privacy (0x01)
> HCI Event: Command Complete (0x0e) plen 4
LE Set Privacy Mode (0x08|0x004e) ncmd 1
|
|
|
|
|
| |
This patch add supprt emulator to get the advertising address of the
central device.
|
|
|
|
|
| |
This patch adds interfaces to config the accept list and resolve list in
the btdev.
|
|
|
|
|
| |
Command callback can only be used when generating a command status as
command complete can carry more than just the status.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables the emulator to properly emulate the generation of a Local
RPA so it always set the random_addr when Create Connection sets 0x03 as
own_addr_type 0x03:
< HCI Command: LE Extended.. (0x08|0x0043) plen 26
Filter policy: Accept list is not used (0x00)
Own address type: Random (0x03)
Peer address type: Public (0x00)
Peer address: 00:AA:01:01:00:00 (Intel Corporation)
Initiating PHYs: 0x01
Entry 0: LE 1M
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Min connection interval: 30.00 msec (0x0018)
Max connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4
LE Extended Create Connection (0x08|0x0043) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 31
LE Enhanced Connection Complete (0x0a)
Status: Success (0x00)
Handle: 42
Role: Central (0x00)
Peer address type: Public (0x00)
Peer address: 00:AA:01:01:00:00 (Intel Corporation)
Local resolvable private address: 60:0C:C5:B9:10:5D (Resolvable)
Peer resolvable private address: 00:00:00:00:00:00 (Non-Resolvable)
Connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Central clock accuracy: 0x00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the initial support for MSFT vendor commands and enable them
when in btvirt:
< HCI Command: Microsoft Ex.. (0x3f|0x001e) plen 1
Read Supported Features (0x00)
> HCI Event: Command Complete (0x0e) plen 14
Microsoft Extension (0x3f|0x001e) ncmd 1
Read Supported Features (0x00)
Status: Success (0x00)
Features: 0x3f 0x00 0x00 0x00 0x00 0x00 0x00 0x00
RSSI Monitoring feature for BR/EDR
RSSI Monitoring feature for LE connections
RSSI Monitoring of LE advertisements
Advertising Monitoring of LE advertisements
Verifying the validity of P-192 and P-256 keys
Continuous Advertising Monitoring
Event prefix length: 0
Event prefix:
< HCI Command: Microsoft Ex.. (0x3f|0x001e) plen 2
LE Set Advertisement Filter Enable (0x05)
Enable: All filter conditions (0x01)
> HCI Event: Command Complete (0x0e) plen 5
Microsoft Extension (0x3f|0x001e) ncmd 1
LE Set Advertisement Filter Enable (0x05)
Status: Success (0x00)
|
|
|
|
|
|
| |
This makes the emulator use Linux Foundation manufacturer id which
shall be simpler to distinguish emulator instances since it is unlikely
there will be other vendors using it.
|
|
|
|
| |
This adds functions that can be used to set debugfs options.
|
|
|
|
|
| |
This makes use of vhci_open to isntanciate the vhci btdev since that
has proper support for reading the index assigned to it.
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", and "accept list".
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
|
|
|
| |
BT core spec 5.3 promotes the usage of inclusive languages.
This CL replaces some terms with the more appropriate counterparts,
such as "central", "peripheral", "link key", and "accept list"
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
|
|
|
|
|
| |
Consider the advertising set disabled but don't remove it as the host
may still reuse it.
|
|
|
|
|
|
| |
BT_HCI_EVT_LE_ADV_SET_TERM shall come after
BT_HCI_EVT_LE_ENHANCED_CONN_COMPLETE otherwise the host doesn't know
the connection handle.
|
|
|
|
|
| |
The device where the event should be sent is the same that had created
not the connection one.
|
|
|
|
|
| |
Add support for enhanced_setup_synchronous_connection command
in btdev
|
|
|
|
|
|
|
| |
When own_address_type is set to 0x03 the host expects the controller to
generate RPAs using the stored IRK from the resolving list and in
addition to that set the generated RPA as Local RPA in LE Enhanced
Connection Complete.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The spec says LE Set Random Address cannot be used when scan is enabled
or with legacy advertising:
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 4, Part E
page 2480
'If the Host issues this command when any of advertising (created
using legacy advertising commands), scanning, or initiating are
enabled, the Controller shall return the error code Command
Disallowed (0x0C).'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
own_addr_type 0x01 and 0x03 shall check that a random address has
properly been set:
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 4, Part E
page 2496:
'If LE_Scan_Enable is set to 0x01, the scanning parameters'
Own_Address_Type parameter is set to 0x01 or 0x03, and the random
ddress for the device has not been initialized, the Controller shall
return the error code Invalid HCI Command Parameters (0x12).'
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 4, Part E
page 2614:
'If Enable is set to 0x01, the scanning parameters' Own_Address_Type
parameter is set to 0x01 or 0x03, and the random address for the
device has not been initialized, the Controller shall return the
error code Invalid HCI Command Parameters (0x12).'
|
|
|
|
| |
This patch adds support HCI_READ_CLOCK command in btdev.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
own_addr_type 0x01 and 0x03 shall check that a random address has
properly been set and in case of 0x03 the resolving list actually
contains the irk of the identity address:
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 4, Part E
page 2596
'If the advertising set's Own_Address_Type parameter is set to 0x01
and the random address for the advertising set has not been
initialized, the Controller shall return the error code Invalid HCI
Command Parameters (0x12).'
BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 4, Part E
page 2597
'If the advertising set's Own_Address_Type parameter is set to 0x03,
the controller's resolving list did not contain a matching entry, and
the random address for the advertising set has not been initialized,
the Controller shall return the error code Invalid HCI Command
Parameters (0x12).'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch clean up the queue for connection before closing the test to
prevent the potential memory leak.
==50== 32 bytes in 1 blocks are definitely lost in loss record 18 of 32
==50== at 0x483A809: malloc (vg_replace_malloc.c:307)
==50== by 0x14A37E: btd_malloc (util.c:33)
==50== by 0x149D9D: queue_new (queue.c:47)
==50== by 0x13B3C0: btdev_create (btdev.c:6042)
==50== by 0x13178E: create_vhci (hciemu.c:229)
==50== by 0x13178E: hciemu_new_num (hciemu.c:403)
==50== by 0x130E2C: read_index_list_callback (mgmt-tester.c:357)
==50== by 0x14AD91: request_complete (mgmt.c:264)
==50== by 0x14BD34: can_read_data (mgmt.c:356)
==50== by 0x14E794: watch_callback (io-glib.c:157)
==50== by 0x48B578E: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.6)
==50== by 0x48B5B17: ??? (in /usr/lib64/libglib-2.0.so.0.6400.6)
==50== by 0x48B5E32: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6400.6)
==50==
==50== 32 bytes in 1 blocks are definitely lost in loss record 19 of 32
==50== at 0x483A809: malloc (vg_replace_malloc.c:307)
==50== by 0x14A37E: btd_malloc (util.c:33)
==50== by 0x149D9D: queue_new (queue.c:47)
==50== by 0x13B3C0: btdev_create (btdev.c:6042)
==50== by 0x1318F7: hciemu_client_new (hciemu.c:332)
==50== by 0x1318F7: hciemu_new_num (hciemu.c:412)
==50== by 0x130E2C: read_index_list_callback (mgmt-tester.c:357)
==50== by 0x14AD91: request_complete (mgmt.c:264)
==50== by 0x14BD34: can_read_data (mgmt.c:356)
==50== by 0x14E794: watch_callback (io-glib.c:157)
==50== by 0x48B578E: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6400.6)
==50== by 0x48B5B17: ??? (in /usr/lib64/libglib-2.0.so.0.6400.6)
==50== by 0x48B5E32: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.6400.6)
|
|
|
|
|
| |
This patch adds support the HCI_LE_Advertising_Set_Terminated event in
btdev.
|
|
|
|
| |
This patch adds support multiple instance of extended advertising.
|
|
|
|
|
|
|
|
|
| |
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.
|