mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
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
This commit is contained in:
parent
eb8cb8d22e
commit
e32d4e546a
@ -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)
|
||||
|
@ -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];
|
||||
|
@ -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*/
|
||||
|
Loading…
Reference in New Issue
Block a user