Commit graph

27 commits

Author SHA1 Message Date
Anton Maklakov e8eb8cb2a4 bluetooth: fix missing braces and indentation 2018-08-29 14:40:28 +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
zhiweijian cb59576dd0 Component/bt: fix service change write busy 2018-05-09 20:49:26 +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
zwj d1405183a5 component/bt: fix gattc open api 2018-03-16 19:17:55 +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
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 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
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 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
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
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 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 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 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
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
Tian Hao 19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao b80325604d component/bt: add bluedroid 1st version
1. add bluedroid 1st version
2. alarm adapter
3. task semaphore lock
4. other bugs resolved
2016-09-26 21:37:39 +08:00