Commit graph

230 commits

Author SHA1 Message Date
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 73462c052e Merge branch 'bugfix/btdm_fix_set_scan_params_not_work' into 'master'
component/bt: fix scan params not work when start scan

See merge request !1307
2017-10-12 18:57:36 +08:00
Yulong 7617a3c434 component/bt: Fix the bug cann't use esp_ble_gatts_get_attr_value to get the attribute value after long write. 2017-10-11 07:47:12 -04: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 c75da555af Component/bt: fix set scan params and start scan action 2017-09-30 17:01:57 +08:00
zhiweijian 4720196015 Component/bt: fix multi-connection failed
- modify some comments
2017-09-30 16:30:43 +08:00
baohongde 27e1db508d component/bt: Fix bug of function btc_ble_set_rand_addr 2017-09-28 14:41:31 +08:00
baohongde 68958a2485 component/bt: Fix bug of memory leak of gatt open and close 2017-09-28 14:34:57 +08:00
Angus Gratton c9241b4310 bluedroid: Add continuation offset check to SDP server
Fix for CVE-2017-0785
https://android.googlesource.com/platform/system/bt/+/818cf6f%5E%21/#F0
2017-09-27 09:49:04 +10: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
Jiang Jiang Jian fff90da8d6 Merge branch 'bugfix/btdm_gatt_read_by_type_bug' into 'master'
component/bt: Fix gatt read by type response bug

See merge request !1102
2017-09-14 17:24:02 +08:00
Jiang Jiang Jian 574daad1c4 Merge branch 'feature/btdm_update_to_bluedroid7.1_l2cap' into 'master'
component/bt: Added the new feature of the l2cap layer from the bluedroid new version 7.1.1

See merge request !1087
2017-09-13 20:39:38 +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 00a7cdbb0b component/bt : support adv & scan simultaneously
1. Occupy conn[9] for adv. The max connection number of bluetooth controller decrease to 9. (Previously, it is 10)
2. modify the enum of setting BLE TX power corresponding to connection's.
3. fix libbtdm_app.a cwitch jump table
2017-09-12 16:10:30 +08:00
wangmengyang 21586063de component/bt: fix build error when GATTS is disabled in menuconfig 2017-09-08 11:34:59 +08:00
Yulong 371c55138e component/bt: Added the new feature of the l2cap layer from the bluedroid new version 7.1.1 2017-09-06 04:25:57 -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
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
Jiang Jiang Jian 258480822b Merge branch 'bugfix/btdm_config_local_privacy_func' into 'master'
component/bt: bugfix config local privacy

See merge request !1137
2017-08-24 10:48:57 +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
zhiweijian 19bf8cef1f Component/bt: bugifx config local privacy 2017-08-23 17:42:38 +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
baohongde 593fbe6d8d updata gatt read by type response bug 2017-08-22 18:11:01 +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 eebc2e2df1 component/bt: Change the btm ble security key size range. 2017-08-21 17:49:05 +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
baohongde b041c042bb component/bt: Fix gatt read by type response bug 2017-08-10 20:05:10 +08: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
Tian Hao d2872cbf2e component/bt : remove fixed queue from btu 2017-08-01 11:35:22 +08:00
zhiweijian fc05851b05 Component/bt: add set local privacy func callback 2017-07-26 17:29:10 +08:00
zhiweijian 8460f1a972 Component/bt: bugfix update connect params for gattc 2017-07-11 11:27:36 +08:00
zhiweijian ad8cce3053 Component/bt: fix bug for error length unit 2017-07-04 10:57:36 +08:00
Jiang Jiang Jian 55b3ea9ccc Merge branch 'bugfix/btdm_cherry-pick_ble_smp_bonding_issues' into 'master'
component/bt: Fixed the bug crash of disconnet BLE when close the SMP module in the menuconfig.

See merge request !941
2017-07-03 19:41:56 +08:00
wangmengyang 8959c7de20 component/bt: bugfix for AVDTP state machine during disconnection in failure to handle NULL parameter 2017-07-03 17:25:44 +08:00
Yulong 5b9a89f04d component/bt: squech the commit
component/bt: Fixed the bug crash of disconnet BLE when close the SMP module in the menuconfig.

component/bt: Removed the Excess #endid ///SMP_INCLUDED == TRUE in the l2cu_no_dynamic_ccbs function.
2017-07-03 03:07:23 -04:00
wangmengyang 6da84eff76 component/bt: fix a bug for L2CAP state machine to access lcb after it is released 2017-06-23 17:26:43 +08:00
Jiang Jiang Jian 3dd2861e2a Merge branch 'bugfix/btdm_ble_update_conn_params_issues' into 'master'
component/bt: Modifed the update connection method to fixed the bug of connectio…

See merge request !889
2017-06-22 20:50:37 +08:00
Yulong d79aeab3aa component/bt: Added the error log to the l2cble_start_conn_update func. 2017-06-22 03:53:27 -04:00
Yulong 328e93ddc4 component/bt: Change the l2cble_start_conn_update return value to BOOLEAN. 2017-06-21 02:39:36 -04:00
zhiweijian eec989f026 Component /bt: modify some log infor 2017-06-21 10:54:51 +08:00
Yulong 01705166bc component/bt: Modifed the update connection method to fixed the bug of connection parameters not correct. 2017-06-19 03:22:25 -04:00
Jiang Jiang Jian e045253883 Merge branch 'bugfix/btdm_conn_enhanecd_issue' into 'master'
component/bt: added the temp enhanced to solve the conn_interval not collect issues.

See merge request !881
2017-06-16 13:18:41 +08:00
Yulong 1739216787 component/bt: added the temp enhanced to solve the conn_interval not collect issues. 2017-06-15 10:15:49 -04:00
Jiang Jiang Jian fd12a6c706 Merge branch 'bugfix/btdm_add_set_pkt_data_length_evt_cback' into 'master'
component / bt: add set pkt data length event callback

See merge request !869
2017-06-15 19:51:22 +08:00
zhiweijian 58b65291d9 component / bt: add set pkt data length event callback 2017-06-15 16:02:03 +08:00
Jiang Jiang Jian ac5040a7c2 Merge branch 'bugfix/btdm_ll_get_remote_feature' into 'master'
component/bt: Fix can't get remote's feature bug

See merge request !871
2017-06-15 15:10:52 +08:00
Yulong 83b7144207 component/bt: Added the lmp_verion default value to 4.0. 2017-06-15 02:13:31 -04:00
island e2e5f4caae component/bt: Fix can't get remote's feature bug
- Slave send version_ind cause some Android 7.0 devices can't encrypt correctly
2017-06-14 21:56:59 +08:00
Yulong a03e5f95be component/bt: Added the judgment to check the address is public or not. 2017-06-14 09:01:29 -04:00
Jiang Jiang Jian 6b3a559ee7 Merge branch 'bugfix/btdm_master_write_service_change_ccc' into 'master'
component/bt: Fix slave initiate service change ccc discovery procedure bug

See merge request !847
2017-06-14 15:12:45 +08:00
island c5debed621 component/bt: Fix bug while writing slave's service change characteristic
- Fix slave initiate service discovery procedure
- Fix master re-discovery every time connection established
- Optimize service discovery char ccc write procedure
- Optimize esp_log_buffer function
- Modify default supervision timeout from 20s to 2s
2017-06-14 13:12:38 +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
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
zhiweijian 352cc0c7fe Component /bt: write_API_to_write_char_get_wrong_status_when_server_response_NULL 2017-06-12 15:02:21 +08: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 82b8b1db1f Merge branch 'bugfix/bt_ble_separation' into 'master'
component/bt: fix the build error when using classic BT, with GATTC, GATTS and SMP disabled

See merge request !822
2017-06-06 20:56:05 +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
wangmengyang ca4506fba9 component/bt: fix the build error when using classic BT, with GATTC, GATTS and SMP disabled 2017-06-05 21:01:58 +08:00
Yulong a42bf640bc component/bt: Change the duration type from UINT8 to UINT32 2017-06-03 01:00:10 -04:00
jack fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +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
Jiang Jiang Jian b5e2bcbb2c Merge branch 'bugfix/ble_add_adv_state_bug_#12301' into 'master'
component/bt: Fix the bug that sometimes received a ble connection & the adv wil…

…l stop, can not send adv again.

See merge request !759
2017-05-18 15:03:41 +08:00
Yulong d13c083397 component/bt:fix the bug of uild error if switch off BLE GATTS. Bug number is #12659. 2017-05-17 07:17:22 -04:00
Yulong e797cd03f0 component/bt: Fix the bug that sometimes received a ble connection & the adv will stop, can not send adv again. 2017-05-16 03:10:16 -04:00
Jiang Jiang Jian 9a64744850 Merge branch 'bugfix/ble_fix_exception_build_sr_msg_#12124' into 'master'
component/bt: fix the exception in attp_buil_sr_msg when handling gatt write bug. bug number #12124.

 fix the exception in attp_buil_sr_msg when handling gatt write bug. 

See merge request !743
2017-05-12 15:24:58 +08:00
island e9dc0115fc component/bt: Add parameter check for attp_build_sr_msg function 2017-05-12 14:30:33 +08:00
Yulong 84aeb2823a component/bt: fix the exception in attp_buil_sr_msg when handling gatt write bug. bug number #12124. 2017-05-09 03:06:29 -04:00
island da67773b02 component/bt: fix adv stop event bug and add attribute table create
error

- Fix bug that advertising stop event produced while calling start_adv function
- Modify gatt server adv data and scan rsp data raw setting
- add create attribute table error msg
- Delete redundant printf in previous commits
2017-05-08 15:44:36 +08:00
Jiang Jiang Jian 79d9d35414 Merge branch 'bugfix/gattc_not_pro_svc_chg_evt_#12079' into 'master'
component/bt:fix the bug with gatt client cant not receive the gatt server service change event.

fix the bug with gatt client cant not receive the gatt server service change event.

See merge request !726
2017-05-04 14:51:42 +08:00
Yulong c0825b35c1 component/bt:fix the bug with gatt client cant not receive the gatt server service change event. 2017-05-02 22:53:48 -04:00
Yulong 834d980e39 compoent/bt:Fixed the BT/BLE statck bug from bluedroid7.1.1 2017-04-28 05:31:57 -04:00
Jiang Jiang Jian 0759897bfb Merge branch 'bugfix/btdm_gattc_adv_bug' into 'master'
component/bt: Fix memory leakage, connection fail bugs

- Fix memory leakage while deregisting gatt app
- Fix Android connection failed problem
- Fix service_uuid_len error in adv data

See merge request !706
2017-04-27 21:13:16 +08:00
Yulong c31953a005 component/bt:Fixted the bug of HCI comment timeout error.
1. remove the SMP_INCLUDED == TRUE insite the btm_find_dev_by_handle function.
2. change the Kconfig with BT_ACL_CONNECTIONS
2017-04-26 04:23:45 -04:00
island a3717515a2 component/bt: Fix memory leakage, connection fail bugs
- Fix memory leakage while deregisting gatt app
- Fix Android connection failed problem
- Fix service_uuid_len error in adv data
2017-04-26 16:07:56 +08:00
Yulong a4d9aadeca component/bt:Merge the new master to this branch 2017-04-25 08:14:54 -04:00
Yulong 09f69fe9ea Merge branch 'master' of ssh://gitlab.espressif.cn:27227/idf/esp-idf 2017-04-25 07:58:24 -04:00
Yulong 5544f98add component/bt:separate the SMP, GATT module set the macro output the function.
1. close classic bt, can save 233k code size;
2. close smp module, can save 136k code size;
3. close gattc module, can save 24k code size;
4. close gatts module, can save 16k code size;
4. close the bluedroid stack log, can save 120k code size.
2017-04-25 04:55:29 -04:00
Yulong 45999b69d6 component/bt: Set the style to the same, output the macro in the function.
1.After the separate, can save 15k~25k ram & 240k~460k code size(depending on the menuconfig).
2017-04-24 23:46:37 -04:00
Yulong 1016ab1c2a component/bt:separate the smp_br_connect_callback from the BLE only mode 2017-04-23 00:48:23 -04:00
Yulong b5989a6b26 component/bt:Recovery the btm_establish_continue when created the acl connection 2017-04-21 02:43:35 -04:00
Angus Gratton 52c378b447 bluedroid: Fix compilation warnings related to aliasing
Merges PR #518 https://github.com/espressif/esp-idf/pull/518
2017-04-21 11:31:40 +10:00
Yulong bc807a18d1 component/bt:Finish all the separate code from BT & BLE 2017-04-20 07:18:05 -04:00
Yulong 0ddadc98a3 separate the btm layer from SMP security 2017-04-19 03:44:01 -04:00
Yulong 65ff8bd160 l2cap can send data to low layer when close the classic bt. 2017-04-18 05:42:55 -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
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 f688309b3a bt component: Fix memory leak while using gatt server
- fix memory leak while creating attribute table
- fix memory leak while deleting service
2017-04-12 14:58:45 +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 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 b2f52dd22e component/bt: add Kconfig option "CLASSIC_BT_ENABLED" 2017-03-16 22:32:27 +08:00
wangmengyang a96df34d9b component/bt: recover the BLE buffer size macros 2017-03-14 21:00:58 +08:00
wangmengyang 17696bc679 component/bt: resolve the differences with ESP-IDF master branch 2017-03-13 21:28:53 +08:00
wangmengyang 383db0dc81 Merge branch 'master' into feature/btdm_avrc 2017-03-13 16:21:41 +08:00
island 123b6f88dc component/bt: modify BLE advertising type error 2017-03-09 15:36:22 +08:00