Commit graph

161 commits

Author SHA1 Message Date
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
7d3e8998d8 Component/bt: fix can not remove boned device if it is connected 2018-01-10 10:46:11 +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
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
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
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
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
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
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
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
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
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
Yulong
8ca40818eb component/bt: Fix the write value not store in the queue command bug. 2017-11-08 04:23:12 -05:00
Jiang Jiang Jian
b13cd4adf8 Merge branch 'feature/btdm_add_value_callback_when_send_notification_or_indicate_failed' into 'master'
component/bt: add value callback when send notification or indicate failed

See merge request !1457
2017-11-03 10:05:29 +08:00
zhiweijian
9a96187655 Component/bt: modify some log 2017-11-02 19:45:13 +08:00
zhiweijian
e7020460c6 Component/bt: add value callback when send notification or indicate failed 2017-11-01 11:00:08 +08:00
zhiweijian
481e436587 Component/bt: modify close event and disconnection event params
- modify close event params
- modify disconnection event params
- modify connect event params
2017-11-01 10:40:03 +08:00
Jiang Jiang Jian
a0ad3ff008 Merge branch 'bugfix/btdm_fix_set_attr_value_crash_when_length_is_0' into 'master'
component/bt: fix crash when the length of attr value set zero

See merge request !1397
2017-10-13 16:00:15 +08:00
Jiang Jiang Jian
90be957af1 Merge branch 'bugfix/btdm_fix_register_app_id_failed_when_more_than_3' into 'master'
component/bt: fix register more than three app_ids failed

See merge request !1389
2017-10-13 15:57:00 +08:00
zhiweijian
520b3340f6 Component/bt: fix crash when set attr value 0 2017-10-13 15:06:08 +08:00
zhiweijian
49ad8bf6c3 Component/bt: fix register more than 3 app_id failed 2017-10-12 21:07:40 +08:00
Jiang Jiang Jian
244e947beb Merge branch 'bugfix/btdm_fix_add_whitelist_failed' into 'master'
Component/bt: fix add whitelist failed

See merge request !1326
2017-10-12 19:01:01 +08:00
Jiang Jiang Jian
f8caa403db Merge branch 'bugfix/btdm_remove_bond_device_not_return_error' into 'master'
component/bt: Fixed the bug when remove the bonded device with not exist address…

See merge request !1370
2017-10-12 18:59:09 +08:00
zhiweijian
cd3d9715bb Component/bt: fix add whitelist failed
- fix add whitelist failed
- add add whitelist callback func
2017-10-11 15:30:09 +08:00
Yulong
25e8c09b6d component/bt: Change the param.remove_bond_dev_cmpl.status value. 2017-10-10 04:02:05 -04:00
Yulong
e02ff1ed89 component/bt: Change the bta_gattc_pop_command_to_send function to static. 2017-10-10 03:12:00 -04:00
Yulong
8e08097151 component/bt: Fixed the bug when remove the bonded device with not exist address will not return error. 2017-10-10 02:29:54 -04:00
zhiweijian
c75da555af Component/bt: fix set scan params and start scan action 2017-09-30 17:01:57 +08:00
Jiang Jiang Jian
a8dab7680a Merge branch 'bugfix/btdm_gattc_mutiple_read_bug' into 'master'
component/bt: Fixed the bug of mutiple read can not callback.

See merge request !1286
2017-09-30 15:45:56 +08:00
Yulong
3d3bcd6275 component/bt: Added the gattc command queue support. 2017-09-30 13:59:14 +08:00
Yulong
fb93a59619 component/bt: added the queue to store the gattc commands. 2017-09-30 13:59:14 +08:00
Yulong
f7a2cc37b3 component/bt: Fix the bug of total attr didn't reset when init the gattc cache. 2017-09-28 02:09:02 -04:00
Yulong
f325ba3942 component/bt: Change the cmpl_evt command in the bta_gattc_read_cmpl function. 2017-09-20 04:28:52 -04:00
Yulong
e815660824 component/bt: Fixed the bug of mutiple read can not callback. 2017-09-19 04:50:26 -04:00
Yulong
8925a90d40 squash again
squash the commit.
component/bt:Added the update_white_list & set_prefer_conn_params API to the bt project.

component/bt: Added the get white list size API & delete the read adv tx power API.

component/bt: Change the esp_gap_ble_api.h esp_ble_gap_set_prefer_conn_params API docs.

changed btm_find_dev to btm_find_or_alloc_dev

component/bt: Change the rssi API deep copy method.

component/bt: Change the code as comment in the gitlab.

squash the commit.
component/bt:Added the update_white_list & set_prefer_conn_params API to the bt project.

component/bt: Added the get white list size API & delete the read adv tx power API.

component/bt: Change the esp_gap_ble_api.h esp_ble_gap_set_prefer_conn_params API docs.

changed btm_find_dev to btm_find_or_alloc_dev

component/bt: Change the rssi API deep copy method.

component/bt: Change the code as comment in the gitlab.

component/bt: change the ESP_BLE_CONN_PARAM_UNDEF redefinition error.

component/bt: Change the ESP_BLE_IS_VALID_PARAM function with the compile error.
2017-09-18 05:39:26 -04:00
Yulong
1759a47060 This is a combination of 4 commits.
squash again all the commit.

component/bt: Change all the gattc API && bta gattc layer.

component/bt: Debug the code and change the btc_ble_gattc_get_db method.

component/bt: Change the gatt read API interface.

component/bt: Reconstruction the BTA_gattc_cache code.

component/bt: Change back the bluedroid_get_status to marco.

component/bt: Added the serch service res start_handle & end_handle to the result.

component/bt: Change the gattc docs format.

component/bt: Change the docs format.

component/bt: fix the read char value bug.

component/bt: change the gattc_get_attr_count method.

component/bt: Change back the bta_gattc write ccc code.

component/bt: Change the gattc api docs format

component/bt: Change the gattc API docs.

component/bt: Change the prepare write descriptor method to avoid the exection.

Component/bt: modify gatt clinet demo with new API

component/bt: Change the p_src_data->read.p_value to avoid exection.

compoent/bt: Change the bugfix of gattc unreg for the notify.

Modify gattc security demo

component/bt: Change the log error.

Component/bt: modify gattc_multi_connect demo

componnet/bt: Change the bta_gattc_cache sdp include.

component/bt: Change the start_handle & end_handle not from the service.

component/bt: Change the gattc API docs.

component/bt: Change the return issues.

component/bt: Fixed the include service bug.

component/bt: Modify gattc_multi_connect demo , add scan log

component/bt: Fixed the BTA_GATTC_GetIncludeService start handle & end handle error bug.

component/bt: Fix the invalid handle of the get all char issues.

component/bt: Fix the bug with get_db_size_with_type of the start handle & end_handle not correted issue.

component/bt: Fixed the get secondly service num not correct issue.

component/bt: Fixed the last service handle not correted issue.
2017-09-12 07:36:02 -04:00
zhiweijian
f1c4eda373 Component/bt: add set local MTU API
- add esp_ble_gatt_set_local_mtu( ) API
- modify esp_ble_gattc_config_mtu(esp_gatt_if_t gattc_if, uint16_t conn_id)
- modify  gattc demo
2017-09-01 21:55:28 +08:00