Commit Graph

73 Commits

Author SHA1 Message Date
xiewenxiang
bf6b3ec0a8 component/bt: Support set HW CCA threshold value 2021-12-29 14:43:33 +08:00
Li Shuai
46dedca23c ci: replace old header with new SPDX header style 2021-10-14 10:51:10 +08:00
baohongde
17d719bad7 Power Management: power up/down BT power domain when BT init/deinit 2021-10-14 10:51:09 +08:00
baohongde
e2fb413329 components/bt: add config option to choose Bluetooth intterupt level. 2021-09-09 11:29:17 +08:00
Chinmay Chhajed
f167a2a3d1 bt: Remove unused function esp_bt_get_mac.
Closes https://github.com/espressif/esp-idf/issues/7410
2021-08-17 15:07:51 +05:30
Omar Chebib
c4f57af6c9 G0: Memory layouts are now part of heap components 2021-07-15 11:38:23 +10:00
zwj
f5fcfec2cb Fixed ESP32S3 BLE controller init failed 2021-07-06 18:04:04 +08:00
zwj
97188e8068 support hw recorrect 2021-06-25 15:30:02 +08:00
wangmengyang
59c0825ed8 Added example(ESP32-C3), to use Bluetooth Controller through HCI UART transport 2021-04-30 15:25:10 +00:00
zwj
58cd231895 optimize C3 and s3 multi-connection 2021-04-20 02:41:14 +00:00
zwj
facadc86d8 support 727 esp32s3 BLE 2021-04-15 22:02:58 +08:00
Jiang Jiang Jian
bd4e34b15a Merge branch 'bugfix/btdm_incorrectly_spelled' into 'master'
component/bt: fix Spelling mistakes

Closes IDFGH-4886, IDFGH-4910, and IDFGH-4635

See merge request espressif/esp-idf!12814
2021-03-29 05:07:54 +00:00
XieWenxiang
f9cdd1d6c9 component/bt: Modify some ambiguous descriptions 2021-03-23 23:08:05 +08:00
Jiang Jiang Jian
5978352cf9 Merge branch 'bugfix/ble_tx_power_mapping' into 'master'
Bluetooth: Tx power level for ESP32C3 and IRAM_ATTR fix for ESP32S3 controller

See merge request espressif/esp-idf!12651
2021-03-23 03:04:30 +00:00
KonstantinKondrashov
aa1338bf23 wdt: Fix timeout and RTC_SLOW_CLK
RTC_SLOW_CLK
ESP32:    150kHz
ESP32-S2:  90kHz
ESP32-S3: 150kHz
ESP32-C3: 150kHz
2021-03-19 00:15:18 +08:00
wangmengyang
528964f12c fixed incorrect Tx power mappings for ESP32C3 chip 2021-03-17 16:52:26 +08:00
KonstantinKondrashov
b31bf01484 rtc: Clean up for S2,S3,C3 2021-03-01 16:51:15 +08:00
zwj
52909b69b7 fix esp32c3 can't enable adv flow control func 2021-02-08 16:33:20 +08:00
wangmengyang
2dd730d35c component/bt: [esp32c3] modify Bluetooth coexistence options 2021-02-05 09:16:29 +00:00
baohongde
eef66789d4 Mac BB power down in light sleep
components/bt: Do not use feature: timer support isr dispatch method

disable controller after wake up finished.

protect critical section of power down

choose clk in sleep

components/coex: mac bb power down in light sleep

components/coex: Macro changed

components/os: protect reserved interrupt number

update phy to phy_version 300,6e46ba7,Jan 25 2021

some bugfix
2021-01-28 22:28:04 +08:00
weitianhua
c347b0a937 Update bt_discovery demo and README
1. Use bt_app_gap_init function
2. Add Security Simple Pair doc
3. Update README

Update SPP demo

1. Add input module for bt_spp_initiator demo to show the security simple pair features
2. Update README of bt_spp_acceptor and bt_spp_initiator demo.

Format comment in esp_a2dp_api.h

Format comment in esp_avrc_api.h

Format comment in esp_spp_api.h

Fix bt_discovery build err

Update HFP API guide error

Remove BTA_AV_DEBUG

Remove Trailing Whitespace & End of Files
2021-01-27 14:17:12 +08:00
zwj
7c1c669799 component/bt: add BLE v5.0 feature for bluedroid host 2021-01-15 17:55:12 +08:00
Chinmay Chhajed
e016b6b79b Bluedroid: Do not connect if peer BD_ADDR is same as own BD_ADDR. 2021-01-05 14:54:15 +05:30
baohongde
3f97f1d67a components/bt: Make sleep avaliable in hli(for future use) 2020-10-13 19:45:03 +08:00
weitianhua
8f84930c5c Redesign Kconfig.in BT components 2020-07-14 11:01:02 +08:00
weitianhua
4167fc3438 Enable pcm config 2020-07-14 10:25:13 +08:00
Chinmay Chhajed
e3350e7861 Bluedroid: Authentication fixes in Legacy and Secure Connection.
Prevent a remote device from doing a Bluetooth Impersonation Attack
(BIAS) by:

- Preventing remote device to downgrade secure connection
feature mask. Secure connection feature mask should remain same or
increase to enabled in link key generation and authentication.

- Doing a mutual authentication during Legacy Authentication.

Signed-off-by: Chinmay Chhajed <chinmay.chhajed@espressif.com>
2020-06-25 15:37:01 +05:30
baohongde
f9802da461 components/bt: Fix A2DP stuck when BLE's interval is too small
1. Fix the cumulative time switch from BLE to classic BT
2. Enhance classic BT performance while enable calssic BT and BLE at the same time
2020-01-06 20:22:04 +08:00
Angus Gratton
596ccc6793 bluetooth: Remove bt.h header (deprecated in v3.1-dev) 2019-09-13 09:44:07 +10:00
Jiang Jiang Jian
291e25baa6 Merge branch 'bugfix/btdm_add_readme_for_BLE_demos' into 'master'
Component/bt: add readme doc for BLE demos

See merge request idf/esp-idf!4890
2019-06-26 16:04:28 +08:00
Hrishikesh Dhayagude
342f6a7829 Port NimBLE Host Stack on ESP-IDF 2019-06-25 09:03:58 +08:00
zhiweijian
4d8a46b376 component/bt: add readme doc for BLE demos
- Closes:https://github.com/espressif/esp-idf/issues/3341
2019-06-17 07:05:41 +00:00
baohongde
48e32113de component/bt: Allow configuration of default SCO_DATA_PATH in bluetooth controller 2019-06-04 16:31:21 +08:00
wangmengyang
ff2c583a0d component/bt: Add option to configure BLE SCA through menuconfig and use a fixed value of clock cycle to estimate sleep duration for external 32kHz oscillator 2019-05-28 19:56:26 +08:00
Roland Dobai
a1bddb923b Rename Kconfig options (components/bt) 2019-05-21 09:09:01 +02:00
baohongde
e87d05d81f components/bt: Add precautions for esp_vhci_host_send_packet 2019-01-31 11:47:58 +08:00
wangmengyang
59f34461d7 component/bt: bugfix of bluetooth modem sleep not being able to work with Dynamic Frequency Scaling
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
2018-12-11 16:49:01 +08:00
zhiweijian
9103a04793 component/bt: add adv packet duplicate in scan duplicate 2018-09-11 02:31:11 +00:00
Hrishikesh Dhayagude
739b4aadf7 components/bt: Make a pass through Bluetooth header files
This is just a quick glance at all the header files exposed to the
users from cleanup point of view.

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-08-25 21:21:42 +05:30
Tian Hao
ee787085f9 component/bt : decrease memory consumption by conn number
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
2018-08-14 02:29:17 +00:00
Hrishikesh Dhayagude
f610249bdd Reclaim BT/BTDM BSS and Data in bluetooth memory release function
1. Modify esp_bt_controller_mem_release() to release BTDM BSS and Data to heap if
ESP_BT_MODE_BTDM mode is passed to it
2. Add a new API esp_bt_mem_release() which internally calls
esp_bt_controller_mem_release() with the provided mode and then if mode
is ESP_BT_MODE_BTDM, releases BT BSS and Data to heap.

Background:
For Wi-Fi and BT/BLE applications, for e.g. the usecase is like when
Bluetooth is used for provisioning and once the device is connected to the Wi-Fi
AP, we can turn off Bluetooth completely. In such scenarios, it should be possible to
reclaim all the memory of Bluetooth. Although, currently this does not
happen.

Experiment:
Made the following modifications to examples/bluetooth/gatt_server :
1. Added support of simple_wifi to it
2. Moved all the bluetooth related code under CONFIG_BT_ENABLED config
option
3. Calculated the free heap in 2 similar scenarios:
   i. Disabled BT (CONFIG_BT_ENABLED undefined) and checked the free
heap after STA connected
   ii. Kept BT enabled and disabled it after STA connected and checked
the free heap
Ideally, the numbers for i., ii. above should have been similar. But
there was a delta of almost 30-31K. (i. > ii.)
4. Through make size-components checked the common BSS for libbta.a and libbtdm_app.a
and found it to be almost 30K. Data is around 1K

Solution:
1. Modified the linker script to mark the BSS and Data for these libraries and
free it when ESP_BT_MODE_BTDM mode is passed to mem release APIs.
2. Verified that the free heap is comparable for i. and ii. above.

Note: It is known that once this is done, Bluetooth can only be used
again post reboot.

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-07-20 11:33:26 +05:30
Angus Gratton
e33ec5ccf4 Merge branch 'bugfix/btdm_tx_power_value' into 'master'
fix bluetooth(dual-mode) tx power value

See merge request idf/esp-idf!2503
2018-06-13 07:43:13 +08:00
Tian Hao
294a4bd1f4 fix bluetootm(dual-mode) tx power value 2018-06-12 19:18:47 +08:00
Mahavir Jain
5a9fc19f38 bt: fix typo in documentation
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-06-06 18:22:32 +05:30
zhiweijian
c8e848b0ff Component/bt: fix start adv 2018-05-30 17:10:51 +08:00
zhiweijian
340ad5c430 Component/bt: fix scan duplicate 2018-05-21 15:23:15 +08:00
wangmengyang
4c4e143a2f component/bt: implement HFP Hands Free Unit Role 2018-05-21 11:33:30 +08:00
wangmengyang
22e21b38f7 component/bt: implement bluetooth modem sleep mode, one mode for BLE only and another for dual mode bluetooth
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.
2018-05-19 15:37:26 +08:00
Tian Hao
e660785532 component/bt : add BR/EDR TX power set 2018-04-25 15:28:19 +08:00
Hrishikesh Dhayagude
4a7d445301 components/bt examples/bluetooth: Fix typographical errors
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-02-13 13:25:33 +05:30