]> granicus.if.org Git - esp-idf/commit
components/bt: Improve the Bluetooth debug messaging scheme
authorHrishikesh Dhayagude <hrishi@espressif.com>
Wed, 25 Apr 2018 02:11:06 +0000 (07:41 +0530)
committerisland <island@espressif.com>
Mon, 14 May 2018 12:45:05 +0000 (20:45 +0800)
commitda6cb6c741ba4297b3112b2d3b871e8c7f0c2e11
tree70f7eaf71c1b7117a0d9c81f27b7220b6b86e938
parentd4276efed7a271304f4bb0baecb16157b434206e
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>
58 files changed:
components/bt/Kconfig
components/bt/bluedroid/bta/dm/bta_dm_act.c
components/bt/bluedroid/bta/dm/bta_dm_pm.c
components/bt/bluedroid/bta/gatt/bta_gattc_act.c
components/bt/bluedroid/bta/gatt/bta_gattc_cache.c
components/bt/bluedroid/bta/gatt/bta_gattc_utils.c
components/bt/bluedroid/bta/hh/bta_hh_api.c
components/bt/bluedroid/bta/hh/bta_hh_le.c
components/bt/bluedroid/bta/sys/bta_sys_main.c
components/bt/bluedroid/btc/core/btc_alarm.c
components/bt/bluedroid/btc/core/btc_ble_storage.c
components/bt/bluedroid/btc/core/btc_config.c
components/bt/bluedroid/btc/core/btc_dev.c
components/bt/bluedroid/btc/core/btc_dm.c
components/bt/bluedroid/btc/core/btc_main.c
components/bt/bluedroid/btc/core/btc_profile_queue.c
components/bt/bluedroid/btc/core/btc_sm.c
components/bt/bluedroid/btc/core/btc_storage.c
components/bt/bluedroid/btc/core/btc_task.c
components/bt/bluedroid/btc/profile/esp/ble_button/button_pro.c
components/bt/bluedroid/btc/profile/esp/blufi/blufi_prf.c
components/bt/bluedroid/btc/profile/esp/blufi/blufi_protocol.c
components/bt/bluedroid/btc/profile/esp/wechat_AirSync/wx_airsync_prf.c
components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c
components/bt/bluedroid/btc/profile/std/a2dp/btc_av.c
components/bt/bluedroid/btc/profile/std/avrc/btc_avrc.c
components/bt/bluedroid/btc/profile/std/battery/battery_prf.c
components/bt/bluedroid/btc/profile/std/gap/btc_gap_ble.c
components/bt/bluedroid/btc/profile/std/gap/btc_gap_bt.c
components/bt/bluedroid/btc/profile/std/gatt/btc_gatt_common.c
components/bt/bluedroid/btc/profile/std/gatt/btc_gatt_util.c
components/bt/bluedroid/btc/profile/std/gatt/btc_gattc.c
components/bt/bluedroid/btc/profile/std/gatt/btc_gatts.c
components/bt/bluedroid/btc/profile/std/hid_le/hid_le_prf.c
components/bt/bluedroid/btc/profile/std/spp/btc_spp.c
components/bt/bluedroid/common/include/common/bt_trace.h
components/bt/bluedroid/hci/hci_hal_h4.c
components/bt/bluedroid/hci/hci_layer.c
components/bt/bluedroid/hci/hci_packet_parser.c
components/bt/bluedroid/hci/packet_fragmenter.c
components/bt/bluedroid/main/bte_main.c
components/bt/bluedroid/osi/alarm.c
components/bt/bluedroid/osi/allocator.c
components/bt/bluedroid/osi/buffer.c
components/bt/bluedroid/osi/config.c
components/bt/bluedroid/osi/future.c
components/bt/bluedroid/stack/btm/btm_ble_gap.c
components/bt/bluedroid/stack/btm/btm_pm.c
components/bt/bluedroid/stack/btm/btm_sec.c
components/bt/bluedroid/stack/btu/btu_hcif.c
components/bt/bluedroid/stack/btu/btu_task.c
components/bt/bluedroid/stack/gatt/gatt_sr.c
components/bt/bluedroid/stack/hcic/hciblecmds.c
components/bt/bluedroid/stack/l2cap/l2c_api.c
components/bt/bluedroid/stack/l2cap/l2c_main.c
components/bt/bluedroid/stack/l2cap/l2cap_client.c
components/bt/bluedroid/stack/rfcomm/port_api.c
components/bt/bluedroid/stack/sdp/sdp_api.c