Commit graph

743 commits

Author SHA1 Message Date
baohongde 3333f8c74d components/bt: Backports some bugfix to v3.0
1. bugfix for the error in calculation sniff anchor point which can result in supervision timeout after connection is brought into sniff mode
2. bugfix of error when entering sniff mode with attempt large than 0xFF
3. clear BT/BLE interrupts after controller_disable to overwrite the default non-zero value of intcntl registers.
2019-09-20 11:45:32 +08:00
wangmengyang 1651bffa49 components/bt: set the minimum encryption key size to be 7 octects for BR/EDR link for preventing KNOB attack.
This patch is to address the CVE-2019-9506 vulnerability.
2019-08-23 08:32:16 +08:00
wangmengyang 592a2e52ab component/bt: allow dynamic allocation of SBC decoder buffer used in A2DP sink to save internal DRAM 2019-04-02 05:04:29 +00:00
Tian Hao 4c0236e61e component/bt: add a option to make report adv data and scan response individually
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.
2019-01-24 18:38:36 +08:00
baohongde 13bed6ed4c components/bt: Fix assert 32768 and 65535
1. fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222
2. fix bug that there's very low ratio to cause BLE assert(65536, 0) in rwble.c at line 222
2018-12-27 15:05:22 +08:00
Jiang Jiang Jian b7c4d9a9ea Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params_v3.0' into 'release/v3.0'
Component/bt: add check peer addr type in set adv params (backport v3.0)

See merge request idf/esp-idf!3737
2018-11-20 20:03:22 +08:00
zhiweijian 896d40609f Component/bt: add check peer addr type in set adv params 2018-11-19 19:46:41 +08:00
wangmengyang 979c4c199c Fix two bugs when disable bluetooth controller
1. Fix the bug that disable controller suddenly cause crash when ble is working.
2. Fix the bug that when disable controller, it will cause wifi cannot RX, TX timeout, buffer lack and etc.
2018-11-16 10:25:21 +00:00
baohongde 0ee8db80ff components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null
When WIFI task or other high priority task blocks the Bluetooth task, ACL RX buffer will use up, ACL RX buffer ptr will point to null and will never point to a valid adress. Causing errors in Bluetooth.
2018-11-06 18:03:15 +08:00
zwj 5ce10cb58c component/bt: fix start adv crash 2018-10-19 16:11:56 +08:00
Tian Hao 4522476e72 fix bluetootm(dual-mode) tx power value corresponding to libphy.a 2018-10-15 19:52:56 +08:00
Tian Hao f2347e5729 component/bt : fix bug that bt mux module is still active even after disable
Resolve the problem following:
    1. when wifi and bluetooth coex, after call esp_bt_controller_disable(), it may cause WiFi cannot TX/RX packets.
       Such as, it cause wifi disconnect, can't probe any SSIDs or etc.
2018-10-10 15:54:13 +08:00
Tian Hao 291c4a4fd3 component/bt : fix bug that set discovery mode will stop ble adv
As the bluedroid original implmentation of BR/EDR and BLE dual mode about discovery mode,
when set discovery mode for BR/EDR, it will stop ble advertising.

Reference to https://github.com/espressif/esp-idf/issues/2306
2018-09-04 20:30:43 +08:00
Jiang Jiang Jian 9b1bd0a09f Merge branch 'bugfix/btdm_find_remote_service_by_uuid_always_return_success_v3.0' into 'release/v3.0'
component/bt: Fix bug of SDP find services by uuid always return success (backport 3.0)

See merge request idf/esp-idf!3165
2018-09-04 19:21:47 +08:00
Jiang Jiang Jian 0ba566e0c6 Merge branch 'bugfix/btdm_update_private_address_v3.0' into 'release/v3.0'
component/bt: Update BLE private address after it's private address interval (backport 3.0)

See merge request idf/esp-idf!3171
2018-09-04 19:21:21 +08:00
Jiang Jiang Jian 405b1986c2 Merge branch 'bugfix/btdm_controller_deinit_v3.0' into 'release/v3.0'
bt : fix bug that bluetooth controller init/disable/enable/disable may cause exception

See merge request idf/esp-idf!3149
2018-09-04 15:07:08 +08:00
baohongde 7d2baa3c3d component/bt: Update BLE private address after it's private address interval (backport 3.0)
A cherry-pick of MR !2987
2018-09-03 14:31:40 +08:00
baohongde 530dedbc2d component/bt: Fix bug of SDP find services by uuid always return success (backport 3.0)
A cherry-pick of MR !3036
2018-09-03 11:57:53 +08:00
Jiang Jiang Jian 53dcd1202d Merge branch 'bugfix/fix_probable_mem_leak_v3.0' into 'release/v3.0'
components/bt: Fix a probable memory leak for BTA_GATTS_CONF_EVT event (backport v3.0)

See merge request idf/esp-idf!3105
2018-08-29 23:09:54 +08:00
Jiang Jiang Jian 7515dc97b6 Merge branch 'bugfix/btdm_a2dp_sink_pcm_buf_size_for_v3.0' into 'release/v3.0'
bugfix/btdm_a2dp_sink_pcm_buf_size_for_v3.0(backport v3.0)

See merge request idf/esp-idf!3118
2018-08-29 10:19:48 +08:00
Tian Hao a9c1820385 bt : fix bug that bluetooth controller init/disable/enable/disable may cause exception
1. when one task do deinit/init/disable/enable, especially different cpu
core, it may cause controller crash in ISR handler
2. fix while BLE is scanning, bluetooth controller is disabled cause BLE
scan is not abort.
2018-08-28 21:10:17 +08:00
Jiang Jiang Jian 8fdf200932 Merge branch 'bugfix/btdm_fix_get_error_adv_sometimes_v3.0' into 'release/v3.0'
Component/bt: fix get error adv packet sometimes (backport v3.0)

See merge request idf/esp-idf!3084
2018-08-28 20:04:30 +08:00
zhiweijian 6751373411 Component/bt: fix get error adv packet sometimes 2018-08-28 14:05:44 +08:00
wangmengyang 27fd353752 component/bt: bugfix for incorrect computation of PCM data buffer size in A2DP sink 2018-08-28 11:16:33 +08:00
Hrishikesh Dhayagude 32fd3a3215 components/bt: Fix a probable memory leak for BTA_GATTS_CONF_EVT event (backport v3.0)
Multiple modules register their callback BTA_GATTS_AppRegister().

If any of the callbacks do not free the allocated pointer in
BTA_GATTS_CONF_EVT event, then this can result in memory leak.

So, free the pointer after the callback function is called and remove
the calls to free in the callback functions as it is now not required

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-08-27 11:57:14 +05:30
wangmengyang 5ee2d3b90d component/bt: check support of AFH in remote slave device's LM feature when determine whether to send LMP_set_AFH 2018-08-27 11:39:43 +08:00
Jiang Jiang Jian 8618b452f7 Merge branch 'bugfix/btdm_fix_memory_leak_in_security_server_v3.0' into 'release/v3.0'
component/bt: fix memory leak in security server (backport v3.0)

See merge request idf/esp-idf!3016
2018-08-27 10:20:13 +08:00
Jiang Jiang Jian 3f72a12d97 Merge branch 'bugfix/btdm_fix_CI_scan_case_fail' into 'release/v3.0'
Component/bt: fix CI scan case failed in v3.0

See merge request idf/esp-idf!3074
2018-08-25 16:54:37 +08:00
Jiang Jiang Jian e8ad0415cc Merge branch 'bugfix/timer_oneshot_timeout_twice_v3.0' into 'release/v3.0'
component/bt: Some timer oneshot will timeout twice (backport v3.0)

See merge request idf/esp-idf!3064
2018-08-24 14:01:06 +08:00
Jiang Jiang Jian ac253274a0 Merge branch 'bugfix/btdm_fix_sc_mitm_bond_failed_in_smp_for_iphones_v30' into 'release/v3.0'
Component/bt:  fix SC_MITM_BOND failed in smp for iphones (backport v3.0)

See merge request idf/esp-idf!3045
2018-08-24 11:37:00 +08:00
zhiweijian 3870836a90 Component/bt: fix CI scan case failed in v3.0 2018-08-24 10:57:16 +08:00
baohongde 00b895680e component/bt: Some timer oneshot will timeout twice (backport v3.0)
A cherry-pick of MR !2979
2018-08-23 11:02:59 +08:00
Jiang Jiang Jian 997d291d85 Merge branch 'bugfix/btdm_fix_get_bond_list_error_when_connection_with_no_bond_v30' into 'release/v3.0'
Component/bt: fix get bond list error when connection with no bond(backport v3.0)

See merge request idf/esp-idf!3042
2018-08-23 10:38:04 +08:00
Jiang Jiang Jian 5f2660e1f5 Merge branch 'bugfix/btdm_fix_version_excahnge_issue_v30' into 'release/v3.0'
Component/bt: fix version exchange issue(backport v3.0)

See merge request idf/esp-idf!3046
2018-08-23 10:36:39 +08:00
zhiweijian 27f8ee6b97 Component/bt: fix memory leak in security server 2018-08-21 16:09:04 +08:00
zhiweijian 1c001ecd7a Component/bt: fix version exchange issue
- Android 7.0 version issue
- version exchange late in some phones
- can not get version in smp
2018-08-21 14:55:51 +08:00
zhiweijian a961984f73 Component/bt: fix SC_MITM_BOND failed in smp for iphones 2018-08-21 14:46:20 +08:00
zwj 2d53799372 component/bt: fix no adv packets 2018-08-21 14:10:36 +08:00
zhiweijian 7275490322 Component/bt: fix get bond list error when connection with no bond 2018-08-21 14:05:14 +08:00
yulong 7aa29a0dbb component/bt: Fixed the vulnerability released by Bluetooth org when using public key not check in the process of ECDH encryption. 2018-08-13 19:46:04 +08:00
wangmengyang 50556b8acb component/bt: bugfix for uncleared LMP transaction collision state after rejecting sniff request from slave
This bug will cause other following LMP transactions, such as (e)SCO link set up transaction to fail
2018-08-04 16:24:37 +00:00
wangmengyang b5c45a4d46 component/bt: retrieve disconnection reason in AVDT when ACL-U link is disconnected 2018-08-03 15:42:55 +08:00
zwj d0cd624d2b component/bt: fix slave cant receive long packets in smp 2018-07-26 11:39:47 +08:00
zhiweijian 5cf4d8a1ec Component/bt: add scan duplicate for ble mesh in idf3.0 2018-07-12 07:35:13 +00:00
Jiang Jiang Jian c2b39f4a5f Merge branch 'bugfix/btdm_malloc_fail_lead_to_crash' into 'release/v3.0'
component/bt: Fix malloc fail lead to crash

See merge request idf/esp-idf!2487
2018-06-01 10:24:07 +08:00
xiewenxiang 2bd198d180 component/bt: Fix malloc fail lead to crash 2018-05-31 17:14:59 +08:00
Angus Gratton 5b2fee13cd Merge branch 'bugfix/btdm_a2dp_disconn_state_when_connecting_with_iphone_v3.0' into 'release/v3.0'
component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7

See merge request idf/esp-idf!2385
2018-05-31 13:38:33 +08:00
baohongde dac71d688a component/bt: Fix mem leak of esp_ble_gap_set_security_param
cherry-pick from MR !2458
2018-05-30 15:01:01 +08:00
zhiweijian 6ae56b61cf Component/bt: fix notify memory leak for v3.0 2018-05-24 10:54:52 +08:00
baohongde ab62202eb9 component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7 2018-05-11 16:03:33 +08:00