Commit Graph

186 Commits

Author SHA1 Message Date
Jiang Jiang Jian
fa2c4fe622 Merge branch 'bugfix/fix_a2dp_underrun_issue_4_2' into 'release/v4.2'
Fix A2DP Underrun Issue [backport v4.2]

See merge request espressif/esp-idf!12277
2021-03-10 14:30:28 +00:00
Jiang Jiang Jian
e1f1d11b76 Merge branch 'feature/add_init_and_deinit_evt_for_a2dp_4_2' into 'release/v4.2'
feature/ Add A2DP Init and Deinit Complete Evt [backport v4.2]

See merge request espressif/esp-idf!12150
2021-03-05 12:19:18 +00:00
Chinmay Chhajed
24291f7a3b Bluedroid: Do not initiate/accept connection with device having same BDADDR.
Added BD_ADDR comparison in l2cu_lcp_allocate and removed check from
security connection request handler as it's handled in l2cu_lcp_allocate
for both connection request and create connection.
2021-02-18 06:12:17 +00:00
Chinmay Chhajed
359509ccdc bt: removed esp_bt_get_mac()
There was no need for this function as there is already a way present to
fetch own mac address. Own mac addr can be fetched by calling
controller_get_interface().
2021-02-18 06:12:17 +00:00
weitianhua
d254804a62 Fix A2DP Underrun Issue 2021-02-04 19:33:14 +08:00
weitianhua
186ebc61e7 Add init & deinit event for a2dp 2021-01-26 10:51:47 +08:00
Chinmay Chhajed
4cfece437d Bluedroid: Do not connect if peer BD_ADDR is same as own BD_ADDR. 2021-01-14 12:22:30 +05:30
Jiang Jiang Jian
70ecd0e92c Merge branch 'bugfix/btdm_blufi_send_custom_data_will_congested_after_connection_is_broken_v4.2' into 'release/v4.2'
component/bt: fix Blufi sends customer data will congested when connection is broken(backport v4.2)

See merge request espressif/esp-idf!11847
2021-01-06 12:29:44 +08:00
Jiang Jiang Jian
caddd5d9fa Merge branch 'bugfix/fix_spp_vfs_dynamic_memory_bugs_v4.2' into 'release/v4.2'
component_bt/fix spp vfs demo crash when use dynamic memory[backport v4.2]

See merge request espressif/esp-idf!11726
2021-01-06 12:20:22 +08:00
XieWenxiang
5da8c3f8de component/bt: fix Blufi sends customer data will congested when connection is broken 2020-12-31 15:38:49 +08:00
Chinmay Chhajed
235628355f Bluedroid: Fixes for some vulnerabilities.
This commit fixes 'Impersonation in Passkey entry protocol'
(CVE-2020-26558) and suggests fixes for other vulnerabilites like
'Impersonation in the Pin Pairing Protocol' (CVE-2020-26555) and
'Authentication of the LE Legacy Pairing Protocol'

CVE-2020-26558 can be easily implemented if the peer device can
impersonate our public key. This commit adds a check by comparing our
and received public key and returns failed pairing if keys are same.

This commit also adds comments suggesting to use secure connection when
supported by all devices.
2020-12-25 16:01:11 +05:30
liqigan
40873d2026 fix spp vfs demo crash when use dynamic memory 2020-12-23 15:06:34 +08:00
wangcheng
9ca6aee845 components/bt: Fixed the problem of early release of pointer(p_ccb) in funcion 2020-12-18 11:32:31 +08:00
Artem Godlevskyi
d315bf722f Added missing MYNEWT_VAL_BLE_L2CAP_COC_MPS definition
Signed-off-by: Prasad Alatkar <prasad.alatkar@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/5825
2020-12-17 07:21:02 +00:00
Prasad Alatkar
210bd3787d NimBLE: Fix misc coverity issues in NimBLE host
- NimBLE NVS : Additional check to account for NVS operation failure
- NimBLE host: Fix minor bug in ble_eddystone_set_adv_data_gen
- NimBLE host: remove recursive call, upstream PR: https://github.com/apache/mynewt-nimble/pull/857
2020-12-17 07:21:02 +00:00
Jiang Jiang Jian
f03d543139 Merge branch 'bugfix/blufi_config_potential_double_free_v4.2' into 'release/v4.2'
Bugfix/blufi config potential double free v4.2

See merge request espressif/esp-idf!11163
2020-12-09 22:26:19 +08:00
xiewenxiang
9dbf59af9c component/bt: support BLE Read Attribute value by UUID 2020-12-03 15:19:44 +08:00
xiewenxiang
4e8d383d01 component/bt: refactor ble random address setting 2020-12-03 15:19:35 +08:00
XieWenxiang
8533c452a1 component/bt: support BLE Application Layer Encryption key size check 2020-12-03 15:19:27 +08:00
XieWenxiang
82b65d5de0 component/bt: support BLE Authorization 2020-12-03 15:19:17 +08:00
xiewenxiang
0740090682 component/bt: fix incorrect encryption flag setting 2020-12-03 15:19:02 +08:00
wangcheng
1be101f342 component/bt: Add a macro to control the compilation of blufi. 2020-11-24 10:44:57 +08:00
wangcheng
7097ff286c component/bt: Fix a potential double free error. 2020-11-24 10:44:56 +08:00
wangcheng
65c5a57033 blufi: fix an error caused by incorrect conn_id parameters. 2020-11-24 10:44:54 +08:00
weitianhua
ad31451594 Fix crash caused by calling deinit directly 2020-11-10 11:18:39 +00:00
liqigan
640083c8cb replace list and ringbuffer with fixed queue
use eventgroup to sync spp_vfs_write

each connection has a switch_delay_timer not sharing a one

revert functions like spp_find_slot_by_xxx

fix vfs read bug when peer close
2020-11-06 03:38:52 +00:00
liqigan
94093debab move flow control to btc layer
defer free slot in btc layer when receive BTA_JV_RFCOMM_CLOSE_EVT
2020-11-06 03:38:52 +00:00
liqigan
76f41cc5e0 add event when calling spp API failed 2020-11-06 03:38:52 +00:00
liqigan
783c5ecee2 fix ag example outgoing callback not triggered
Closes https://github.com/espressif/esp-idf/issues/4967
2020-10-28 20:25:43 +08:00
Jiang Jiang Jian
e8cee449ea Merge branch 'bugfix/nimble_host_rcv_pkt_length_check_v4.2' into 'release/v4.2'
NimBLE: host_rcv_pkt event buf size check. (v4.2)

See merge request espressif/esp-idf!10758
2020-10-27 18:49:43 +08:00
liqigan
e4e46b8384 1. fix read rssi delta bug in bredr
2. modify read rssi related function names

Closes https://github.com/espressif/esp-idf/issues/5660
2020-10-27 06:57:20 +00:00
Chinmay Chhajed
d67e284c8d NimBLE: host_rcv_pkt event buf size check.
Check if the size of HCI event buffer is greater than the received HCI
packet. If not then abort with the error message.
2020-10-09 09:28:51 +05:30
Jiang Jiang Jian
17fca6235b Merge branch 'bugfix/add_clear_bond_complete_evt_4_2' into 'release/v4.2'
componenet_bt/bugfix: add remove bond device complete event 4.2

See merge request espressif/esp-idf!10651
2020-09-29 11:15:55 +08:00
baohongde
2d90885e09 components/bt: Replace task post with btc_inter_profile_call, when post message from btc_dm to btc_gap 2020-09-28 15:09:37 +08:00
baohongde
2b4fae912c components/bt: Fix clear bond fail when connected without ble included 2020-09-28 14:57:27 +08:00
xiongweichao
fba62f5e2e add remove bond device complete event 2020-09-28 14:56:42 +08:00
xiongweichao
7f8c121791 1.revert dummy command
2.fix send MEDIA_CTRL command in disconnect
2020-09-28 10:42:02 +08:00
xiongweichao
a6cdf4ed1e 1.fix test case dummy
2.fix sink send media control ESP_A2D_MEDIA_CHECK_SRC_RDY
2020-09-28 10:41:53 +08:00
weitianhua
84cda60478 Redesign separating AVRC & A2DP
1. Add g_av_with_rc to avrc_tg_init function
2. Remove g_av_open_fail
3. Add comment in API files
4. Add a2dp init & deinit state variable to inidcate a2dp statement
2020-09-18 14:09:27 +08:00
weitianhua
e940e1d72a Add global header and change declaration position 2020-09-18 14:09:19 +08:00
weitianhua
b16deb4473 Remove uneccessary macro
Separate AVRC from A2DP when AVRC not Initialized
2020-09-18 14:09:10 +08:00
weitianhua
306c978195 Rewrite a2dp clean_up function 2020-09-18 14:09:02 +08:00
weitianhua
59234501dd Add bda_addr for esp_bt_a2dp_disconn_req API
1. Add reaction for a2dp snk & src disconn req when no link up
  2. Change state machine set before EVT upto APP layer in some cases
  3. Add bool open_fail to choose whether post disconnection evt to app layer
2020-09-18 14:08:53 +08:00
Jiang Jiang Jian
dddcc2ede8 Merge branch 'bugfix/add_protection_for_spp_api_4.2' into 'release/v4.2'
Bugfix/add protection for spp api 4.2

See merge request espressif/esp-idf!10281
2020-09-16 14:06:28 +08:00
baohongde
ad8b3e4274 components/bt: Fix SPP using NULL point with dynamic memory 2020-09-07 15:44:28 +08:00
wangcheng
a7d52dafa6 component/bt: Fixed the watchdog timeout of btu task during multi-connection 2020-09-04 16:27:03 +08:00
weitianhua
a7ddc9c125 Add protection for rfcomm close API in SPP 2020-09-04 14:40:27 +08:00
weitianhua
07e2d3ab0f Add some debug log for bt:
1. Add logs for SPP not enabled successfully
2. Add information to Applicatioin layer that the A2DP is connecting to peer device

Regular BTC and BTU Task name & Add BTC Init protection

1. Regular the BTC Task Name to Close a Github issue

   Closes https://github.com/espressif/esp-idf/issues/4966

2. Add BTC Init failure protection

3. Regular BTU Task Name with BTC

4. Correct the comment of
   a. SDP_ServiceSearchRequest and SDP_ServiceSearchRequest2
   b. l2cu_create_conn_after_switch

5. Correct comment of esp_bt_hf_vra();

6. Fix cpp compilier region
2020-09-04 14:40:19 +08:00
wangcheng
12633717f7 components/bt: Fixed the state not synchronized between controller and host when disconnected. 2020-09-02 21:43:57 +08:00
Island
9cd0e2fd1a Merge branch 'bugfix/btdm_blufi_data_sequence_not_reset_after_disconnect_v4.2' into 'release/v4.2'
component/bt: fix Blufi sends data after disconnect the seq still increase(backport v4.2)

See merge request espressif/esp-idf!10241
2020-09-02 14:20:49 +08:00