Commit graph

734 commits

Author SHA1 Message Date
Jiang Jiang Jian a80e687f8c Merge branch 'bugfix/btdm_fix_service_change_event_param_error' into 'master'
Component/bt: fix service change event params error

See merge request idf/esp-idf!2150

(cherry picked from commit b26ab188af)

f5d58142 Component/bt: fix service change event params error
2018-03-30 14:57:24 +08:00
baohongde bc90b89e2b component/bt: Fix xQueueGenericSend assertion in release/v3.0 2018-03-30 14:53:27 +08:00
wangmengyang af211fcf0c component/bt: bugfix for no link key notification event on repairing for initiating side of simple_pairing
In response to: https://github.com/espressif/esp-idf/issues/1275
2018-03-27 15:49:52 +08:00
zhiweijian 48c7afde27 Component/bt: fix build error when close SMP 2018-03-21 13:48:05 +08:00
Jiang Jiang Jian e4357d9cf3 Merge branch 'cherry-pick-0f6f762b' into 'release/v3.0'
cherry pick 'bugfix/btdm_add_char_descr_uuid_error' into 'release/v3.0'

See merge request idf/esp-idf!2100
2018-03-21 10:21:54 +08:00
Jiang Jiang Jian db17ffef00 Merge branch 'cherry-pick-8ab17d7c' into 'release/v3.0'
cherry pick 'bugfix/btdm_avrc_remote_bda_error_when_disconnect' into 'release/v3.0'

See merge request idf/esp-idf!2099
2018-03-20 19:58:24 +08:00
Jiang Jiang Jian 7f2a9f0359 Merge branch 'bugfix/btdm_fix_reconnect_fail_in_smp_v30' into 'release/v3.0'
Component/bt: fix reconnect fail in smp for v3.0

See merge request idf/esp-idf!2075
2018-03-20 18:49:13 +08:00
Jiang Jiang Jian ecdeea9a85 Merge branch 'bugfix/btdm_add_char_descr_uuid_error' into 'master'
component/bt: Change the char_uuid to descr_uuid in the add descriptor callback params.

See merge request idf/esp-idf!2065

(cherry picked from commit 0f6f762be0)

c802ea84 component/bt: Change the char_uuid to descr_uuid in the add descriptor callback params.
2018-03-20 18:43:59 +08:00
Jiang Jiang Jian cfce9e1c72 Merge branch 'bugfix/btdm_avrc_remote_bda_error_when_disconnect' into 'master'
component/bt: Fix bug: AVRC remote_bda error when disconnect

See merge request idf/esp-idf!2093

(cherry picked from commit 8ab17d7ccf)

2531975c component/bt: Fix bug: AVRC remote_bda error when disconnect
2018-03-20 18:24:50 +08:00
Jiang Jiang Jian 9bd227f8c5 Merge branch 'bugfix/btdm_fix_gattc_open_API_v30' into 'release/v3.0'
component/bt: fix gattc open api for v3.0

See merge request idf/esp-idf!2077
2018-03-19 14:27:22 +08:00
Jiang Jiang Jian 998e18ed69 Merge branch 'bugfix/multi_connection_performance' into 'release/v3.0'
component/bt : improve multi-connection performance and stability

See merge request idf/esp-idf!2068
2018-03-19 14:05:19 +08:00
zhiweijian d0e553358a Component/bt: fix reconnect fail in smp 2018-03-19 11:15:38 +08:00
Jiang Jiang Jian 0cdb8b4888 Merge branch 'bugfix/btdm_fix_get_attr_value_error_after_prepare_write_v30' into 'release/v3.0'
Component/bt: fix get attr value error after prepare write for v3.0

See merge request idf/esp-idf!2028
2018-03-19 10:48:39 +08:00
Jiang Jiang Jian c1e4ebf2bc Merge branch 'cherry-pick-db690e3f-2' into 'release/v3.0'
Component/bt: add params check in prefer_conn_params() for v3.0

See merge request idf/esp-idf!2062
2018-03-19 10:47:55 +08:00
Jiang Jiang Jian 71ca4c50b0 Merge branch 'bugfix/btdm_clear_start_stop_adv_callback_when_complete_v30' into 'release/v3.0'
Component/bt: clear start/stop adv callback when complete_v3.0

See merge request idf/esp-idf!2029
2018-03-19 10:47:19 +08:00
zwj 05b5671fc4 component/bt: fix gattc open api 2018-03-16 19:23:31 +08:00
Jiang Jiang Jian 0cb7b27f8b Merge branch 'cherry-pick-702b4610-2' into 'release/v3.0'
Component/bt: fix set error params and return callback when start adv for v3.0

See merge request idf/esp-idf!2061
2018-03-15 18:07:19 +08:00
Jiang Jiang Jian 2319e8a0eb Merge branch 'cherry-pick-dc66940f' into 'release/v3.0'
Merge branch 'bugfix/btdm_a2dp_disc_rsn_error_when_as_master' into 'release/v3.0'

See merge request idf/esp-idf!2067
2018-03-15 18:06:00 +08:00
Tian Hao bc12970dde component/bt : improve multi-connection performance and stability 2018-03-15 15:36:53 +08:00
Jiang Jiang Jian 7a863cca7c Merge branch 'cherry-pick-047870fd' into 'release/v3.0'
Merge branch 'bugfix/btdm_string_to_bdaddr_error_when_opening_nano' into 'v3.0'

See merge request idf/esp-idf!2064
2018-03-15 15:34:48 +08:00
Jiang Jiang Jian 9c42b6194e Merge branch 'bugfix/btdm_a2dp_disc_rsn_error_when_as_master' into 'master'
component/bt: Fix bug: a2dp disc_rsn error when as master

See merge request idf/esp-idf!1995

(cherry picked from commit dc66940f82)

f1d3f689 component/bt: Fix bug: a2dp disc_rsn error when as master
2018-03-15 15:28:53 +08:00
Jiang Jiang Jian 0f45323879 Merge branch 'bugfix/btdm_string_to_bdaddr_error_when_opening_nano' into 'master'
component/bt: Fix bug: string_to_bdaddr() error when opening nano

See merge request idf/esp-idf!1981

(cherry picked from commit 047870fd80)

54320d5f component/bt: Fix bug: string_to_bdaddr() error when opening nano
2018-03-15 14:15:31 +08:00
Jiang Jiang Jian 48ea4bc7f4 Merge branch 'bugfix/btdm_add_param_check_in_gap_set_prefer_conn_params' into 'master'
Component/bt: add_params_check_in_prefer_conn_params()

See merge request idf/esp-idf!1944

(cherry picked from commit db690e3f85)

b09d681d Component/bt: add_params_check_in_prefer_conn_params()
2018-03-15 12:07:01 +08:00
Jiang Jiang Jian 69686ae8a9 Merge branch 'bugfix/btdm_fix_set_error_channel_map_in_adv_params' into 'master'
Component/bt: fix set error params and return callback when start adv

See merge request idf/esp-idf!1943

(cherry picked from commit 702b46108c)

4056878c Component/bt: fix set error params and add callback in adv params
2018-03-15 12:04:56 +08:00
baohongde 1d03398a64 component/bt: Fix bug of a2dp cleanup bug when connected in v3.0 2018-03-12 16:36:11 +08:00
zhiweijian ebfc47c34b Component/bt: clear start/stop adv callback when complete 2018-03-09 11:14:11 +08:00
zhiweijian 681805b6c7 Component/bt: fix get attr value error after prepare write 2018-03-09 11:10:04 +08:00
Jiang Jiang Jian e4fb19000a Merge branch 'bugfix/btdm_update_pktLen_have_no_callback' into 'master'
component/bt: Fix bug:update pktlen have no callback

See merge request idf/esp-idf!1913

(cherry picked from commit 17e8d49f26)

acdad323 component/bt: Fix bug:update pktlen have no callback
2018-03-05 16:15:39 +08:00
baohongde 5e48c2bfef component/bt: Fix mem leak of bt in v3.0 2018-03-02 03:53:07 +00:00
Jiang Jiang Jian 1181b65f7d Merge branch 'cherry-pick-22dcdce9' into 'release/v3.0'
Merge branch 'bugfix/btdm_scan_result_of_adv_type_wrong' into 'release/v3.0'

See merge request idf/esp-idf!1914
2018-02-24 10:24:17 +08:00
Jiang Jiang Jian 3b116ae0cb Merge branch 'bugfix/btdm_a2dp_task_stack_size_for_v3.0' into 'release/v3.0'
component/bt: make A2DP sink task size configurable through menuconfig

See merge request idf/esp-idf!1890
2018-02-24 10:18:12 +08:00
Jiang Jiang Jian 54b595ed51 Merge branch 'bugfix/btdm_alarm_free_for_v3.0' into 'release/v3.0'
component/bt: free timer resources after using them

See merge request idf/esp-idf!1888
2018-02-24 10:17:15 +08:00
Jiang Jiang Jian eac9eb36d1 Merge branch 'bugfix/btdm_scan_result_of_adv_type_wrong' into 'master'
component/bt: Fix bug:scan result of adv type is wrong

See merge request idf/esp-idf!1897

(cherry picked from commit 22dcdce949)

79fd3f4f component/bt: Fix bug:scan result of adv type is wrong
2018-02-06 15:53:16 +08:00
wangmengyang 9bfb2f0cab component/bt: make A2DP sink task size configurable through menuconfig
1. make the A2DP sink task stack size configurable through menuconfig

# Conflicts:
#	components/bt/Kconfig
#	components/bt/bluedroid/api/include/esp_a2dp_api.h
#	components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_sink.c
#	components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c
#	components/bt/bluedroid/osi/include/thread.h
2018-02-05 19:47:58 +08:00
Jiang Jiang Jian 8856cc055a Merge branch 'bugfix/btdm_fix_stop_adv_no_callback_when_adv_has_been_stoped_for_v30' into 'release/v3.0'
Component/bt: fix stop adv no callback when adv has been stoped for v3.0

See merge request idf/esp-idf!1857
2018-02-01 20:15:51 +08:00
wangmengyang fab14106c8 component/bt: free timer resources after using them
Bluedroid use a set of timer function pairs such as btu_start_timer/btu_stop_timer, btu_sys_start_timer/btu_sys_stop_timer for use, in a lack of timer release functions. Thus the timers may be exhausted after some event sequence such as repetition of connection/reconnection with different devices. The maximum timer number used in bluedroid is given by ALARM_CBS_NUM which is 30 for now. This bugfix borrowed some update from bluedroid in Andoroid 7.0, which add timer release functions which promote the recycle of timer resources.

# Conflicts:
#	components/bt/bluedroid/stack/btu/btu_task.c
#	components/bt/bluedroid/stack/gatt/gatt_main.c
#	components/bt/bluedroid/stack/rfcomm/port_utils.c
#	components/bt/bluedroid/stack/rfcomm/rfc_utils.c
2018-02-01 13:52:19 +08:00
zhiweijian 154294e79f Component/bt: fix stop adv no callback when adv has been stoped 2018-01-31 20:24:02 +08:00
zhiweijian 621794abb5 Component/bt: fix bt load boned in smp 2018-01-26 14:45:36 +08:00
zhiweijian ab22836859 Component/bt: fix bonded device list error after reboot 2018-01-26 02:04:56 +00:00
Tian Hao f5c962d8b2 component/bt : fix the bug of pscan when interrupt react slowly 2018-01-23 14:16:02 +08:00
Jiang Jiang Jian df93f672e3 Merge branch 'bugfix/btdm_pair_fail_with_random_address' into 'master'
component/bt: Fix bug when pair with random address

See merge request !1784
2018-01-16 18:18:00 +08:00
Jiang Jiang Jian dfcff0a5bf Merge branch 'bugfix/btdm_discon_when_upd_conn_params_in_smp_for_v3.0' into 'release/v3.0'
component/bt: fix disconnect after connection params update in smp for v3.0

See merge request !1805
2018-01-16 16:41:26 +08:00
zhiweijian ced95c7fb0 Component/bt: fix update connection params error in smp for v3.0 2018-01-15 19:55:50 +08:00
Jiang Jiang Jian 309fb23ffc Merge branch 'cherry-pick-c401a74b' into 'release/v3.0'
Merge branch 'bugfix/btdm_aes_encrypt_workaround' into 'master'

See merge request !1800
2018-01-15 18:49:25 +08:00
zhiweijian 7bc1e7608c component/bt: fix disconnect after connection params update in smp 2018-01-15 17:12:23 +08:00
Jiang Jiang Jian 449ce1bad9 Merge branch 'bugfix/btdm_aes_encrypt_workaround' into 'master'
component/bt: disable Secure Connections to workaround AES encryption issue

See merge request !1719
2018-01-15 14:47:28 +08:00
Jiang Jiang Jian 424a5e2705 Merge branch 'bugfix/btdm_error_when_add_device_to_whitelist_twice' into 'master'
component/bt: Fix bug when add device to whitelist twice

See merge request !1700
2018-01-15 14:46:13 +08:00
zhiweijian 7d3e8998d8 Component/bt: fix can not remove boned device if it is connected 2018-01-10 10:46:11 +08:00
Jiang Jiang Jian e276b98fe4 Merge branch 'bugfix/BLE_SM_Security_Flags_pr1320_v30' into 'release/v3.0'
bt: Fix ble sm security flags (v3.0 backport)

See merge request !1754
2018-01-09 15:49:04 +08:00
Jiang Jiang Jian de7381b77e Merge branch 'bugfix/btdm_avrc_connect_state_evt_for_v3.0' into 'release/v3.0'
component/bt: add AVRC event for remote features indication

See merge request !1734
2018-01-09 15:39:02 +08:00
wangmengyang 645d9b9590 component/bt: add AVRC event for remote features indication
1. remove the feature mask parameter from AVRC connection state event, as the AVCTP connection can be initiated by remote device before service discovery to remote device is performed. \
In this case, AVRCP connection state event may not be reported after connection initated by remote device is established.
2. remove ESP_AVRC_CT_MAX_EVT
3. add more documentations to AVRC APIs
2018-01-08 19:43:54 +08:00
Tim Cook eb408e50c4 n btm_sec_save_le_key() set BTM_SEC_LE_LINK_KEY_KNOWN (and BTM_SEC_LE_LINK_KEY_AUTHED if MITM was used) when process a local Long Term Key (key type BTM_LE_KEY_LENC). This is because these flags share bits with the BTM_SEC_FLAG_LKEY_KNOWN (and BTM_SEC_FLAG_LKEY_AUTHED) flag in btm_api.h. Without this code a link that is encrypted via SM pairing where only the local device exchanges the LTK (peer does not send its LTK) will not allow GATT operations that require encryption (request will be incorrectly rejected with insufficient authentication reason, regardless of if MITM is required).
Merges https://github.com/espressif/esp-idf/pull/1320
2018-01-08 10:37:19 +11:00
Tim Cook 60da98ee0b set ble_rsp_key member of structure bte_appl_cfg in function bta_dm_co_ble_set_rsp_key_req (function incorrectly uses ble_init_key member).
Merges https://github.com/espressif/esp-idf/pull/1320
2018-01-08 10:37:18 +11:00
baohongde 314f6f371c component/bt: Standardize code
Reported from github:
https://github.com/espressif/esp-idf/issues/1402
https://github.com/espressif/esp-idf/issues/1403
2018-01-05 19:31:53 +08:00
wangmengyang 3f3d8746fc component/bt: build libbtdm_app.a with updated toolchain for ESP-IDF v3.0 2017-12-29 15:24:02 +08:00
Jiang Jiang Jian c695a4e468 Merge branch 'cherry-pick-566fab02' into 'release/v3.0'
Merge branch 'bugfix/btdm_disconnect_fail_during_pairing' into 'master'

See merge request !1716
2017-12-28 22:07:46 +08:00
Jiang Jiang Jian b6ebbb5662 Merge branch 'bugfix/btdm_disconnect_fail_during_pairing' into 'master'
component/bt: Fix bug of disconnected fail during pairing

See merge request !1672
2017-12-27 18:05:24 +08:00
Jiang Jiang Jian 38d58f1c2e Merge branch 'bugfix/btdm_error_when_white_list_is_full' into 'master'
component/bt: Fix bug of adding device to white list has no callback when while list is full

See merge request !1689
2017-12-27 18:04:25 +08:00
zhiweijian 031ab556a9 component/bt: fix memory leak in SMP
- fix memory leak in smp
- fix log error in config_parse
2017-12-20 10:28:04 +08:00
Jiang Jiang Jian b5942dc400 Merge branch 'bugfix/btdm_send_data_length_req_after_read_feature_complete_for_V3.0' into 'release/v3.0'
component/bt: send data length req after read feature complete for v3.0

See merge request !1665
2017-12-19 17:38:45 +08:00
Jiang Jiang Jian 72d4de442a Merge branch 'bugfix/btdm_mem_release_for_v3_0' into 'release/v3.0'
component/bt : fix btdm mem release cause 0x3ffbbb28-0x3ffbdb28 add to region but should not.

See merge request !1662
2017-12-19 17:24:47 +08:00
Yulong 7e488b0c6b component/bt: Optimized broadcast callback function, send the callback function to the application after the controller confirms receipt of the broadcast start.
1. optimiz the ble stop adv callback function.
2. added the osi_mutex_unlock in the bta_gattc_wait4_service_change_ccc_cback function when the p_timer_param == NULL ||  p_conn == NULL.
2017-12-15 18:17:02 +08:00
Tian Hao 489f5efbd1 component/bt : fix btdm mem release cause 0x3ffbbb28-0x3ffbdb28 add to region but should not.
1. fix the bug. Modify the condition that esp_bt_controller_mem_release() shoud be only called before esp_bt_controller_init() or after esp_bt_controller_deinit()
2. modify the example to use esp_bt_controller_mem_release()
2017-12-13 11:37:31 +08:00
zhiweijian 3a70e61477 Component/bt: send data length request by host after read feature complete 2017-12-12 20:02:36 +08:00
Tian Hao 043ef32651 component/btdm : change bt.h name to esp_bt.h to form the name prefix 2017-12-08 20:56:43 +08:00
Jiang Jiang Jian c44487143d Merge branch 'bugfix/btdm_connect_stable_optimiz' into 'master'
component/bt: Optimiz the ble connection performance.

See merge request !1618
2017-12-01 21:35:17 +08:00
Ivan Grokhotkov 08048ff76a Merge branch 'feature/btdm_avrc_metadata' into 'master'
Feature/btdm avrc metadata:  implemented AVRCP metadata and notification register commands

See merge request !1624
2017-12-01 20:31:25 +08:00
yulong 96f120c0d4 component/bt: Optimiz the ble connection performance. 2017-12-01 20:02:14 +08:00
Jiang Jiang Jian 7702e0f45b Merge branch 'bugfix/btdm_con_discon_test_crash_#16055' into 'master'
component/bt: Fix the bug when write ccc sometimes will lead to repeatedly release the memory.

See merge request !1599
2017-12-01 19:32:39 +08:00
pufstudio 86fa1820b7 component/bt: Add AVRCP medadata attribute support so A2DP can show track title, album, etc.
Merges https://github.com/espressif/esp-idf/pull/1078
2017-12-01 19:28:52 +08:00
Jiang Jiang Jian 015233d2dc Merge branch 'bugfix/btdm_mem_leak_lead_to_WDT_#16592' into 'master'
compoent/bt: Fix the bug when do the BLE pressure test will lead to memory leak will appear WDT.

See merge request !1610
2017-12-01 12:24:04 +08:00
yulong a0992ad442 component/bt: Remove the p_tle->param reset to 0 when free the p_timer_param pointer. 2017-11-30 16:15:22 +08:00
Yulong 5b243b1d01 component/bt: Added the mutex lock protect the ccc free when disconnect. 2017-11-30 02:45:26 -05:00
yulong 7353307ca5 component/bt: reset the p_cmd_list pointer after release the mem. 2017-11-29 10:50:03 +08:00
Tian Hao 59931cd63b component/bt : fix actvie scan cannot send scan_req in a certain case 2017-11-28 20:11:40 +08:00
yulong 5b9131cc60 compoent/bt: Fix the bug when do the BLE pressure test will lead to memory leak will appear WDT. 2017-11-28 15:43:33 +08:00
Jiang Jiang Jian 7980255498 Merge branch 'bugfix/btdm_scan_lead_to_conn_error' into 'master'
component/bt: Fixed the bug when stop scan if not set back the scan params will …

See merge request !1590
2017-11-27 21:21:13 +08:00
Yulong c71318ce88 component/bt: Fix the bug when write ccc sometimes will lead to repeatedly release the memory. 2017-11-25 05:06:14 -05:00
Yulong 177c92f15e component/bt: Change the code format. 2017-11-23 06:42:04 -05:00
Yulong 2458d15d2d component/bt: recovery the scan parameter to the controller before start scan. 2017-11-23 06:36:00 -05:00
Yulong f14699068d component/bt: Fixed the bug when stop scan if not set back the scan params will lead to connection request sent the empty packet to the peer device. 2017-11-23 03:54:29 -05:00
Yulong 729e0c2544 component/bt: Correct the SP_BLE_PWR_TYPE_CONN_HDL0-9 comment in the bt.h file to ESP_BLE_PWR_TYPE_CONN_HDL0-8 2017-11-20 08:05:35 -05:00
island 7bd8133639 component/bt: delete api bta_gattc_cache_write 2017-11-16 16:40:18 +08:00
island 5789a8a6e9 component/bt: delete gattc cache write operation 2017-11-16 11:18:17 +08:00
Jiang Jiang Jian ec9d93f4fc Merge branch 'bugfix/btdm_gattc_command_queue_fix' into 'master'
Bugfix/btdm gattc command queue fix

See merge request !1317
2017-11-15 10:54:02 +08:00
Jiang Jiang Jian 41272c5b94 Merge branch 'bugfix/btdm_modify_logs' into 'master'
component/bt: modify some log

See merge request !1485
2017-11-14 21:13:00 +08:00
Jiang Jiang Jian a2194ec665 Merge branch 'bugfix/btdm_remove_redundant_open_evt_for_same_app' into 'master'
component/bt: remove redundant open evt while calling gattc_open twice in the same app_id

See merge request !1526
2017-11-14 21:12:05 +08:00
Yulong b07a5f03cf component/bt: Change the gattc prepare write callback params. 2017-11-14 07:00:45 -05:00
island 2a4af8b83c component/bt: remove redundant open evt while calling gattc_open twice in the same app_id 2017-11-14 17:11:34 +08:00
Yulong 1d13b58c62 component/bt: Added the queue event when the gattc command is full. 2017-11-13 22:44:27 -05:00
island 38b287593c component/bt: fix not send indication confirm in case of server only 2017-11-14 11:43:57 +08:00
Yulong 2be5e73090 rebase the origin to the local 2017-11-13 02:20:02 -05:00
Yulong 8352eb6fa2 component/bt: Added the prepare write check. 2017-11-13 02:12:33 -05:00
wangmengyang 53273172fe component/bt: modify the implementation and interface of osi_alarm module
1. use esp_timer instead of FreeRTOS timer to implement osi_alarm in bluedroid
2. Remove two APIs: osi_alarm_now() and osi_alarm_time_diff() and modify the hci layer logic that use them
3. Implement osi_alarm_get_remaining_ms()
4. Move the definition of struct alarm_t in source file "alarm.c"
5. Add definition of module error code
2017-11-10 11:53:55 +08:00
Yulong ee43527108 compoent/bt: Modify bta_gattc_utils.c The value pointer copy is overwritten when a write event occurs. 2017-11-09 14:47:11 +08:00
Yulong e6b2c19eea component/bt: Fix the write value not store in the queue command bug. 2017-11-09 14:47:11 +08:00
Yulong 68833fe94c component/bt: Change the bta_gattc_pop_command_to_send function to static. 2017-11-09 14:47:11 +08:00
Yulong 0ae5320f50 component/bt: Added the gattc command queue support. 2017-11-09 14:47:11 +08:00
Yulong 7a27e3c74d component/bt: added the queue to store the gattc commands. 2017-11-09 14:47:11 +08:00
Yulong 1ceef12238 compoent/bt: Modify bta_gattc_utils.c The value pointer copy is overwritten when a write event occurs. 2017-11-09 01:44:16 -05:00