mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 00:34:39 +08:00
monitor: Decode LE Set Periodic Adv Sync Transfer Parameterers command
< HCI Command: LE Periodic Advertising Sync Transfer Parameters (0x08|0x005c) plen 8 Connection handle: 1 Mode: Disabled (0x00) Skip: 0x00 Sync timeout: 0 msec (0x0000) Sync CTE type: 0x0000 > HCI Event: Command Status (0x0f) plen 4 LE Periodic Advertising Sync Transfer Parameters (0x08|0x005c) ncmd 1 Status: Unknown HCI Command (0x01)
This commit is contained in:
parent
9e9ad8ec1c
commit
e0eaaa45d8
@ -2481,6 +2481,15 @@ struct bt_hci_cmd_periodic_adv_set_info_trans {
|
||||
uint16_t adv_handle;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define BT_HCI_CMD_PERIODIC_ADV_SYNC_TRANS_PARAMS 0x205c
|
||||
struct bt_hci_cmd_periodic_adv_sync_trans_params {
|
||||
uint16_t handle;
|
||||
uint8_t mode;
|
||||
uint16_t skip;
|
||||
uint16_t sync_timeout;
|
||||
uint8_t cte_type;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define BT_HCI_EVT_INQUIRY_COMPLETE 0x01
|
||||
struct bt_hci_evt_inquiry_complete {
|
||||
uint8_t status;
|
||||
|
@ -7618,6 +7618,41 @@ static void le_periodic_adv_set_info_trans(const void *data, uint8_t size)
|
||||
print_field("Advertising handle: %d", cmd->adv_handle);
|
||||
}
|
||||
|
||||
static void print_sync_mode(uint8_t mode)
|
||||
{
|
||||
const char *str;
|
||||
|
||||
switch (mode) {
|
||||
case 0x00:
|
||||
str = "Disabled";
|
||||
break;
|
||||
case 0x01:
|
||||
str = "Enabled with report events disabled";
|
||||
break;
|
||||
case 0x02:
|
||||
str = "Enabled with report events enabled";
|
||||
break;
|
||||
default:
|
||||
str = "RFU";
|
||||
break;
|
||||
}
|
||||
|
||||
print_field("Mode: %s (0x%2.2x)", str, mode);
|
||||
}
|
||||
|
||||
static void le_periodic_adv_sync_trans_params(const void *data, uint8_t size)
|
||||
{
|
||||
const struct bt_hci_cmd_periodic_adv_sync_trans_params *cmd = data;
|
||||
|
||||
print_field("Connection handle: %d", cmd->handle);
|
||||
print_sync_mode(cmd->mode);
|
||||
print_field("Skip: 0x%2.2x", cmd->skip);
|
||||
print_field("Sync timeout: %d msec (0x%4.4x)",
|
||||
le16_to_cpu(cmd->sync_timeout) * 10,
|
||||
le16_to_cpu(cmd->sync_timeout));
|
||||
print_create_sync_cte_type(cmd->cte_type);
|
||||
}
|
||||
|
||||
struct opcode_data {
|
||||
uint16_t opcode;
|
||||
int bit;
|
||||
@ -8420,6 +8455,9 @@ static const struct opcode_data opcode_table[] = {
|
||||
{ 0x205b, 327, "LE Periodic Advertising Set Info Transfer",
|
||||
le_periodic_adv_set_info_trans, 5, true,
|
||||
status_handle_rsp, 3, true },
|
||||
{ 0x205c, 328, "LE Periodic Advertising Sync Transfer Parameters",
|
||||
le_periodic_adv_sync_trans_params, 8, true,
|
||||
status_handle_rsp, 3, true},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user