diff --git a/monitor/bt.h b/monitor/bt.h
index 9f50a43..64cbe74 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
uint8_t mode;
} __attribute__ ((packed));
+#define BT_HCI_CMD_READ_PAGE_SCAN_TYPE 0x0c46
+struct bt_hci_rsp_read_page_scan_type {
+ uint8_t status;
+ uint8_t type;
+} __attribute__ ((packed));
+
+#define BT_HCI_CMD_WRITE_PAGE_SCAN_TYPE 0x0c47
+struct bt_hci_cmd_write_page_scan_type {
+ uint8_t type;
+} __attribute__ ((packed));
+
#define BT_HCI_CMD_READ_AFH_ASSESS_MODE 0x0c48
struct bt_hci_rsp_read_afh_assess_mode {
uint8_t status;
diff --git a/monitor/packet.c b/monitor/packet.c
index bd68d35..dc2a9ee 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
print_field("Mode: %s (0x%2.2x)", str, mode);
}
+static void print_pscan_type(uint8_t type)
+{
+ const char *str;
+
+ switch (type) {
+ case 0x00:
+ str = "Standard Scan";
+ break;
+ case 0x01:
+ str = "Interlaced Scan";
+ break;
+ default:
+ str = "Reserved";
+ break;
+ }
+
+ print_field("Type: %s (0x%2.2x)", str, type);
+}
+
static void print_simple_pairing_mode(uint8_t mode)
{
const char *str;
print_inquiry_mode(cmd->mode);
}
+static void read_page_scan_type_rsp(const void *data, uint8_t size)
+{
+ const struct bt_hci_rsp_read_page_scan_type *rsp = data;
+
+ print_status(rsp->status);
+ print_pscan_type(rsp->type);
+}
+
+static void write_page_scan_type_cmd(const void *data, uint8_t size)
+{
+ const struct bt_hci_cmd_write_page_scan_type *cmd = data;
+
+ print_pscan_type(cmd->type);
+}
+
static void read_ext_inquiry_response_rsp(const void *data, uint8_t size)
{
const struct bt_hci_rsp_read_ext_inquiry_response *rsp = data;
{ 0x0c45, 103, "Write Inquiry Mode",
write_inquiry_mode_cmd, 1, true,
status_rsp, 1, true },
- { 0x0c46, 104, "Read Page Scan Type" },
- { 0x0c47, 105, "Write Page Scan Type" },
+ { 0x0c46, 104, "Read Page Scan Type",
+ null_cmd, 0, true,
+ read_page_scan_type_rsp, 2, true },
+ { 0x0c47, 105, "Write Page Scan Type",
+ write_page_scan_type_cmd, 1, true,
+ status_rsp, 1, true },
{ 0x0c48, 106, "Read AFH Channel Assessment Mode" },
{ 0x0c49, 107, "Write AFH Channel Assessment Mode" },
/* reserved commands */