From 6655d2b19d82347d960778588a1d63abdc9b574a Mon Sep 17 00:00:00 2001 From: XuGuohui Date: Sat, 16 Jan 2016 17:18:29 +0800 Subject: [PATCH] Add Local Name to BLE advertising data packet and fix the bug when more than one Duo being advertising, the LightBlue can not distinguish them --- hal/src/duo/ble_provision.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hal/src/duo/ble_provision.c b/hal/src/duo/ble_provision.c index 2c641aa0dc..3b71a88bfb 100644 --- a/hal/src/duo/ble_provision.c +++ b/hal/src/duo/ble_provision.c @@ -188,7 +188,10 @@ void ble_provision_init(void) adv_data.flag = 0x06; adv_data.p_services_128b = &service; - wiced_bt_ble_set_advertisement_data(BTM_BLE_ADVERT_BIT_FLAGS|BTM_BLE_ADVERT_BIT_SERVICE_128, &adv_data); + wiced_bt_ble_set_advertisement_data(BTM_BLE_ADVERT_BIT_FLAGS|BTM_BLE_ADVERT_BIT_SERVICE_128|BTM_BLE_ADVERT_BIT_DEV_NAME, &adv_data); + + /* Enable privacy */ + wiced_bt_ble_enable_privacy( TRUE ); /* Register for gatt event notifications */ wiced_bt_gatt_register(&ble_provision_gatt_cback);