Commit graph

75 commits

Author SHA1 Message Date
Anton Maklakov
0d1285ebcf bluetooth: fix indentation warning 2018-09-20 18:53:15 +08:00
zhiweijian
469b8c7e8e component/bt: optimize bluetooth memory debug 2018-09-10 09:19:19 +00:00
Anton Maklakov
8c040e749f bluetooth: fix format overflow warnings 2018-08-29 14:40:28 +08:00
Anton Maklakov
e8eb8cb2a4 bluetooth: fix missing braces and indentation 2018-08-29 14:40:28 +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
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
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
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
Roland Dobai
744c2dcdd9 Resolve problems found by enabling -Wwrite-strings compilation flag 2018-04-10 08:53:43 +02:00
baohongde
e1b419fb6d component/bt: Fix xQueueGenericSend assertion 2018-03-28 20:25:57 +08:00
Jiang Jiang Jian
0f7d9cf7d3 Merge branch 'bugfix/btdm_a2dp_task_stack_size' into 'master'
component/bt: make A2DP source and sink task size configurable through menuconfig

See merge request idf/esp-idf!1825
2018-02-01 10:58:40 +08:00
wangmengyang
00db39ee1b component/bt: make A2DP source and sink task size configurable through menuconfig
1. use different set of parameters for A2DP source/sink tasks
2. make the task stack size configurable through menuconfig
2018-01-30 14:26:53 +08:00
Jiang Jiang Jian
5b1f869880 Merge branch 'feature/btdm_bluedroid_env_dynomic_malloc_enable' into 'master'
This MR added the bluedroid env  variable can dynamic malloc and BT variable use psram malloc supported

See merge request !1698
2018-01-26 10:06:43 +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
zhiweijian
1861d6e137 Component/bt: fix bonded device list error after reboot 2018-01-17 19:54:49 +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
zhiweijian
763406b4cc Component/bt: fix memory leak in SMP 2017-12-20 10:30:31 +08:00
wangmengyang
53273172fe component/bt: modify the implementation and interface of osi_alarm module
1. use esp_timer instead of FreeRTOS timer to implement osi_alarm in bluedroid
2. Remove two APIs: osi_alarm_now() and osi_alarm_time_diff() and modify the hci layer logic that use them
3. Implement osi_alarm_get_remaining_ms()
4. Move the definition of struct alarm_t in source file "alarm.c"
5. Add definition of module error code
2017-11-10 11:53:55 +08:00
Tian Hao
85eb5d4374 component/bt : fix bug of sw interrupt cause to run btdm to different cpu core.
1. add sw interrupt cause osi to controller.
2. modify the kconfig to improve the option view.
3. add option of the cpu core which bluedroid run.
4. add option of the cpu core which bluetooth controller run.
2017-10-24 16:13:58 +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
Yulong
71d35c7770 component/bt: Change the remove section error. 2017-08-21 23:28:45 -04:00
Tian Hao
d2872cbf2e component/bt : remove fixed queue from btu 2017-08-01 11:35:22 +08:00
Ivan Grokhotkov
979fce0df5 bt: call nvs_flash_init in examples, show error if NVS is not initialized
NVS is used to store PHY calibration data, WiFi configuration, and BT
configuration. Previously BT examples did not call nvs_flash_init,
relying on the fact that it is called during PHY init. However PHY init
did not handle possible NVS initialization errors.

This change moves PHY init procedure into the application, and adds
diagnostic messages to BT config management routines if NVS is not
initialized.
2017-07-17 21:29:50 +08:00
Yulong
574d0cf846 component/bt: Fixed a very important bug of the SMP security module when use SMP to connected after bonding. 2017-06-26 05:02:57 -04: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
Yulong
2a759a9864 component/bt: Change the osi_mem_dbg_init to the esp_bluedroid_init function. 2017-06-13 08:52:26 -04: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
3453824bf2 component/bt: component/bt: Check own address and filter policy for validity. 2017-05-05 04:31:24 -04:00
wangmengyang
4f3b391674 component/bt: transfer bluedroid timer events to be handled by BTC task 2017-04-14 18:49:30 +08: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
ccfe4fefeb component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-10 16:12:21 +08:00
Ivan Grokhotkov
85e709705b Merge branch 'bugfix/btdm_task_priority' into 'master'
component/bt : modify bluetooth task priority

modify bluetooth task priority to lower than IPC task priority.

See merge request !631
2017-04-07 14:56:31 +08:00
wangmengyang
b5ea92a26e component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-06 16:56:18 +08:00
wangmengyang
dbd4e0522e Merge branch 'master' into feature/btdm_avrc 2017-04-06 14:59:58 +08:00
Tian Hao
e384c7c014 component/bt : modify alarm APIs to be safely accessible from multiple tasks 2017-04-05 17:34:26 +08:00
Tian Hao
ecb75b69fd component/bt : modify bluetooth task priority 2017-04-01 17:17:57 +08:00
wangmengyang
2a5d01a930 component/bt: clean up the A2DP sink example 2017-03-18 16:02:54 +08:00
wangmengyang
66fd3b9768 component/bt: add conditional compilation direvatives to control the source code building of SBC codec 2017-03-17 15:57:30 +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
wangmengyang
870389b3ba component/bt: optimize stack size of Bluetooth Tasks and make them be configurable according to the CONFIG_NEWLIB_NANO_FORMAT option 2017-03-06 23:09:42 +08:00
wangmengyang
2c87e84b0a component/bt: bluetooth storage module clean up and bug fix.
1. clean up bluetooth storage log prints;
2. reduce maximum link key storage size
3. modify so that the link key information of the latest connected device is stored at first
2017-01-20 16:46:10 +08:00
wangmengyang
0f711963d7 component/bt: implement non-volatile memory access module for link key storage
1. btif_storage module is ported
2. update controller library that moves functions called in ISRs to IRAM
2017-01-19 17:11:01 +08:00
wangmengyang
49b68c38fa Merge branch 'master' into feature/btdm_avrc
# Conflicts:
#	components/bt/bluedroid/hci/packet_fragmenter.c
#	components/bt/bluedroid/stack/include/gatt_api.h
2017-01-17 10:36:26 +08:00
Angus Gratton
06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
wangmengyang
d7c1c0b1f6 component/bt: fix API typos, add license headers and fix some log messages 2016-12-27 13:48:07 +08:00