Diff between f7ab1f6078cc9e2fc41e81907ec6bc45b4c7a633 and 274df58a0d256c729dfcf1100f834f52ab364571

Changed Files

File Additions Deletions Status
emulator/bthost.c +7 -0 modified
emulator/bthost.h +2 -0 modified

Full Patch

diff --git a/emulator/bthost.c b/emulator/bthost.c
index 4b025ef..ae274b4 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 b621d70..dd497e8 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);