From e32d4e546a1b684356bc65fd90b19a1f8c7363b7 Mon Sep 17 00:00:00 2001 From: Tian Hao Date: Mon, 10 Oct 2016 19:21:12 +0800 Subject: [PATCH] component/bt : advertising no random address 1. advertising with public bdaddr 2. increase queue size avoid for exception because of the log is a lot --- components/bt/bluedroid/stack/btu/btu_task.c | 2 +- .../components/bluedroid_demos/app_core/bt_app_core.c | 8 ++++---- .../bluedroid_demos/app_project/SampleServerProject.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/bt/bluedroid/stack/btu/btu_task.c b/components/bt/bluedroid/stack/btu/btu_task.c index 802a67eb15..1d419fd845 100755 --- a/components/bt/bluedroid/stack/btu/btu_task.c +++ b/components/bt/bluedroid/stack/btu/btu_task.c @@ -347,7 +347,7 @@ void btu_task_post(void) void btu_task_start_up(void) { // ke_event_callback_set(KE_EVENT_BTU_TASK_THREAD, &btu_task_thread_handler); - xBtuQueue = xQueueCreate(15, sizeof(void *)); + xBtuQueue = xQueueCreate(30, sizeof(void *)); xTaskCreate(btu_task_thread_handler, "BtuT", 8192, NULL, configMAX_PRIORITIES - 1, &xBtuTaskHandle); #if (defined(BTA_INCLUDED) && BTA_INCLUDED == TRUE) diff --git a/examples/07_blufi/components/bluedroid_demos/app_core/bt_app_core.c b/examples/07_blufi/components/bluedroid_demos/app_core/bt_app_core.c index 9793b14a7f..3510b657c1 100644 --- a/examples/07_blufi/components/bluedroid_demos/app_core/bt_app_core.c +++ b/examples/07_blufi/components/bluedroid_demos/app_core/bt_app_core.c @@ -242,13 +242,13 @@ static void bt_app_dm_upstreams_evt(UINT16 event, char *p_param) /*set connectable,discoverable, pairable and paired only modes of local device*/ - tBTA_DM_DISC disc_mode = BTA_DM_GENERAL_DISC | BTA_DM_BLE_GENERAL_DISCOVERABLE; - tBTA_DM_CONN conn_mode = BTA_DM_CONN | BTA_DM_BLE_CONNECTABLE; - BTA_DmSetVisibility(disc_mode, conn_mode, BTA_DM_IGNORE, BTA_DM_IGNORE); + tBTA_DM_DISC disc_mode = BTA_DM_BLE_GENERAL_DISCOVERABLE; + tBTA_DM_CONN conn_mode = BTA_DM_BLE_CONNECTABLE; + BTA_DmSetVisibility(disc_mode, conn_mode, (uint8_t)BTA_DM_NON_PAIRABLE, (uint8_t)BTA_DM_CONN_ALL ); #if (defined(BLE_INCLUDED) && (BLE_INCLUDED == TRUE)) /* Enable local privacy */ - BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED); + //BTA_DmBleConfigLocalPrivacy(BLE_LOCAL_PRIVACY_ENABLED); do { const controller_t *controller = controller_get_interface(); char bdstr[18]; diff --git a/examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c b/examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c index ed757be167..4028935d07 100644 --- a/examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c +++ b/examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c @@ -187,7 +187,7 @@ static void bta_gatts_set_adv_data_cback(tBTA_STATUS call_status) /*instantiate a hid device service*/ //hidd_le_init(); /*start advetising*/ -// BTA_GATTS_Listen(server_if, true, NULL); + //BTA_GATTS_Listen(server_if, true, NULL); } /*register callback*/ @@ -208,7 +208,7 @@ void bta_gatts_callback(tBTA_GATTS_EVT event, tBTA_GATTS* p_data) bta_gatts_set_adv_data_cback); //set the adversting data to the btm layer ESP_AppBleSetScanRsp(&ijiazu_adv_data[BLE_SCAN_RSP_DATA_IDX],NULL); - + BTA_GATTS_Listen(server_if, true, NULL); } break; /*connect callback*/