Commit graph

959 commits

Author SHA1 Message Date
Tian Hao
129f1df461 fix bug that there's very low ratio to cause BLE assert(65536, 0) in rwble.c at line 222 2018-12-14 17:52:31 +08:00
Tian Hao
ce5b2709ab fix bug that there's very low ratio to cause BLE assert(32768, 0) in rwble.c at line 222 2018-12-06 21:17:49 +08:00
Tian Hao
155e48bbde component/bt and esp32: fix two bluetooth bugs that caused by coexist module
1. Fix interrupt watchdog timeout in bluetooth "btdm_bb_isr"
    2. Fix BLE assert(512) or assert(1536)  in rwble.c at line 222
    3. Update librtc.a to fix BLE assert(512) in rwble.c at line 222

    The #1 and #2 occurs random.
    The #3 bug occurs in certain scenario:
    	1. If Wifi start softap and BLE is working
    	2. If wifi start station, but do not use normal station operation, such
    		as just use espnow, while BLE is working
    	3. Any other scenario, that wifi works without use software coexist
    		operation, while BLE is working(such as do advertising and ...)

    4. update libcoexist.a version to v1.1.2
2018-12-03 22:09:04 +08:00
Jiang Jiang Jian
09b2cd7d26 Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params_v3.1' into 'release/v3.1'
Component/bt: add check peer addr type in set adv params (backport v3.1)

See merge request idf/esp-idf!3735
2018-11-23 20:14:15 +08:00
Jiang Jiang Jian
195f7274c4 Merge branch 'bugfix/btdm_controller_disable_v3.1' into 'release/v3.1'
Fix two bugs when disable bluetooth controller(backport v3.1)

See merge request idf/esp-idf!3693
2018-11-20 17:00:38 +08:00
zhiweijian
dfd46965ae Component/bt: add check peer addr type in set adv params 2018-11-19 17:21:28 +08:00
baohongde
8e0bb3ec81 components/bt: Some errors in comment 2018-11-16 15:38:22 +08:00
Tian Hao
dbd225c673 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-13 17:49:06 +08:00
baohongde
ac124ee89c components/bt: Point ACL RX buffer ptr to ACL RX buffer if ACL RX buffer ptr is null(backprot 3.1)
1. 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.
2. hcimsgs.h used whether flow control is on or off
2018-11-09 03:26:36 +00:00
Jiang Jiang Jian
69b6eabef0 Merge branch 'bugfix/btdm_add_profile_descriptor_list_for_spp_v3.1' into 'release/v3.1'
component/bt: Add profile descriptor list for SPP(backport 3.1)

See merge request idf/esp-idf!3602
2018-11-08 17:27:21 +08:00
Jiang Jiang Jian
8c16be1edc Merge branch 'bugfix/btdm_name_buffer_allocation_size_differs_v3.1' into 'release/v3.1'
components/bt: Fix the different size of name buffer allocation size(backport 3.1)

See merge request idf/esp-idf!3588
2018-11-08 17:24:53 +08:00
Jiang Jiang Jian
7cc2445b9a Merge branch 'bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1' into 'release/v3.1'
bugfix/btdm_sniff_anchor_point_calculation_error_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3614
2018-11-06 17:12:39 +08:00
wangmengyang
cfef8291bb component/bt: bugfix of two issues of sniff mode in classic bluetooth
1. resolve the error in calculating sniff anchor point that result in connection supervision timeout
2. resolve the issue of user case that requires sniff attempt is larger than 0xff
2018-11-06 12:02:18 +08:00
Jiang Jiang Jian
725978b817 Merge branch 'bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1' into 'release/v3.1'
bugfix/btdm_allow_a2dp_codec_dynamic_alloc_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3600
2018-11-06 11:57:04 +08:00
baohongde
539064b93c component/bt: Add profile descriptor list for SPP(backport 3.1)
A cherry-pick of MR !2691
2018-11-01 10:36:11 +08:00
wangmengyang
82e69475ca component/bt: allow dynamic allocation of SBC encoder/decoder buffer used in A2DP to save internal DRAM 2018-10-31 17:54:51 +08:00
baohongde
7a05ef2002 components/bt: Fix the different size of name buffer allocation size(backport 3.1)
A cherry-pick of MR !3587
Close https://github.com/espressif/esp-idf/issues/2615
2018-10-31 10:56:16 +08:00
zhiweijian
143c0bdaf9 Component/bt: add ble disconnect when ACCEPT_SPECIFIED_SEC_AUTH failed 2018-10-26 14:10:32 +08:00
zhiweijian
e5f2f1ba78 Component/bt: add only accept sepecified Authentication 2018-10-26 11:58:25 +08:00
zhiweijian
89ee65e1c6 Component/bt: add set default passkey function 2018-10-26 11:55:18 +08:00
zwj
4b5cf90a95 component/bt: fix remove bond list failed 2018-10-25 05:32:01 +00:00
Tian Hao
e982c25b40 coexist : fix coexist bugs related to coex hw blocking
1. fix some bugs by previous coex hw blocking bugfix,
   such like, rwble.c (64, 0) line 222
2. fix bug that ble scan performance is very low when software coexist
   is working.
3. update libcoexist version to v1.1.0
2018-10-17 18:30:39 +08:00
Angus Gratton
027e081622 Merge branch 'bugfix/misc_v3_1_backports' into 'release/v3.1'
Multiple v3.1 backports

See merge request idf/esp-idf!3378
2018-10-10 15:01:13 +08:00
Jiang Jiang Jian
f11ac037c4 Merge branch 'bugfix/btdm_watchdog_timeout_after_pair_with_iphone_v3.1' into 'release/v3.1'
component/bt: Fix BTU task watchdog timeout after pair with iphone (backport 3.1)

See merge request idf/esp-idf!3396
2018-09-30 14:39:09 +08:00
wangmengyang
e353d09630 component/bt: bugfix that hci down stream datapath is unblocked too early on waking up from sleep
This issue can cause the controller to stuck after sleep interrupt happens and clock interrupt enabled
2018-09-28 14:31:49 +08:00
Ivan Grokhotkov
5205b31186 Merge branch 'bugfix/btdm_coex_hw_blocking_v3.1' into 'release/v3.1'
component/bt : fix coexist hardware blocking bug

See merge request idf/esp-idf!3363
2018-09-28 11:57:26 +08:00
baohongde
de0a323bef component/bt: Fix BTU task watchdog timeout after pair with iphone (backport 3.1)
A cherry-pick of MR !3366

Create a new pending queue, then re-submit pending requests in old pending queue,preventing new events being inserted into it.

Closes https://github.com/espressif/esp-idf/issues/2191
2018-09-28 11:04:44 +08:00
Tian Hao
ebdc82d3d2 component/bt : fix coexist hardware blocking bug
fix the bug following:
1. after disable bluetooth controller, wifi cannot TX/RX any packets.
2. when software coexist working, there's a little ratio cause wifi task
watchdog timeout
3. when software coexist working, there's a little ratio cause bluetooth
cannot receive anything.

feature:
1. add libbtdm_app.a git commit local and remote checking

Known issues:
1. there's still a bug occurs with a very very low ratio cause bluetooth
   cannot receive anything. The reproduce interval may great than 3days
   ~ 1week via 7x24 hours heavy testing.
2018-09-27 20:56:46 +08:00
Ivan Grokhotkov
d6547595d7 bt: build unit tests only when CONFIG_BT_ENABLED=1 2018-09-27 11:31:10 +08:00
zhiweijian
5bb12070d9 Component/bt: fix get bond list error sometimes 2018-09-27 02:33:33 +00:00
baohongde
cc0a73c156 component/bt: Fix bug of remove bond device fail when BLE and BT are connectd at the same time (backport 3.1)
A cherry-pick of MR !2767
2018-09-26 14:23:05 +08:00
Jiang Jiang Jian
4107361a3a Merge branch 'bugfix/btdm_fix_crash_when_test_multi_connect_v3.1' into 'release/v3.1'
Component/bt: fix crash when test multi_connect(backport v3.1)

See merge request idf/esp-idf!3313
2018-09-20 14:02:12 +08:00
Jiang Jiang Jian
e8aa442305 Merge branch 'bugfix/btdm_fix_save_error_key_in_smp_when_reconnect_v3.1' into 'release/v3.1'
Component/bt: fix save error key in smp when reconnect(backport v3.1)

See merge request idf/esp-idf!3289
2018-09-20 10:58:01 +08:00
zhiweijian
72f9d15a57 Component/bt: fix iPhoneX error when getting wifi list 2018-09-19 15:21:57 +08:00
zhiweijian
78dca32a28 Component/bt: fix crash when test multi_connect 2018-09-19 14:26:55 +08:00
zhiweijian
53d75901a9 Component/bt: fix save error key in smp when reconnect 2018-09-17 20:13:30 +08:00
Jiang Jiang Jian
8f665c3393 Merge branch 'bugfix/btdm_enable_modem_sleep_by_default_for_v3.1' into 'release/v3.1'
bugfix/btdm_enable_modem_sleep_by_default_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3275
2018-09-17 16:17:46 +08:00
baohongde
ea3b2716fd component/bt: Unlock reserve of SCN 1 for HFP (backport v3.1)
A cherry-pick of MR !3269
2018-09-17 11:01:58 +08:00
Jiang Jiang Jian
760772ec4b Merge branch 'bugfix/ble_adv_data_tx_power_v3.1' into 'release/v3.1'
fix TX power value in ble adv data is incorrect

See merge request idf/esp-idf!3187
2018-09-16 14:54:59 +08:00
wangmengyang
c6d2fc6807 component/bt: enable bluetooth modem sleep as default setting 2018-09-14 17:01:45 +08:00
wangmengyang
4c240064ab component/bt: stop to inititate AVRC connection when A2DP connection fails to set up
AVRCP connection binds to A2DP in current implementation, despite the two profiles are\
independent according to specification. AVRCP connection is not necessary to set-up \
if A2DP connection fails to establish
2018-09-13 17:58:00 +08:00
wangmengyang
da4108dd1e component/bt: stop to initiate AVDTP connection on failure of A2DP service discovery
In opening state of AVDTP connection, if SDP client fails to get valid A2DP service record\
from peer SDP server, then do not initiate AVDTP connection request
2018-09-13 17:58:00 +08:00
wangmengyang
01994059e2 component/bt: bugfix that A2DP sink device can be connected by another A2DP sink device
In pevious implementation, A2DP sink will register an A2DP source Stream End Point(SEP) although the SEP is not\
supposed to be used. Now remove the unused SEP for source so that only one role of A2DP can be supported at one
time. Service record in local SDP server only includes at most one service for A2DP sink role or source
2018-09-13 17:58:00 +08:00
Renz Bagaporo
7edf2bf66c cmake: make main a component again 2018-09-13 11:13:27 +08:00
Tian Hao
a05868f0a8 fix TX power value in ble adv data is incorrect
refence to https://github.com/espressif/esp-idf/issues/2284
Before fixing, the tx power in adv data is always 0xeb(-21dbm).

restriction:
    If change BLE advertising TX power, please call esp_ble_gap_config_adv_data()
    after BLE adv TX power changed.

    Later, will implement set BLE advertising TX power via HCI, then the
    TX power value in adv data can be update automatically after BLE adv
    TX power changed.
2018-09-12 10:19:08 +00:00
Jiang Jiang Jian
35785d08fd Merge branch 'feature/btdm_legacy_paring_v3.1' into 'release/v3.1'
component/bt: Add Legacy Pairing (backport 3.1)

See merge request idf/esp-idf!3193
2018-09-07 14:44:19 +08:00
Jiang Jiang Jian
d193895ec6 Merge branch 'bugfix/btdm_hfp_invalid_hci_sync_pkt_len_for_v3.1' into 'release/v3.1'
bugfix/btdm_hfp_invalid_hci_sync_pkt_len_for_v3.1(backport v3.1)

See merge request idf/esp-idf!3188
2018-09-06 19:52:05 +08:00
baohongde
95c5805088 component/bt: Add Legacy Pairing (backport 3.1)
A cherry-pick of MR !3057
2018-09-04 20:59:03 +08:00
Tian Hao
196793dccb 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:29:36 +08:00
wangmengyang
7c6d447938 component/bt: bugfix for incorrect length of HCI SCO packet size in HFP resulted from uninitialized data buffer length 2018-09-04 20:24:00 +08:00