Component/bt: modify throughput demo default config

pull/2104/head
zhiweijian 2018-06-21 20:13:05 +08:00
rodzic 4df08f9815
commit 4aae691519
9 zmienionych plików z 39 dodań i 14 usunięć

Wyświetl plik

@ -261,7 +261,7 @@ esp_err_t esp_ble_gatts_send_indicate(esp_gatt_if_t gatts_if, uint16_t conn_id,
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (L2CA_CheckIsCongest(L2CAP_ATT_CID, conn_id)) {
LOG_ERROR("%s, the l2cap chanel is congest.", __func__);
LOG_DEBUG("%s, the l2cap chanel is congest.", __func__);
return ESP_FAIL;
}

Wyświetl plik

@ -354,7 +354,7 @@ tGATT_STATUS attp_send_msg_to_l2cap(tGATT_TCB *p_tcb, BT_HDR *p_toL2CAP)
}
if (l2cap_ret == L2CAP_DW_FAILED) {
GATT_TRACE_ERROR("ATT failed to pass msg:0x%0x to L2CAP",
GATT_TRACE_DEBUG("ATT failed to pass msg:0x%0x to L2CAP",
*((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
return GATT_INTERNAL_ERROR;
} else if (l2cap_ret == L2CAP_DW_CONGESTED) {

Wyświetl plik

@ -1816,7 +1816,7 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf)
// If already congested, do not accept any more packets
if (p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->cong_sent) {
L2CAP_TRACE_ERROR ("L2CAP - CID: 0x%04x cannot send, already congested\
L2CAP_TRACE_DEBUG ("L2CAP - CID: 0x%04x cannot send, already congested\
xmit_hold_q.count: %u buff_quota: %u", fixed_cid,
fixed_queue_length(p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->xmit_hold_q),
p_lcb->p_fixed_ccbs[fixed_cid - L2CAP_FIRST_FIXED_CHNL]->buff_quota);

Wyświetl plik

@ -966,7 +966,7 @@ UINT8 l2c_data_write (UINT16 cid, BT_HDR *p_data, UINT16 flags)
/* If already congested, do not accept any more packets */
if (p_ccb->cong_sent) {
L2CAP_TRACE_ERROR ("L2CAP - CID: 0x%04x cannot send, already congested xmit_hold_q.count: %u buff_quota: %u",
L2CAP_TRACE_DEBUG ("L2CAP - CID: 0x%04x cannot send, already congested xmit_hold_q.count: %u buff_quota: %u",
p_ccb->local_cid,
fixed_queue_length(p_ccb->xmit_hold_q),
p_ccb->buff_quota);

Wyświetl plik

@ -2,11 +2,12 @@ ESP-IDF BLE throughput GATT CLIENT demo
========================
This is the demo used to test the BLE throughput, this demo should used with throughput server demo together.
The throughput of BLE can up to 720-767 bits/s between to ESP32 board.
The throughput of BLE can up to 720-767 Kbps between to ESP32 board.
Note:
1. In order to maximize throughput, we need to set the uart print baud rate at 921600 or more (make menuconfig --> Component config --> ESP32-specific --> UART console baud rate --> 921600(or 1500000));
1. In order to maximize throughput, we need to set the uart print baud rate at 921600 or more (make menuconfig --> Component config --> ESP32-specific --> UART console baud rate --> 921600(or 1500000)) and don't print too much log.
2. We can only test notify or write throughput at the same time, this demo default to test the notify throughput, if want to test the write throughput,
please set: make menuconfig --> Component config --> Example 'GATT CLIENT THROUGHPUT' Config ---> then select the 'test the gattc write throughput' option
3. This demo only test unidirectional throughput, if you want to test the bidirectional throughput please change the demo by yourself.
4. Should change the CPU frequency to 240MHz in the make menuconfig --> Component config ---> ESP32-specific ---> CPU frequency (240 MHz)
5. Should change the bluetooth controller and Bluedroid run in different Core in the make menuconfig --> Component config ---> Bluetooth ---> The cpu core which bluetooth controller run (Core 0 (PRO CPU)) & Bluedroid Enable ---> The cpu core which Bluedroid run (Core 1 (APP CPU))
4. Should change the CPU frequency to 160MHZ or 240MHz in the make menuconfig --> Component config ---> ESP32-specific ---> CPU frequency (240 MHz or 160 MHz).
5. Should change the bluetooth controller and Bluedroid run in different Core in the make menuconfig --> Component config ---> Bluetooth ---> The cpu core which bluetooth controller run (Core 0 (PRO CPU)) & Bluedroid Enable ---> The cpu core which Bluedroid run (Core 1 (APP CPU)).
6. In order to maximize throughput, please test in a clean environment without many BLE devices working and both test devices are ESP32.

Wyświetl plik

@ -3,3 +3,16 @@
CONFIG_BT_ENABLED=y
CONFIG_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=n
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1=y
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=1
#
# Serial flasher config
#
CONFIG_MONITOR_BAUD_921600B=y
CONFIG_MONITOR_BAUD=921600
#
# ESP32-specific
#
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
CONFIG_CONSOLE_UART_BAUDRATE=921600

Wyświetl plik

@ -2,12 +2,13 @@ ESP-IDF BLE throughput GATT SERVER demo
========================
This is the demo used to test the BLE throughput, this demo should used with throughput client demo together.
The throughput of BLE can up to 720-767 bits/s between to ESP32 board.
The throughput of BLE can up to 720-767 Kbps between to ESP32 board.
Note:
1. In order to maximize throughput, we need to set the uart print baud rate at 921600 or more (make menuconfig --> Component config --> ESP32-specific --> UART console baud rate --> 921600(or 1500000));
1. In order to maximize throughput, we need to set the uart print baud rate at 921600 or more (make menuconfig --> Component config --> ESP32-specific --> UART console baud rate --> 921600(or 1500000)) and don't print too much log;
2. We can only test notify or write throughput at the same time, this demo default to test the notify throughput, if want to test the write throughput,
please set: make menuconfig --> Component config --> Example 'GATT SERVER THROUGHPUT' Config ---> then select the 'test the gattc write throughput' option
3. This demo only test unidirectional throughput, if you want to test the bidirectional throughput please change the demo by yourself.
4. Should change the CPU frequency to 240MHz in the make menuconfig --> Component config ---> ESP32-specific ---> CPU frequency (240 MHz)
4. Should change the CPU frequency to 160MHz or 240MHz in the make menuconfig --> Component config ---> ESP32-specific ---> CPU frequency (160MHz or 240 MHz)
5. Should change the bluetooth controller and Bluedroid run in different Core in the make menuconfig --> Component config ---> Bluetooth ---> The cpu core which bluetooth controller run (Core 0 (PRO CPU)) & Bluedroid Enable ---> The cpu core which Bluedroid run (Core 1 (APP CPU))
6. In order to maximize throughput, please test in a clean environment without many BLE devices working and both test devices are ESP32.

Wyświetl plik

@ -541,9 +541,6 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i
break;
case ESP_GATTS_CONF_EVT:
ESP_LOGI(GATTS_TAG, "ESP_GATTS_CONF_EVT, status %d", param->conf.status);
if (param->conf.status != ESP_GATT_OK){
esp_log_buffer_hex(GATTS_TAG, param->conf.value, param->conf.len);
}
#if (CONFIG_GATTC_WRITE_THROUGHPUT)
start_time = false;
current_time = 0;

Wyświetl plik

@ -3,3 +3,16 @@
CONFIG_BT_ENABLED=y
CONFIG_GATTS_NOTIFY_THROUGHPUT=y
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=n
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1=y
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=1
#
# Serial flasher config
#
CONFIG_MONITOR_BAUD_921600B=y
CONFIG_MONITOR_BAUD=921600
#
# ESP32-specific
#
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
CONFIG_CONSOLE_UART_BAUDRATE=921600