Commit Graph

184 Commits

Author SHA1 Message Date
zhiweijian
490af40be5 fix read multi char failed(GATT_27001) 2021-02-22 11:28:25 +08:00
zhiweijian
89a1f8e7a9 fix add white list failed 2021-02-22 11:28:07 +08:00
zwj
c1f23ada19 fix bluedroid repair faild if the two most significant bits of public address is '01' 2021-02-22 11:27:54 +08:00
zwj
1b6572ec9f - fix congest return value
- fix system no rsp when doing disconnect
- fix no congest event when ssc do writing performance
2021-02-22 11:27:39 +08:00
zwj
0e2236a2f1 fix ble read multi char err when the number of handles is more than 10 2021-02-22 11:27:22 +08:00
zwj
e109c9980c fix scan rsp length err 2021-02-22 11:27:09 +08:00
zwj
a2eec8a1e2 fix vendor hci memory leak 2021-02-22 11:26:56 +08:00
Chinmay Chhajed
428e9b008c 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-10 15:13:10 +05:30
Chinmay Chhajed
1c6c6998bc 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-10 15:13:02 +05:30
Jiang Jiang Jian
faa740028c Merge branch 'bugfix/bt_bluedroid_same_public_key_attack_v4.1' into 'release/v4.1'
Bluedroid: Fixes for some Bluetooth vulnerabilities. (v4.1)

See merge request espressif/esp-idf!11764
2021-01-19 20:49:25 +08:00
Chinmay Chhajed
53e93c0a10 Bluedroid: Do not connect if peer BD_ADDR is same as own BD_ADDR. 2021-01-14 12:22:47 +05:30
Chinmay Chhajed
5dd8bf4fe5 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:30 +05:30
Jiang Jiang Jian
64c2f8605a Merge branch 'nimble/fix_misc_coverity_issue_v4.1' into 'release/v4.1'
Nimble: Fix misc issues in NimBLE NVS, `ble_eddystone`, recursive call and  L2CAP CoC (v4.1)

See merge request espressif/esp-idf!11391
2020-12-21 12:07:37 +08:00
Jiang Jiang Jian
6710148748 Merge branch 'bugfix/fix_crash_caused_by_calling_deinit_directly_4_1' into 'release/v4.1'
Fix crash cause by calling a2dp deinit when connected [backport v4.1]

See merge request espressif/esp-idf!11690
2020-12-21 12:05:40 +08:00
Jiang Jiang Jian
be2d72b660 Merge branch 'bugfix/blufi_config_potential_double_free_v4.1' into 'release/v4.1'
Bugfix/blufi config potential double free v4.1

See merge request espressif/esp-idf!11164
2020-12-21 12:05:33 +08:00
weitianhua
aee941a087 Fix crash cause by calling a2dp deinit when connected 2020-12-21 10:23:46 +08:00
wangcheng
c6d2c43661 components/bt: Fixed the problem of early release of pointer(p_ccb) in funcion 2020-12-18 12:25:19 +00:00
Artem Godlevskyi
a582fbdfdc 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:20:35 +00:00
Prasad Alatkar
30c89dc11d 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:20:35 +00:00
xiewenxiang
1273982045 component/bt: support BLE Read Attribute value by UUID 2020-12-02 20:20:03 +08:00
xiewenxiang
5da4c0f125 component/bt: refactor ble random address setting 2020-12-02 20:19:54 +08:00
XieWenxiang
8e08156141 component/bt: support BLE Application Layer Encryption key size check 2020-12-02 20:19:45 +08:00
XieWenxiang
a6ea010898 component/bt: support BLE Authorization 2020-12-02 20:19:35 +08:00
xiewenxiang
217e90ec5c component/bt: fix incorrect encryption flag setting 2020-12-02 20:19:21 +08:00
wangcheng
87669b23da component/bt: Add a macro to control the compilation of blufi. 2020-11-24 10:45:36 +08:00
wangcheng
f7e870e45d component/bt: Fix a potential double free error. 2020-11-24 10:45:36 +08:00
wangcheng
7765b07898 blufi: fix an error caused by incorrect conn_id parameters. 2020-11-24 10:45:36 +08:00
Jiang Jiang Jian
ae202d81ec Merge branch 'bugfix/fix_ag_outging_callback_not_triggered_v4.1' into 'release/v4.1'
Bugfix/Fix Ag Example Outgoing Callback Not Triggered [backport v4.1]

See merge request espressif/esp-idf!11019
2020-11-18 11:40:07 +08:00
liqigan
caee4c24a9 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-02 10:33:19 +08:00
liqigan
c3171252ec move flow control to btc layer
defer free slot in btc layer when receive BTA_JV_RFCOMM_CLOSE_EVT
2020-11-02 10:33:19 +08:00
liqigan
8171702293 add event when calling spp API failed 2020-11-02 10:33:19 +08:00
liqigan
c89640103f fix ag example outgoing callback not triggered
Closes https://github.com/espressif/esp-idf/issues/4967
2020-10-28 20:13:40 +08:00
Jiang Jiang Jian
77eb201241 Merge branch 'bugfix/add_clear_bond_complete_evt_4_1' into 'release/v4.1'
componenet_bt/bugfix: add remove bond device complete event 4.1

See merge request espressif/esp-idf!10653
2020-10-28 16:03:35 +08:00
Jiang Jiang Jian
447708ef05 Merge branch 'bugfix/bredr_bugfix_release_for_qa_dummy_disconnect_4_1' into 'release/v4.1'
Bugfix/bredr bugfix release for qa dummy disconnect 4.1

See merge request espressif/esp-idf!10646
2020-10-28 16:03:21 +08:00
Jiang Jiang Jian
634a5e9355 Merge branch 'bugfix/add_disconn_req_action_when_no_link_4.1' into 'release/v4.1'
Bugfix/add disconn req action when no link 4.1

See merge request espressif/esp-idf!10509
2020-10-28 14:27:10 +08:00
liqigan
ca42c8ec5c 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-12 17:55:53 +08:00
Chinmay Chhajed
0d25a9cff8 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:29:57 +05:30
baohongde
684ffdfe70 components/bt: Replace task post with btc_inter_profile_call, when post message from btc_dm to btc_gap 2020-09-28 15:27:24 +08:00
baohongde
98e7bc3375 components/bt: Fix clear bond fail when connected without ble included 2020-09-28 15:26:56 +08:00
xiongweichao
9c4e79dafa add remove bond device complete event 2020-09-28 15:26:48 +08:00
xiongweichao
09e48edd87 1.revert dummy command
2.fix send MEDIA_CTRL command in disconnect
2020-09-28 11:11:12 +08:00
xiongweichao
3db75c4e9d 1.fix test case dummy
2.fix sink send media control ESP_A2D_MEDIA_CHECK_SRC_RDY
2020-09-28 11:10:54 +08:00
Jiang Jiang Jian
167966380b Merge branch 'docs/fix_event_typo_backport_v4.1' into 'release/v4.1'
docs/fix event typo backport v4.1

See merge request espressif/esp-idf!9383
2020-09-20 16:29:33 +08:00
weitianhua
f78c8cc0db 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:11:27 +08:00
weitianhua
e797e742f8 Add global header and change declaration position 2020-09-18 14:11:18 +08:00
weitianhua
627b5a4cae Remove uneccessary macro
Separate AVRC from A2DP when AVRC not Initialized
2020-09-18 14:11:10 +08:00
weitianhua
3c88fa5a1e Rewrite a2dp clean_up function 2020-09-18 14:11:00 +08:00
weitianhua
8ad40cecb4 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:10:48 +08:00
Jiang Jiang Jian
df3aef80c0 Merge branch 'component/seperate_bta_jv_l2c_4.1' into 'release/v4.1'
Component/seperate bta jv l2c 4.1

See merge request espressif/esp-idf!9645
2020-09-11 19:38:00 +08:00
Jiang Jiang Jian
b131fffa84 Merge branch 'bugfix/add_protection_for_spp_api_4.1' into 'release/v4.1'
Bugfix/add protection for spp api 4.1

See merge request espressif/esp-idf!10282
2020-09-11 19:33:49 +08:00