components/esp_wifi: improve coexistence performance according to specific WiFi/BT/BLE scienario (Backport v3.3)
See merge request espressif/esp-idf!7410
1. Improve WiFi throughput in some Classic BT scienarios(idle, inquire scan,
connected, sniff, a2dp pause, etc).
2. Support WiFi + Classic BT + BLE mesh coexistence scienario.
3. Improve WiFi scan and connect succeed ratio in coexistence scienario.
4. Do not support to choose software coexistence preference anymore for it is
determined according to coexistence scienario automatically.
components/lwip: increase TCP send buffer and receive window limitation when TCP window scale is enabled
components/ble_mesh: Fix some bugs about ble mesh
1. fix send acl pkt after ble have sent terminate ind modify min adv interval to 10ms.
1. BLE Mesh Core
* Provisioning: Node Role
* PB-ADV and PB-GATT
* Authentication OOB
* Provisioning: Provisioner Role
* PB-ADV and PB-GATT
* Authentication OOB
* Networking
* Relay
* Segmentation and Reassembly
* Key Refresh
* IV Update
* Proxy Support
* Multiple Client Models Run Simultaneously
* Support multiple client models send packets to different nodes simultaneously
* No blocking between client model and server
* NVS Storage
* Store BLE Mesh node related information in flash
* Store BLE Mesh Provisioner related information in flash
2. BLE Mesh Models
* Foundation Models
* Configuration Server Model
* Configuration Client Model
* Health Server Model
* Health Client Model
* Generic
* Generic OnOff Server
* Generic OnOff Client
* Generic Level Server
* Generic Level Client
* Generic Default Transition Time Server
* Generic Default Transition Time Client
* Generic Power OnOff Server
* Generic Power OnOff Setup Server
* Generic Power OnOff Client
* Generic Power Level Server
* Generic Power Level Setup Server
* Generic Power Level Client
* Generic Battery Server
* Generic Battery Client
* Generic Location Server
* Generic Location Setup Server
* Generic Location Client
* Generic Admin Property Server
* Generic Manufacturer Property Server
* Generic User Property Server
* Generic Client Property Server
* Generic Property Client
* Sensor Server Model
* Sensor Server
* Sensor Setup Server
* Sensor Client
* Time and Scenes
* Time Server
* Time Setup Server
* Time Client
* Scene Server
* Scene Setup Server
* Scene Client
* Scheduler Server
* Scheduler Setup Server
* Scheduler Client
* Lighting
* Light Lightness Server
* Light Lightness Setup Server
* Light Lightness Client
* Light CTL Server
* Light CTL Setup Server
* Light CTL Client
* Light CTL Temperature Server
* Light HSL Server
* Light HSL Setup Server
* Light HSL Client
* Light HSL Hue Server
* Light HSL Saturation Server
* Light xyL Server
* Light xyL Setup Server
* Light xyL Client
* Light LC Server
* Light LC Setup Server
* Light LC Client
3. BLE Mesh Applications
* BLE Mesh Node
* OnOff Client Example
* OnOff Server Example
* BLE Mesh Provisioner
* Example
* Fast Provisioning
* Vendor Fast Prov Server Model
* Vendor Fast Prov Client Model
* Examples
* Wi-Fi & BLE Mesh Coexistence
* Example
* BLE Mesh Console Commands
* Examples
Fix A2DP stuck when BLE's interval is too small
Bugfix that bluetooth controller may not be able to enter sleep after end of wake up request
Fix LMP sniff req timeout
1. Fix high beacon and broadcast packets loss ratio of WiFi to make
MDNS test pass.
2. Improve stability of WiFi performance with a little
sacrifice of throughput.
3. Improve BLE advertising and connection performance with dynamic
priority. It sacrifices a little WiFi throughput, but achieves balance
between WiFi and Bluetooth.
4. fix bug bb reset lock flag to avoid bb reset lock unhandle
5. fix bug wifi reset mac cause task watch dog timeout
6. fix bug wifi reset mac position
Includes all the latest NimBLE stack changes from idf-v4.0 with few idf-v3.3
specific modifications.
- Addition of nimble component as submodule (`nimble-1.1.0-idf-v3.3`), contains
IDF v3.3 specific minor changes.
- Example applications are identical to idf-v4.0
- Modification in `bt/Kconfig` to accommodate NimBLE as a BT host.
Remove xtensa/xruntime.h
Fix sending Lmp_feature_req_ext in a loop
Fix 2 bugs in r_ld_fm_sket_isr
fix data loss and send same pkt twice sometimes
fix adv data error in air sometimes
fix adv start/stop crash sometimes
Fix connect fail with some speakers
clear BT/BLE interruots after controller disable
add sco_data_path to be set in sdkconfig and do not reset the value upon HCI reset command
Originally, when doing BLE active scan, Bluedroid will not report adv to
application layer until receive scan response. This option is used to
disable the behavior. When enable this option, Bluedroid will report
adv data or scan response to application layer immediately.
1. start an esp_timer on entering sleep to acquire pm_lock before wake up from modem sleep
2. decrease the clock division of XTAL fed to bluetooth low power clock from 32us to 2us period to allow to work under 240MHz Max CPU frequency
3. decrease the minimum sleep duration threshold to allow shorter bluetooth modem sleep period, especially for BLE with short connection interval
4. reconfigure bluetooth baseband(BT-BB) settings after PHY/RF init upon waking up from modem sleep to avoid packet RX/TX performance degradation
1. BLE only with 9(max) connection will decrease 3K DRAM
2. BR/EDR only with 7(max) connection will decrease 16K DRAM
3. Any of BLE or BR/EDR connection number decrease will also decrease DRAM consumption
4. Decrease one BLE connection will save about 1KB DRAM
5. Decrease one BR/EDR ACL connection will save about 1.2KB DRAM
6. Decrease one BR/EDR SCO/eSCO will save 2KB DRAM.
7. fix some definition and kconfig
8. remove 1.2k of vhci tx cache and make .bss & .data to heap about 1.4K
9. modify BT Reserved Memory size and modify example to support new bt kconfig
Earlier they have to be selected at the compile time through sdkconfig.
A2DP sink and source application tested with this change.
Signed-off-by: Amey Inamdar <amey@espressif.com>
1. provide options for bluetooth low power mode
2. provide two options for bluetooth low power clock: main XTAL and external 32kHz XTAL
3. provide function and callbacks to control bluetooth low power mode, including enable/disable sleep, software wakeup request, low power clock settings, check power state, etc
4. modify vhci API vhci_host_send_packet to use blocking mode
5. note that DFS and bluetooth modem sleep can not be used together currently.
As of now, when Bluetooth debugs are enabled, all the messages are
mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor
shows all logs in red color which might lead to missing the actual
errors
This patch maps the Bluetooth messages to appropriate ESP_LOG* messages
and improves readability.
Also, make the BT trace level be configurable in menuconfig, so that
each layer of bt trace can be enabled/disabled.
Finally, add debug log control for BTC, OSI, BLUFI and clear up
Bluetooth debug logs.
So, with this the method of enabling Bluetooth logs is as follows:
1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable
-> BT DEBUG LOG LEVEL -> set trace level for every layer of BT
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
component/bt: Added the Macro for the classic BT support.
component/bt: added the bluedroid deinit method.
component/bt: allow more classic BT global variables to use dynamic allocation scheme
1. allocate memory for AVDT, AVCT control blocks when dynamic memory is used
2. allow SBC decoder buffer to use dynamic allocation scheme
component/bt: Remove the wrong changes in bt/Kconfig & Added the GATTS_INCLUDED in the gatt_free function when gatt service close.
component/bt: Shorten the abbreviation BT_ALLOCATION_FROM_SPIRAM_FIRST and BT_BLE_DYNAMIC_ENV_MEMORY two macros.