From 274df58a0d256c729dfcf1100f834f52ab364571 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 19 Sep 2013 19:42:02 +0300 Subject: [PATCH] emulator: Add basic advertise enable support for bthost --- emulator/bthost.c | 7 +++++++ emulator/bthost.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/emulator/bthost.c b/emulator/bthost.c index 4b025efb3..ae274b410 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -433,6 +433,8 @@ static void evt_cmd_complete(struct bthost *bthost, const void *data, break; case BT_HCI_CMD_WRITE_SCAN_ENABLE: break; + case BT_HCI_CMD_LE_SET_ADV_ENABLE: + break; default: printf("Unhandled cmd_complete opcode 0x%04x\n", opcode); break; @@ -919,6 +921,11 @@ void bthost_write_scan_enable(struct bthost *bthost, uint8_t scan) send_command(bthost, BT_HCI_CMD_WRITE_SCAN_ENABLE, &scan, 1); } +void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable) +{ + send_command(bthost, BT_HCI_CMD_LE_SET_ADV_ENABLE, &enable, 1); +} + void bthost_set_server_psm(struct bthost *bthost, uint16_t psm) { bthost->server_psm = psm; diff --git a/emulator/bthost.h b/emulator/bthost.h index b621d7039..dd497e8f4 100644 --- a/emulator/bthost.h +++ b/emulator/bthost.h @@ -60,6 +60,8 @@ bool bthost_l2cap_req(struct bthost *bthost, uint16_t handle, uint8_t req, void bthost_write_scan_enable(struct bthost *bthost, uint8_t scan); +void bthost_set_adv_enable(struct bthost *bthost, uint8_t enable); + void bthost_set_server_psm(struct bthost *bthost, uint16_t psm); void bthost_start(struct bthost *bthost); -- 2.47.3