| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
debugfs expects values in string format not binary format.
|
|
|
|
|
|
| |
This replaces the direct setting debugfs to use vhci instance which
properly stores the controller index so it can be used even if there
are real controllers in the system.
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The likes of mainloop_add_fd is not implemented in mainloop-glib.c while
io_set_read_handler so this makes it possible to use vhci instance with
both libshared-glib and libshared-mainloop.
|
|
|
|
|
|
| |
This makes vhci instance read its controller index assigned by the
kernel and also introduces vhci_get_btdev so it can be used by the
likes of hciemu.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
The address type given to the init_conn is the peer address type
(btdev) not the bthost address type, the old code assume it could use
since only BDADDR_BREDR or BDADDR_LE_PUBLIC was tested but with the
upcoming support for LL Privacy the peer address type would become
BDADDR_LE_RANDOM which cannot be used as address type of bthost as that
doesn't support random addresses and would likely cause SMP to fail when
pairing.
|
|
|
|
|
| |
This adds bthost_debug which wraps util_debug and make use of it in
smp.c.
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
| |
Based on the SPEC 5.2 Vol 4, Part E, Section 7.8.54, the
LE_Set_Extended_Advertising_Data_Command may be issued after an
advertising set identifed by the Advertising_Handle has been created
using the HCI_LE_Set_Extended_Advertising_Parameters command.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Remove left-over util_debugs.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
| |
This patch enables LE Privacy to support LL Privacy feature.
|
|
|
|
| |
This adds support for commands related to resolving list.
|
|
|
|
| |
This adds support for Add to/Remove from White List.
|
|
|
|
|
| |
BIS doesn't not have necessarily needs a link if there is no sync in
place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables LE Periodic Advertising bit on LE Read Local Supported
Features:
> HCI Event: Command Complete (0x0e) plen 12
LE Read Local Supported Features (0x08|0x0003) ncmd 1
Status: Success (0x00)
Features: 0x00 0x39 0x00 0xf0 0x01 0x00 0x00 0x00
LE 2M PHY
LE Coded PHY
LE Extended Advertising
LE Periodic Advertising
Connected Isochronous Stream - Master
Connected Isochronous Stream - Slave
Isochronous Broadcaster
Synchronized Receiver
Isochronous Channels (Host Support)
|
|
|
|
|
| |
This patch adds missing commands HCI_Read_RSSI and
HCI_Read_Transmit_Power_Level commands.
|
|
|
|
|
| |
Fields were not being initialized properly and no connection was
created so other commands using the same handle wouldn't work.
|
|
|
|
|
|
|
| |
This adds support for Create BIG command HCI
command in emulator. These changes are needed for
making the emulator useful for testing
LE Audio broadcast feature.
|
|
|
|
|
| |
This is required in order for the host to properly accept/reject the
connection.
|
|
|
|
|
| |
This is required in order for the host to be able to distinguished
errors if there are multiple CIS connections outstanding.
|
|
|
|
|
|
|
| |
This adds support for Periodic Advertising HCI
command in the emulator. These changes are the
first step in making the emulator useful for
testing the LE Audio Broadcast feature
|
|
|
|
|
|
|
|
|
| |
> HCI Event: Command Complete (0x0e) plen 68
Read Local Supported Commands (0x04|0x0002) ncmd 1
Status: Success (0x00)
Commands: 169 entries
...
Configure Data Path (Octet 45 - Bit 5)
|
|
|
|
|
|
|
|
|
| |
> HCI Event: Command Complete (0x0e) plen 68
Read Local Supported Commands (0x04|0x0002) ncmd 1
Status: Success (0x00)
Commands: 168 entries
...
Read Local Supported Controller Delay (Octet 45 - Bit 4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
< HCI Command: Read Local Supported Controller Delay (0x04|0x000f) plen 8
Codec: mSBC (0x05)
Logical Transport Type: 0x02
Codec supported over BR/EDR SCO and eSCO
Direction: Input (Host to Controller) (0x00)
Length Codec Configuration: 0
> HCI Event: Command Complete (0x0e) plen 10
Read Local Supported Controller Delay (0x04|0x000f) ncmd 1
Status: Success (0x00)
Minimum Controller delay: 0 us (0x000000)
Maximum Controller delay: 0 us (0x000000)
|
|
|
|
|
|
|
|
|
| |
> HCI Event: Command Complete (0x0e) plen 68
Read Local Supported Commands (0x04|0x0002) ncmd 1
Status: Success (0x00)
Commands: 167 entries
...
Read Local Supported Codec Capabilities (Octet 45 - Bit 3)
|
|
|
|
|
|
|
|
|
| |
> HCI Event: Command Complete (0x0e) plen 68
Read Local Supported Commands (0x04|0x0002) ncmd 1
Status: Success (0x00)
Commands: 167 entries
...
Read Local Supported Codecs V2 (Octet 45 - Bit 2)
|
|
|
|
|
| |
ISO packets were not correctly parsed causing them to not be sent
properly.
|
|
|
|
|
| |
This adds -d/--debug options which enables debug of vhci instance on
btvirt.
|
|
|
|
| |
This enables debug with btdev_set_debug.
|
|
|
|
|
| |
For a Set to be disable there is a dedicated event that terminates the
set otherwise it should be considered enabled even when connected.
|