Commit Graph

91 Commits

Author SHA1 Message Date
liqigan d61459e692 modify read rssi related function names
Closes https://github.com/espressif/esp-idf/issues/5660
2020-10-20 12:31:50 +00:00
Prasad Alatkar 9c87165bc8 BT/Bluedroid : Add support to set min encryption key requirement (Backport v3.3)
- Backport(v3.3) of IDF MR!6122
- Modifies `smp_utils.c` to add check on encryption key size received from
  peer.
- Modifies `esp_ble_gap_set_security_param` API to add minimum encryption key
  size requirement.
2019-09-29 16:06:27 +08:00
zhiweijian a1546e0714 Component/bt: add BLE adv report flow control 2019-03-13 14:58:32 +08:00
zhiweijian dd3d89db49 Component/bt: add update duplicate scan exceptional list APIs 2018-11-23 16:46:17 +08:00
Jiang Jiang Jian 69c9e050b0 Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params' into 'master'
Component/bt: add check peer addr type in set adv params

See merge request idf/esp-idf!3732
2018-11-20 20:02:13 +08:00
zhiweijian 3c7819eaf2 Component/bt: add check peer addr type in set adv params 2018-11-19 17:04:48 +08:00
baohongde ac5a3443a4 components/bt: Some errors in comment 2018-11-16 11:27:22 +08:00
zhiweijian 4e81705ca2 Component/bt: support OOB in SMP 2018-10-25 07:09:59 +00:00
zhiweijian 3050e55801 Component/bt: add only accept sepecified Authentication 2018-09-29 21:23:55 +08:00
zwj fa00e6d4f7 component/bt: add clear rand address API 2018-09-17 20:09:03 +08:00
Tian Hao b9382b29fa fix TX power value in ble adv data is incorrect
refence to https://github.com/espressif/esp-idf/issues/2284
Before fixing, the tx power in adv data is always 0xeb(-21dbm).

restriction:
    If change BLE advertising TX power, please call esp_ble_gap_config_adv_data()
    after BLE adv TX power changed.

    Later, will implement set BLE advertising TX power via HCI, then the
    TX power value in adv data can be update automatically after BLE adv
    TX power changed.
2018-09-12 20:23:45 +08:00
zhiweijian d12982dc6e Component/bt: add set default passkey function 2018-09-07 10:55:44 +08:00
zhiweijian 658668b386 Component/bt: fix hci_hal_env.rx_q and xHciH4Queue blocking when scanning 2018-08-01 15:06:56 +08:00
Jiang Jiang Jian 53ce5fd106 Merge branch 'bugfix/btdm_bt_remove_device_disconnect' into 'master'
component/bt: Fix bug of BT and BLE remove bond device

See merge request idf/esp-idf!2562
2018-06-29 19:29:57 +08:00
baohongde 29b7d4e916 component/bt: Fix bug of BT and BLE remove bond device
1. esp_ble_remove_bond_device will only remove BLE bond key and disconnect BLE device.
2. esp_bt_gap_remove_bond_device  will only remove BT bond key and disconnect BT device.
2018-06-22 11:54:40 +08:00
Tian Hao e3d3ed5a06 bt : fix read rssi conflict when in dual mode 2018-06-22 11:16:16 +08:00
baohongde 4c8d9278b5 component/bt: Fix mem leak of esp_ble_gap_set_security_param 2018-05-28 17:43:53 +08:00
zhiweijian 340ad5c430 Component/bt: fix scan duplicate 2018-05-21 15:23:15 +08:00
Hrishikesh Dhayagude da6cb6c741 components/bt: Improve the Bluetooth debug messaging scheme
As of now, when Bluetooth debugs are enabled, all the messages are
mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor
shows all logs in red color which might lead to missing the actual
errors

This patch maps the Bluetooth messages to appropriate ESP_LOG* messages
and improves readability.

Also, make the BT trace level be configurable in menuconfig, so that
each layer of bt trace can be enabled/disabled.

Finally, add debug log control for BTC, OSI, BLUFI and clear up
Bluetooth debug logs.

So, with this the method of enabling Bluetooth logs is as follows:
1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable
-> BT DEBUG LOG LEVEL -> set trace level for every layer of BT

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-05-14 20:45:05 +08:00
Tian Hao 8646913cbf component/bt : add class bt read RSSI delta (golden range) 2018-04-27 14:33:47 +08: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 99872beb6a Component/bt: add set gap icon API 2018-03-30 09:21:53 +00:00
zhiweijian aa236809ad Component/bt: fix no set rand add callback event 2018-03-29 20:17:14 +08:00
Jiang Jiang Jian 702b46108c 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
2018-03-08 20:18:30 +08:00
baohongde 569b9d592e component/bt: remove some error logs which are not error 2018-03-05 19:22:21 +08:00
zhiweijian 4056878c69 Component/bt: fix set error params and add callback in adv params 2018-02-12 16:34:30 +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 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 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
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
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 c75da555af Component/bt: fix set scan params and start scan action 2017-09-30 17:01:57 +08:00
baohongde b59708ca87 component/bt: Fix bug of function btc_ble_set_rand_addr 2017-09-29 11:46:08 +08: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
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
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
Deomid Ryabkov 3e6c515d5b Using a 128-bit UUID is not an error
Merges https://github.com/espressif/esp-idf/pull/713
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
Jiang Jiang Jian 8b4229fcd6 Merge branch 'bugfix/btdm_fix_set_rand_addr_func' into 'master'
component/bt: fixbug_set_rand_addr()

See merge request !1123
2017-08-24 10:48:20 +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
zhiweijian 974cff4773 Component/bt: fixbug_set_rand_addr()
- The two most significant bits of the address shall be equal to 1
- All bits of the random part of the address shall not be equal to 1
- All bits of the random part of the address shall not be equal to 0
2017-08-22 14:25:10 +08:00
Yulong 71d35c7770 component/bt: Change the remove section error. 2017-08-21 23:28:45 -04: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
zhiweijian fc05851b05 Component/bt: add set local privacy func callback 2017-07-26 17:29:10 +08:00
zhiweijian 58b65291d9 component / bt: add set pkt data length event callback 2017-06-15 16:02:03 +08:00
Yulong e07482504a component/bt: Change the btc ESP_BLE_SM_SET_RSP_KEK to ESP_BLE_SM_SET_RSP_KEY 2017-06-09 04:54:56 -04: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