Commit graph

229 commits

Author SHA1 Message Date
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
c147d7b03e Merge branch 'feature/btdm_bt_spp' into 'master'
component/bt: Add bt spp profile

See merge request !1593
2018-01-09 10:44:46 +08:00
Jiang Jiang Jian
a1b59679f9 Merge branch 'bugfix/btdm_standardize_code' into 'master'
component/bt: Standardize code

See merge request !1696
2018-01-05 18:56:08 +08:00
baohongde
d2663c866e component/bt: Add SPP profile 2018-01-05 16:48:29 +08:00
baohongde
2530e0aeb9 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-03 10:31:30 +08:00
baohongde
f5f8dda8a2 component/bt: Fix bug of adding device to white list has no callback when while list is full 2017-12-25 17:45:12 +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
Tian Hao
583dceb69b component/btdm : change bt.h name to esp_bt.h to form the name prefix 2017-12-08 10:33:50 +08:00
wangmengyang
c23af0b5bb component/bt: implement Classic Bluetooth GAP APIs for device and service discovery 2017-12-06 10:52:06 +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
Yulong
b07a5f03cf component/bt: Change the gattc prepare write callback params. 2017-11-14 07:00:45 -05:00
Yulong
1d13b58c62 component/bt: Added the queue event when the gattc command is full. 2017-11-13 22:44:27 -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
Jiang Jiang Jian
1de3fc4a2c Merge branch 'bugfix/btdm_master_dont_send_pair_req_#13686' into 'master'
component/bt: Fix the bug of master don't send pair request to the slave when the sec_act set to the value of ESP_BLE_SEC_ENCRYPT.

See merge request !1376
2017-11-02 15:49:27 +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
zhiweijian
15c75974de component/bt: fix crash when set device name NULL 2017-10-27 15:21:00 +08:00
Yulong
da32fbce7a component/bt: Fix the bug of can't pair if master send pair req but slave don't send sec req. 2017-10-23 15:12:36 +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
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
zhiweijian
4720196015 Component/bt: fix multi-connection failed
- modify some comments
2017-09-30 16:30:43 +08:00
Jiang Jiang Jian
c2a4713958 Merge branch 'bugfix/btdm_btc_ble_set_rand_addr' into 'master'
component/bt: Fix bug of function btc_ble_set_rand_addr

See merge request !1297
2017-09-30 15:49:53 +08:00
baohongde
b59708ca87 component/bt: Fix bug of function btc_ble_set_rand_addr 2017-09-29 11:46:08 +08:00
Yulong
e815660824 component/bt: Fixed the bug of mutiple read can not callback. 2017-09-19 04:50:26 -04:00
Yulong
388bf8d579 componnent/bt: remove the <<<<<<< HEAD in the code. 2017-09-18 05:44:50 -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
Jiang Jiang Jian
3d7ec475d1 Merge branch 'feature/btdm_cherry_pick_change_gattc_api' into 'master'
component/bt: Change all the gattc API && bta gattc layer.

See merge request !1147
2017-09-15 19:39:29 +08: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
yulong
09a3e4fd58 squesh the commit.
component/bt: Change the idf test KnownIssues file.

component/bt: Fixed the bug of gattc mutilple read.
2017-09-14 09:35:36 -04:00
Jiang Jiang Jian
b70329040d Merge branch 'bugfix/btdm_gatts_notify_stress_test_crash' into 'master'
component/bt: fix bug for gatts notify stress test crash

See merge request !1245
2017-09-13 20:27:17 +08:00
zhiweijian
8921a36828 Component/bt: fix bug for gatts notify stress test crash 2017-09-13 11:19:58 +08: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
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
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
Jiang Jiang Jian
3a1de7dba3 Merge branch 'bugfix/btdm_fix_connection_parameters_update' into 'master'
component/bt: fix connection parameters update

See merge request !1099
2017-09-01 20:15:30 +08:00
phuzi
762d5fcb4c Update documentation for esp_avrc_api
Updated documentation for esp_err_t esp_avrc_ct_send_passthrough_cmd to show both pressed and released key states

Merges https://github.com/espressif/esp-idf/pull/846
2017-08-30 17:55:00 +10:00
zhiweijian
1a9b02ccbc component/bt: fix connection parameters update
- update connection parameters timeout due to master update illegal connection parameters
- slave returns error status when slave check the connection parameters
- slave connection parameters update callback get that interval_max is equal to interval_min
2017-08-30 11:29:25 +08:00
Ivan Grokhotkov
de10032717 Merge branch 'feature/btdm_remove_gki' into 'master'
component/bt : remove all GKI reference

See merge request !1122
2017-08-23 18:01:54 +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
Jiang Jiang Jian
b0188b3f29 Merge branch 'bugfix/btdm_add_check_value_length_for_gatts_get_attribute_value' into 'master'
component/bt: add check value and length for esp_ble_gatts_get_attr_value(uint16…

See merge request !1110
2017-08-22 11:37:56 +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
Jiang Jiang Jian
363f201603 Merge branch 'bugfix/exection_not_init_bt_use_smp_api_#13691' into 'master'
component/bt: Added the bluedorid status checkout for the BLE security API.

See merge request !1045
2017-08-21 14:51:17 +08:00
zhiweijian
6276e71fc1 Component/bt: add check value and length for esp_ble_gatts_get_attr_value(uint16_t attr_handle, uint16_t *length, const uint8_t **value); 2017-08-20 19:12:57 +08:00
Yulong
4efc97efc1 component/bt: All esp_bluedroid_get_status check-return could be used as MACRO ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED); 2017-08-08 05:28:19 -04:00
Jiang Jiang Jian
886ea722ec Merge branch 'bugfix/btdm_add_set_local_privacy_callback' into 'master'
component/bt: add set local privacy func callback

See merge request !1026
2017-08-04 14:52:02 +08:00
zhiweijian
6ff53d1967 Component/bt: wrong return code type for notify func
- fix  esp_ble_gattc_register_for_notify()  returen wrong code type
- fix  esp_ble_gattc_unregister_for_notify()  returen wrong code type
2017-07-31 18:02:15 +08:00
zhiweijian
fc05851b05 Component/bt: add set local privacy func callback 2017-07-26 17:29:10 +08:00
Yulong
9d9280a8ea component/bt: Added the bluedorid status checkout for the BLE security API. 2017-07-24 02:50:23 -04:00
zhiweijian
58b65291d9 component / bt: add set pkt data length event callback 2017-06-15 16:02:03 +08:00
Jiang Jiang Jian
06fa08b022 Merge branch 'bugfix/btdm_config_bluedroid_mem_debug_github_#12631' into 'master'
component/bt: Change the osi_mem_dbg_init to the esp_bluedroid_init function.

See merge request !860
2017-06-14 11:18:34 +08:00
Jiang Jiang Jian
243bc97119 Merge branch 'bugfix/btdm_task_post' into 'master'
component/bt : fix task post bug && fix controller init protection

See merge request !856
2017-06-14 10:52:56 +08:00
Yulong
2a759a9864 component/bt: Change the osi_mem_dbg_init to the esp_bluedroid_init function. 2017-06-13 08:52:26 -04:00
Jiang Jiang Jian
be680a0ef3 Merge branch 'bugfix/btdm_auth_val_error_#12962' into 'master'
component/bt: correct the security demo pair status code.

See merge request !841
2017-06-13 18:14:39 +08:00
Tian Hao
808b07799c component/bt : fix task post bug && fix controller init protection
1. fix bluedroid task post to blocking.
2. use semphore protect btdm controller task when be called from higher priority task
2017-06-13 17:14:50 +08:00
Yulong
e5adfb8119 component/bt: correct the security demo pair status code. 2017-06-09 02:37:28 -04:00
island
30783d481d component/bt: Fix crash problem while using invalid control parameter
- Fix crash problem while using invalid control parameter to set gatt characteristic or descriptor
2017-06-07 20:18:36 +08:00
Jiang Jiang Jian
7da4b42ed1 Merge branch 'feature/btdm_add_connect_event_and_disconnect_event_for_gattc' into 'master'
component/bt: Add disconnect & connect func and event

See merge request !806
2017-06-07 13:45:43 +08:00
Jiang Jiang Jian
b78242da58 Merge branch 'bugfix/btdm_rebase_update_param_#9626' into 'master'
component/bt: rebase the btdm_updata_param_bug_#9626 to the new master.

See merge request !808
2017-06-06 20:55:23 +08:00
Yulong
e6acc32df6 component/bt: rebase the btdm_updata_param_bug_#9626 to the new master.
- Added the error code for the time out status.
2017-06-06 05:51:31 -04:00
Yulong
531f751fd3 component/bt: Cherry-pick the btdm_no_doc_for_value_type_github_#118659 to this branch to avoid conflict. 2017-06-06 05:22:17 -04:00
zhiweijian
db96edc5d9 component/bt: Add disconnect & connect func and event
- Add disconnect func for gap
- Add connect event and disconnect event for gattc
2017-06-06 16:53:37 +08:00
Jiang Jiang Jian
0a66f0db4c Merge branch 'bugfix/btdm_bit_against_enums_github_#12289' into 'master'
component/bt: Change the esp_gatt_perm_t & esp_gatt_char_prop_t type from enum t…

See merge request !809
2017-06-02 15:41:01 +08:00
Yulong
be3eda0044 component/bt: Change the esp_gatt_perm_t & esp_gatt_char_prop_t type from enum to uint16_t & uint8_t. 2017-06-02 01:48:56 -04:00
zhiweijian
f5a59f4f78 component/bt: add open and close event for gatts
1.added open event and close event for gatts.
2.used esp_log_buffer_char/hex for gattc scan result.
2017-06-01 15:01:54 +08:00
jack
fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
Yulong
e9fae704e3 component/bt: Merge the new master to avoid conflict. 2017-05-26 22:47:56 -04:00
Tian Hao
0c6d966bff component/bt : fix bugs of some constant value not equal internal define but quotes internal define 2017-05-25 16:12:48 +08:00
Yulong
66bb6a2f2b component/bt: squash the branch of the early commit
component/bt: squash the branch of the early commit

component/bt: Added the set static random address callback to the bt project.

component/bt: fixed the set static random address error.

component/bt: fixed the set static random address error.
2017-05-25 02:13:27 -04:00
Yulong
b401bbc4d6 component/bt: change the esp_ble_gattc_cache_refresh API return value from esp_gatt_status_t to esp_err_t. 2017-05-18 02:11:42 -04:00
Yulong
8f1a6989ee component/bt: Added the declaration for esp_ble_gattc_cache_refresh in the gattc api header file. 2017-05-18 02:07:16 -04:00
Yulong
00cdf62ce7 component/bt: fixed the discover primary service not correct if server changes service during disconnect period. 2017-05-16 09:10:37 -04:00
Jiang Jiang Jian
65acd99cce Merge branch 'feature/btdm_gattc_add_API_prepare_write_char_desrc' into 'master'
Component/bt:add API to prepare write descriptor for gattc



See merge request !734
2017-05-05 20:34:41 +08:00
zhiweijian
71401bc9b3 Component/bt:add API to prepare write descriptor for gattc 2017-05-05 18:08:47 +08:00
Jiang Jiang Jian
fd079a8bd6 Merge branch 'bugfix/set_scan_bug_rebase_#10399' into 'master'
component/bt: component/bt: Check own address and filter policy for validity.

rebase the invalid scan params not report error.

See merge request !736
2017-05-05 17:47:27 +08:00
Yulong
3453824bf2 component/bt: component/bt: Check own address and filter policy for validity. 2017-05-05 04:31:24 -04:00
zhiweijian
fb45ee7a4c Component/bt: add new cmd for blufi ,ESP32 close a gatt connection 2017-05-04 20:31:58 +08:00
Tian Hao
d648835def component/bt : fix the comment 2017-05-03 11:58:52 +08:00
Yulong
e8a3f87e4f component/bt:Fixed the bug for #11754:GATT service should provide command to set char/descriptor read value. 2017-04-28 07:23:52 -04:00
Yulong
bc807a18d1 component/bt:Finish all the separate code from BT & BLE 2017-04-20 07:18:05 -04:00
Yulong
2723504473 add the GATTC_INCLUDED marco to close the bta_gattc module when not used the GATTC 2017-04-19 05:16:24 -04:00
Yulong
c6a516f122 component/bt:move the btdm_rebase_ssp_api branch to this branch 2017-04-13 10:14:28 -04:00
Jiang Jiang Jian
6ace4f6fa4 Merge branch 'feature/btdm_avrc' into 'master'
Feature/btdm avrc

The source branch "feature/btdm_avrc" includes classic Bluetooth profiles A2DP(sink role) and AVRCP(controller role); 
Menuconfig options to control whether to enable classic BT is added.

See merge request !591
2017-04-13 14:36:58 +08:00
wangmengyang
b503d68045 component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-12 16:42:14 +08:00
island
941a12cb4e bt component: Add stop adv/scan completed event 2017-04-12 14:19:16 +08:00
island
a4f3312d9d bt component: optimize scan feature
1. Add advertising data length and scan response length in scan result
2. Add scan continuously feature
3. Fix non connectable adv topology error
4. Increase BTC queue size
2017-04-11 14:20:20 +08:00
wangmengyang
8ec94418de component/bt: clean up the API header and generate documentation files 2017-03-18 14:55:31 +08:00
wangmengyang
1cf5a56896 component/bt: move API to set device name that can be used by both bt and ble applications 2017-03-17 19:16:52 +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
383db0dc81 Merge branch 'master' into feature/btdm_avrc 2017-03-13 16:21:41 +08:00
wangmengyang
d101f2113b component/bt: code clean up for btc_media_task
1. remove unused macros variables and functions
2. modify the implementation of API "esp_a2d_register_data_callback" to post messages to BTC task.
2017-03-13 14:54:02 +08:00
wangmengyang
5b7b704365 component/bt: format the API headers 2017-03-09 19:03:34 +08:00
Ivan Grokhotkov
045aa45731 Merge branch 'bugfix/btdm_gatt_attribute_table_debug' into 'master'
bt component: fix bluetooth gatt packets process bugs

1. Add process of prepare write request packets
2. Add process of execute write request packets
3. Add process of reliable write request packets
4. Fix bug of processing read blob request packets
5. Fix bug of processing write request packets
6. Optimize error check and process in stack

See merge request !558
2017-03-09 13:28:11 +08:00
wangmengyang
18814c03d4 component/bt: clean up profile call/callback handlers
1. remove the empty function btc_gap_bt_cb_handler();
2. separate the a2dp profile call/callback handers
2017-03-08 21:08:11 +08:00
island
a74f3f9fd7 bt component: code style update 2017-03-08 17:09:05 +08:00
wangmengyang
e6f36f2dc5 component/bt: modify AVRCP APIs to post events and arguments to be handled by BTC task 2017-03-08 13:48:56 +08:00
wangmengyang
af13acdc29 component/bt: modify a2dp APIs to post event to BTC task 2017-03-07 21:15:54 +08:00
island
5ffe5474ac bt component: optimize gatt debug information 2017-03-07 19:55:21 +08:00
island
2955b20f2e bt component: fix bluetooth gatt packets process bugs
1. Add process of prepare write request packets
2. Add process of execute write request packets
3. Add process of reliable write request packets
4. Fix bug of processing read blob request packets
5. Fix bug of processing write request packets
6. Optimize error check and process in stack
2017-03-06 17:20:45 +08:00
Tian Hao
bc020da4f5 add extra check before bluedroid init and disable 2017-03-03 18:42:27 +08:00
wangmengyang
8f65322a84 component/bt: modify the enable/disable function 2017-02-28 11:47:04 +08:00