Commit Graph

47 Commits

Author SHA1 Message Date
baohongde 67edd0c10e components/bt: Replace task post with btc_inter_profile_call, when post message from btc_dm to btc_gap 2020-09-28 19:36:23 +08:00
xiongweichao 67276f5d26 add remove bond device complete event 2020-09-28 16:14:52 +08:00
Chinmay Chhajed 6bbb75f219 Bluedroid: Fixes cases having fallback to link up event.
Signed-off-by: Chinmay Chhajed <chinmay.chhajed@espressif.com>
2020-07-27 14:08:03 +05:30
Chinmay Chhajed 99d572700d 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.
2020-06-25 13:59:14 +00:00
Geng Yu Chao db8bcc60f9 Bugfix/btdm fix doc and host bug backport v3.3 2019-12-18 14:19:13 +08:00
zhiweijian 3ed0f8e113 Component/bt: fix build warning when bluedroid disable log 2019-03-20 15:02:57 +08:00
Jiang Jiang Jian bc30569842 Merge branch 'bufix/btdm_fix_save_key_when_auth_mode_without_bond' into 'master'
Component/bt: fix save keys when auth mode without bond

See merge request idf/esp-idf!3782
2018-12-14 10:35:14 +08:00
zhiweijian 7c6211fe45 Component/bt: fix save keys when auth mode without bond 2018-12-13 15:43:31 +08:00
zhiweijian 5c5799fa51 Component/bt: fix auth_mode error when reconnection in SMP 2018-12-04 18:05:25 +08:00
zhiweijian 3050e55801 Component/bt: add only accept sepecified Authentication 2018-09-29 21:23:55 +08:00
zhiweijian c462a66726 Component/bt: fix save error key in smp when reconnect 2018-09-12 19:51:59 +08:00
wangmengyang e9e3bc492b 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-10 03:35:58 +00:00
baohongde bd8b9960d5 component/bt: Add Legacy Pairing 2018-09-04 21:11:03 +08:00
zhiweijian 57355d7154 Component/bt: fix get bond list error when connection with no bond 2018-08-08 14:44:22 +08:00
baohongde 21af1d7339 component/bt: Add Secure Simple Pairing 2018-07-10 11:18:52 +08:00
baohongde 29b7d4e916 component/bt: Fix bug of BT and BLE remove bond device
1. esp_ble_remove_bond_device will only remove BLE bond key and disconnect BLE device.
2. esp_bt_gap_remove_bond_device  will only remove BT bond key and disconnect BT device.
2018-06-22 11:54:40 +08:00
wangmengyang 4c4e143a2f component/bt: implement HFP Hands Free Unit Role 2018-05-21 11:33:30 +08:00
baohongde 174501ff35 component/bt: modify BT GAP structure
1. Separate the upward and the downward
2. Cancel use of msg.aid when call btc_transfer_context
2018-05-16 18:58:13 +08:00
Hrishikesh Dhayagude da6cb6c741 components/bt: Improve the Bluetooth debug messaging scheme
As of now, when Bluetooth debugs are enabled, all the messages are
mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor
shows all logs in red color which might lead to missing the actual
errors

This patch maps the Bluetooth messages to appropriate ESP_LOG* messages
and improves readability.

Also, make the BT trace level be configurable in menuconfig, so that
each layer of bt trace can be enabled/disabled.

Finally, add debug log control for BTC, OSI, BLUFI and clear up
Bluetooth debug logs.

So, with this the method of enabling Bluetooth logs is as follows:
1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable
-> BT DEBUG LOG LEVEL -> set trace level for every layer of BT

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-05-14 20:45:05 +08:00
Roland Dobai 2041c08681 Bluedroid: remove warnings about discarding "const" for "const char*" 2018-05-11 11:29:10 +02:00
baohongde c22c070e07 component/bt: Add APIs of get and remove bond device
1. Add APIs of get and remove bond device
2. Add ESP_BT_GAP_AUTH_CMPL_EVT
2018-05-03 19:05:57 +08:00
Tian Hao adada3f67e component/bt : modify header files to avoid conflict
1. add the L1 include path with a prefix, such like osi/list.h, stack/a2d_api.h and etc.
2. modify component, only bluedroid/api/include/api is export to another component and application,
   other include path just for bluedroid used
3. put bluedroid/include into common/include/common, so the root directory of bluedroid have no include path.
4. modify doxygen to use esp_bt.h and redirect to
component/bt/bluedroid/api/include/api/

fix compile
2018-04-26 19:32:06 +08:00
baohongde 52dbcef908 component/bt: Fix exception when there is no device name 2018-04-10 17:55:33 +08:00
zhiweijian 41f338d23c Component/bt: fix bt load boned in smp 2018-01-26 14:38:54 +08:00
Jiang Jiang Jian d31b654f3f Merge branch 'bugfix/btdm_fix_memory_leak_for_SMP' into 'master'
component/bt: fix memory leak in SMP

See merge request !1690
2017-12-27 11:43:18 +08:00
zhiweijian 763406b4cc Component/bt: fix memory leak in SMP 2017-12-20 10:30:31 +08:00
wangmengyang c23af0b5bb component/bt: implement Classic Bluetooth GAP APIs for device and service discovery 2017-12-06 10:52:06 +08:00
Yulong 25e8c09b6d component/bt: Change the param.remove_bond_dev_cmpl.status value. 2017-10-10 04:02:05 -04:00
Yulong 875ba996d5 component/bt: fix the bug when close the SMP module in the menuconfig will lead to compile error. 2017-09-15 10:32:28 +08:00
Tian Hao 38102f4148 component/bt : fix btc security storage bug
1. Remove the bond_device global variable.
2. Fix bond_device add cause memory exception
3. Modify the code location.
4. modify thread security
5. remove esp_ble_clear_bond_device_list() API
6. modify esp_ble_get_gond_device_list() to return list immediately, rather than wait event.
7. modify the gatt_security_server demo to show how to remove all the bonded devices.
8. fix some code bugs may cause something error.
2017-09-07 19:37:49 +08:00
Tian Hao e4f63819a1 component/bt : remove all GKI reference
1. remove GKI(not use osi_free_and_reset)
2. modify mutex/semaphore to individual directory
3. set osi_malloc as malloc(previously use calloc)
4. change osi allocator debug osi_free
5. fix rebase of remove GKI
2017-08-23 15:29:30 +08:00
Yulong 202c5783db component/bt:squash the 2 commits.
component/bt: cherry-pick the bugfix/btdm_api_manage_pair_info_#13119 to this branch.

component/bt: Change the ble gap API code format & added the status judgment in the btc_storage_load_bonded_ble_devices function.
2017-08-21 06:17:21 -04:00
Yulong 574d0cf846 component/bt: Fixed a very important bug of the SMP security module when use SMP to connected after bonding. 2017-06-26 05:02:57 -04:00
zhiweijian eec989f026 Component /bt: modify some log infor 2017-06-21 10:54:51 +08:00
Yulong 3f997d3e8c component/bt: Added the unhandle log to the btc dm case. 2017-06-13 22:37:44 -04:00
Yulong 411b5ecc43 component/bt: delete the bd_addr to avoid the warning. 2017-06-09 05:07:26 -04:00
Yulong 4734ba40b0 component/bt: Change the btc layer data copy method. 2017-06-09 04:32:01 -04:00
Yulong 22ccf6c368 component/bt:rebase the BT_BLE_separate to the new master 2017-04-17 22:53:43 -04:00
Yulong c6a516f122 component/bt:move the btdm_rebase_ssp_api branch to this branch 2017-04-13 10:14:28 -04:00
wangmengyang e132e95476 component/bt: format the new source files 2017-03-17 22:46:49 +08:00
wangmengyang fda2e89a1e component/bt: add conditional compilation direvatives to control the source code building of classic bluetooth 2017-03-17 15:08:47 +08:00
wangmengyang af13acdc29 component/bt: modify a2dp APIs to post event to BTC task 2017-03-07 21:15:54 +08:00
wangmengyang cfb18ba537 component/bt: fix some typos and comments 2017-03-07 15:33:05 +08:00
wangmengyang 3acd445f94 component/bt: transport the following modules: btif_config, btif_storage, btif_util 2017-03-07 15:09:52 +08:00
wangmengyang b74eb56710 component/bt: transport btif_avk module 2017-03-01 13:49:26 +08:00
wangmengyang acab9e7ae4 fix btc_dm.c/h and replace the functions which are originally in btif_core.c and btif_dm.c 2017-02-28 15:43:02 +08:00
wangmengyang 8f65322a84 component/bt: modify the enable/disable function 2017-02-28 11:47:04 +08:00