Commit graph

271 commits

Author SHA1 Message Date
Jiang Jiang Jian 9e5318b584 Merge branch 'bugfix/btdm_reconnect_con_params_update_reject_in_smp' into 'master'
Component/bt: update con params is rejected in smp when reconnection

See merge request idf/esp-idf!2318
2018-05-14 20:19:29 +08:00
Jiang Jiang Jian d4276efed7 Merge branch 'bugfix/bluedroid_const_char' into 'master'
Bluedroid: remove warnings about discarding "const" for "const char*"

See merge request idf/esp-idf!2387
2018-05-14 15:25:45 +08:00
Roland Dobai 2041c08681 Bluedroid: remove warnings about discarding "const" for "const char*" 2018-05-11 11:29:10 +02:00
zhiweijian cb59576dd0 Component/bt: fix service change write busy 2018-05-09 20:49:26 +08:00
zhiweijian 58b2cb3e0c Component/bt: update con params is rejected in smp when reconnection 2018-05-09 20:28:13 +08:00
Jiang Jiang Jian 1e8ab3d18e Merge branch 'bugfix/gap_appearance_fixes' into 'master'
components/bt: Make modifications to the support of GAP appearance/icon characteristic

See merge request idf/esp-idf!2249
2018-05-01 23:00:24 +08:00
Jiang Jiang Jian 0bb551c051 Merge branch 'bugfix/btdm_prepare_write_status_correct' into 'master'
component/bt: Check the value received from the peer device when sent the data used prepare write.

See merge request idf/esp-idf!2320
2018-05-01 22:57:20 +08:00
Jiang Jiang Jian 5a080ee37a Merge branch 'bugfix/btdm_genrate_hash_key_by_bluedroid' into 'master'
component/bt: Added the hash key generated directly in the bluedroid module.

See merge request idf/esp-idf!2321
2018-04-28 16:42:27 +08:00
Hrishikesh Dhayagude fd7baaf4ba components/bt: Make modifications to the support of GAP appearance/icon
characateristic

1. In addition to mentioning in the documentation, use the standard appearance
   values already present and return appropriate error in case an incorrect
   value is passed
2. Add ESP_BLE_APPEARANCE* macros corresponding to BTM_BLE_APPEARANCE*
and use them from the API instead
3. Add the missing appearance parameter values from
https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml
4. Fix some minor typos

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-28 13:59:36 +05:30
Yulong 6c20bc3203 component/bt: Added the hash key generated directly in the bluedroid module.
1. Change all the hash used from the coap module to generated by the bluedroid module directly.

component/bt: Added the <string.h> include file to the gattc_co module to avoid compile error.
2018-04-28 03:11:05 -04:00
Jiang Jiang Jian ee9ab48347 Merge branch 'feature/btdm_bt_spp_vfs' into 'master'
component/bt: Add SPP profile with VFS

See merge request idf/esp-idf!1883
2018-04-28 15:10:07 +08:00
baohongde d95d0ececb component/bt: Add SPP profile with VFS 2018-04-28 11:36:22 +08:00
Yulong fd3162d831 component/bt: Added the server test for the bit rate test.
component/bt: optimiz the code
component/bt: optimiz the code.
component/bt: added the l2c change.
component/bt: Added the modified.
component/bt: change the indicate callback function.

component/bt: added the BLE throughput test gattc & gatts example.

component/bt: Change the sdkconfig.default CONFIG_GATTS_NOTIFY_THROUGHPUT setting.

component/bt: Change the throughput_client_task delay method.

component/bt: change the btu task size from 4096 to 5096

comonent/bt: close the print when congest.

component/bt: Added the CPU frequency set method to the readme file.

component/bt: Change the gatts_demo_char1_val to gl_profile_tab[PROFILE_A_APP_ID].char_handle to avoid make error.

example/ble_throughput: Added the Readme explanation.

component/bt: Added the bt lib change.

component/bt: Update the bt lib & Change the LOG level from ERROR to DEBUG when congest.

component/bt: Fixed the bug of timer start assign error.

component/bt: Change back the gattc & gatts demo with same as the master.

example/ble_throughput: Fixed the bug when prepare write of the ble throughput.

component/bt: Update the check_sum algorithm.

component/bt: Change Added the path when used the include file of "l2cdefs.h" & "l2c_api.h".

example/throughput_client: Added the Freertos related header files to ble throughput client demo to avoid compile error.
2018-04-27 23:02:10 -04:00
Yulong 8f015e3e48 component/bt: Check the value received from the peer device when sent the data used prepare write.
component/bt: Fix misspellings of "corret" in comments in bta_gattc_write_cmpl function.
2018-04-27 08:20:01 -04: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
zhiweijian be107320f7 Component/bt: fix gatt cache error
- fix sev == NULL error
- fix start_handle == end_handle
2018-04-23 15:43:10 +08:00
Angus Gratton 088c73bd22 Merge branch 'feature/disable_ble_service_change_pr1673' into 'master'
Add option to ena/dis BLE service change registration

See merge request idf/esp-idf!2210
2018-04-23 09:15:02 +08:00
Jiang Jiang Jian c32ccf7abb Merge branch 'bugfix/add_NULL_value_check_bta_gattc_get_services' into 'master'
components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()

See merge request idf/esp-idf!2212
2018-04-20 18:15:45 +08:00
Yulong 2c7182c59f component/bt: For unity, Change all the associat & associa to abbreviated form(assoc). 2018-04-20 02:16:33 -04:00
Yulong ece6bd9b82 component/bt: Change the btc gattc callback function with the compile error.
1. Change all the gattc API && bta gattc layer.
2. Debug the code and change the btc_ble_gattc_get_db method.
3. Change the gatt read API interface.
4. Reconstruction the BTA_gattc_cache code.
5. Change back the bluedroid_get_status to marco.
6. Change the gattc docs format.
7. Change the docs format.
8. fix the read char value bug.
9. change the gattc_get_attr_count method.
10. Change back the bta_gattc write ccc code.
11. Change the gattc api docs format
12. Change the gattc API docs.
13. Change the prepare write descriptor method to avoid the exection.
14. modify gatt clinet demo with new API
15. Change the p_src_data->read.p_value to avoid exection.
16. Change the bugfix of gattc unreg for the notify.

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

component/bt: Added the bta_gattc_cache_write when gatt discovery complete.

component/bt: Added the bta_gattc_cache_write declaration.

component/bt: Added the comments for esp_ble_gattc_cache_refresh API.

component/bt: Change the spelling errors & some comment error.

component/bt: fix bug of get gattc cache address list error.

1. Change the esp_bluedroid_get_status to macro;
2. added the malloc & free for the get_addr_list

component/bt: Added the addr_info->ass_addr == NULL Judgment to prevent crashes in the bta_gattc_co_cache_find_src_addr function.

component/bt: Fixed following gattc cache bugs

1. gattc can't refresh the gattc cache in the gatt discover state;
2. remove the nvs_get_blob in the cache address init function;
3. added the nvs_set_blob return value judgment in the cache address save function;
4. added the list_new when ass_address is NULL;
5. Change the ass_address list remove method to fix the ass address can't remove bug.
2018-04-19 12:05:13 +08:00
Jiang Jiang Jian 16ad81c636 Merge branch 'feature/btdm_get_and_set_cod' into 'master'
component/bt: Add API: get cod & set cod

See merge request idf/esp-idf!2127
2018-04-17 14:21:18 +08:00
Hrishikesh Dhayagude 284f332f06 components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-10 09:34:03 +05:30
Ing. Jaroslav Safka 801632d68b bt: Add option to ena/dis BLE service change registration
Add option to enable/disable automatic registration of BLE Gattc
service change notify. Which sends in parralel
(with user message flow) commands to BLE server which
sometime leads to GATT_BUSY.
(BLE server is able to handle only one command at time)

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

Merges https://github.com/espressif/esp-idf/pull/1673
2018-04-10 12:27:33 +10:00
baohongde 789edc0b52 component/bt: Add API: get cod & set cod
In response to: https://github.com/espressif/esp-idf/issues/1565
2018-04-09 19:25:26 +08:00
zhiweijian 99872beb6a Component/bt: add set gap icon API 2018-03-30 09:21:53 +00:00
Jiang Jiang Jian e6d6deebc7 Merge branch 'bugfix/btdm_fix_connect_fail_when_remote_addr_is_random' into 'master'
Component/bt: modify open API params

See merge request idf/esp-idf!2116
2018-03-30 17:00:19 +08:00
Jiang Jiang Jian 6ffd089c97 Merge branch 'bugfix/btdm_fix_no_set_rand_addr_event_callback' into 'master'
Component/bt: fix no set rand add callback

See merge request idf/esp-idf!2140
2018-03-30 16:05:32 +08:00
Jiang Jiang Jian b26ab188af 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
2018-03-30 14:57:13 +08:00
Jiang Jiang Jian fc5b15173e Merge branch 'bugfix/btdm_add_some_comment' into 'master'
Component/bt: add some comments

See merge request idf/esp-idf!1949
2018-03-30 14:07:30 +08:00
zhiweijian e6262375a3 Component/bt: fix connect fail when remote addr type is random 2018-03-29 20:55:31 +08:00
zhiweijian aa236809ad Component/bt: fix no set rand add callback event 2018-03-29 20:17:14 +08:00
zhiweijian f5d581421e Component/bt: fix service change event params error 2018-03-29 16:11:16 +08:00
Jiang Jiang Jian 0a83733d2d Merge branch 'bugfix/btdm_spp_handle_error' into 'master'
component/bt: Fix bug of SPP handle error

See merge request idf/esp-idf!2026
2018-03-22 10:08:47 +08:00
Jiang Jiang Jian c45170cb66 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

(cherry picked from commit 7f2a9f0359)

d0e55335 Component/bt: fix reconnect fail in smp
2018-03-20 18:49:22 +08:00
Jiang Jiang Jian 0f6f762be0 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
2018-03-20 18:43:42 +08:00
zhiweijian 7c777f40aa Component/bt: add some comment 2018-03-19 21:19:21 +08:00
Jiang Jiang Jian 259220f33d Merge branch 'bugfix/btdm_spp_invalid_handle_path' into 'master'
component/bt: Fix bug of SPP invalid handle path

See merge request idf/esp-idf!2056
2018-03-19 18:40:47 +08:00
Ivan Grokhotkov 85c9164f50 Merge branch 'bugfix/fix_bt_typos' into 'master'
components/bt examples/bluetooth: Fix typographical errors

See merge request idf/esp-idf!1950
2018-03-19 16:58:55 +08:00
baohongde 1c48b4f01e component/bt: Fix bug of SPP invalid handle path 2018-03-19 02:22:45 +00:00
zwj d1405183a5 component/bt: fix gattc open api 2018-03-16 19:17:55 +08:00
Jiang Jiang Jian dc66940f82 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
2018-03-15 15:28:11 +08:00
Yulong c802ea842d component/bt: Change the char_uuid to descr_uuid in the add descriptor callback params. 2018-03-15 02:29:11 -04:00
baohongde d082316507 component/bt: Fix bug of SPP handle error 2018-03-09 11:46:30 +08:00
baohongde f1d3f689e8 component/bt: Fix bug: a2dp disc_rsn error when as master 2018-03-06 14:11:28 +08:00
baohongde 569b9d592e component/bt: remove some error logs which are not error 2018-03-05 19:22:21 +08:00
Jiang Jiang Jian 17e8d49f26 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
2018-03-05 16:14:48 +08:00
Hrishikesh Dhayagude 4a7d445301 components/bt examples/bluetooth: Fix typographical errors
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-02-13 13:25:33 +05:30
baohongde 0519a73334 component/bt: Fix mem leak of bt 2018-02-08 16:26:12 +08:00
baohongde acdad3237c component/bt: Fix bug:update pktlen have no callback 2018-02-06 14:54:05 +08:00
baohongde 79fd3f4f10 component/bt: Fix bug:scan result of adv type is wrong 2018-02-02 19:17:39 +08:00
wangmengyang 90c9ffa975 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.
2018-01-27 19:03:06 +08:00
Jiang Jiang Jian daa8cfa800 Merge branch 'bugfix/btdm_fix_stop_adv_no_callback_when_adv_has_been_stoped' into 'master'
Component/bt: fix stop adv no callback when adv has already stoped

See merge request !1838
2018-01-26 20:37:12 +08:00
zhiweijian d54e188e61 Component/bt: fix stop adv no callback when adv has been stoped 2018-01-25 15:31:17 +08:00
Yulong 63e5cbbd66 component/bt: Added the bluedroid environment variable dynomic malloc support & support to malloc the memory to the psram.
component/bt: Added the Macro for the classic BT support.
component/bt: added the bluedroid deinit method.
component/bt: allow more classic BT global variables to use dynamic allocation scheme
1. allocate memory for AVDT, AVCT control blocks when dynamic memory is used
2. allow SBC decoder buffer to use dynamic allocation scheme
component/bt: Remove the wrong changes in bt/Kconfig & Added the GATTS_INCLUDED in the gatt_free function when gatt service close.
component/bt: Shorten the abbreviation BT_ALLOCATION_FROM_SPIRAM_FIRST and BT_BLE_DYNAMIC_ENV_MEMORY two macros.
2018-01-24 15:18:02 +08:00
Jiang Jiang Jian cd54a95a7f Merge branch 'feature/btdm_a2dp_src' into 'master'
Feature/btdm a2dp src

See merge request !1190
2018-01-15 18:55:01 +08:00
wangmengyang f360fe5b3e component/bt: implement A2DP source
1. Modified symbol names of A2DP sink APIs include:
- esp_a2d_data_cb_t --> esp_a2d_sink_data_cb_t
- esp_a2d_register_data_callback --> esp_a2d_sink_register_data_callback
2018-01-09 20:20:52 +08:00
Jiang Jiang Jian 3452845063 Merge branch 'bugfix/btdm_avrc_connect_state_evt' into 'master'
Bugfix/btdm avrc connect state evt

See merge request !1717
2018-01-09 19:33:06 +08:00
wangmengyang e07b43e924 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-09 16:33:48 +08:00
Jiang Jiang Jian ff726b4c79 Merge branch 'bugfix/btdm_fix_cant_remove_boned_device_if_its_connected' into 'master'
Component/bt: fix can not remove boned device if it is connected

See merge request !1758
2018-01-09 11:42:45 +08:00
zhiweijian 831b2c0441 Component/bt: fix can not remove boned device if it is connected 2018-01-08 17:55:00 +08:00
baohongde d2663c866e component/bt: Add SPP profile 2018-01-05 16:48:29 +08:00
Jiang Jiang Jian a567de1576 Merge branch 'feature/btdm_classic_discovery' into 'master'
component/bt: implement Classic Bluetooth GAP APIs for device and service discovery

See merge request !1576
2017-12-20 13:30:31 +08:00
Yulong 967ff895e7 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:16:23 +08:00
wangmengyang c23af0b5bb component/bt: implement Classic Bluetooth GAP APIs for device and service discovery 2017-12-06 10:52:06 +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