Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71c6f7ed authored by Chris Manton's avatar Chris Manton Committed by Andre Eisenbach
Browse files

Demote, cleanup and extend observed logging

parent 61243816
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -46,7 +46,7 @@
#include "audio_a2dp_hw.h"
#include "audio_a2dp_hw.h"
#include "bt_utils.h"
#include "bt_utils.h"


#define LOG_TAG "audio_a2dp_hw"
#define LOG_TAG "bt_a2dp_hw"
#include "osi/include/log.h"
#include "osi/include/log.h"


/*****************************************************************************
/*****************************************************************************
+4 −1
Original line number Original line Diff line number Diff line
@@ -37,6 +37,9 @@
#include "bta_ar_api.h"
#include "bta_ar_api.h"
#endif
#endif


#define LOG_TAG "bt_bta_av"
#include "osi/include/log.h"

/*****************************************************************************
/*****************************************************************************
**  Constants
**  Constants
*****************************************************************************/
*****************************************************************************/
@@ -500,7 +503,7 @@ void bta_av_rc_opened(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data)
            p_scb->rc_handle = p_data->rc_conn_chg.handle;
            p_scb->rc_handle = p_data->rc_conn_chg.handle;
            APPL_TRACE_DEBUG("bta_av_rc_opened shdl:%d, srch %d", i + 1, p_scb->rc_handle);
            APPL_TRACE_DEBUG("bta_av_rc_opened shdl:%d, srch %d", i + 1, p_scb->rc_handle);
            shdl = i+1;
            shdl = i+1;
            APPL_TRACE_ERROR("use_rc:%d", p_scb->use_rc);
            LOG_INFO("%s allow incoming AVRCP connections:%d", __func__, p_scb->use_rc);
            bta_sys_stop_timer(&p_scb->timer);
            bta_sys_stop_timer(&p_scb->timer);
            disc = p_scb->hndl;
            disc = p_scb->hndl;
            break;
            break;
+8 −15
Original line number Original line Diff line number Diff line
@@ -39,6 +39,9 @@
#include "gap_api.h"    /* For GAP_BleReadPeerPrefConnParams */
#include "gap_api.h"    /* For GAP_BleReadPeerPrefConnParams */
#include <string.h>
#include <string.h>


#define LOG_TAG "bt_bta_dm"
#include "osi/include/log.h"

#if (GAP_INCLUDED == TRUE)
#if (GAP_INCLUDED == TRUE)
#include "gap_api.h"
#include "gap_api.h"
#endif
#endif
@@ -1133,7 +1136,7 @@ void bta_dm_discover (tBTA_DM_MSG *p_data)
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
#if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE
    UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->discover.num_uuid);
    UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->discover.num_uuid);
#endif
#endif
    APPL_TRACE_EVENT("bta_dm_discover services_to_search=0x%04X, sdp_search=%d",
    APPL_TRACE_EVENT("%s services_to_search=0x%04X, sdp_search=%d", __func__,
                      p_data->discover.services, p_data->discover.sdp_search);
                      p_data->discover.services, p_data->discover.sdp_search);


    /* save the search condition */
    /* save the search condition */
@@ -2023,7 +2026,7 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
                /* try to search all services by search based on L2CAP UUID */
                /* try to search all services by search based on L2CAP UUID */
                if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK )
                if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK )
                {
                {
                    APPL_TRACE_ERROR("services_to_search = %08x",bta_dm_search_cb.services_to_search);
                    LOG_INFO("%s services_to_search=%08x", __func__, bta_dm_search_cb.services_to_search);
                    if (bta_dm_search_cb.services_to_search & BTA_RES_SERVICE_MASK)
                    if (bta_dm_search_cb.services_to_search & BTA_RES_SERVICE_MASK)
                    {
                    {
                        uuid.uu.uuid16 = bta_service_id_to_uuid_lkup_tbl[0];
                        uuid.uu.uuid16 = bta_service_id_to_uuid_lkup_tbl[0];
@@ -2072,24 +2075,14 @@ static void bta_dm_find_services ( BD_ADDR bd_addr)
                if (uuid.len == 0)
                if (uuid.len == 0)
                    uuid.len = LEN_UUID_16;
                    uuid.len = LEN_UUID_16;


#if 0
                if (uuid.uu.uuid16 == UUID_SERVCLASS_PNP_INFORMATION)
                {
                    num_attrs = 2;
                }
#endif

                if (bta_dm_search_cb.service_index == BTA_USER_SERVICE_ID)
                if (bta_dm_search_cb.service_index == BTA_USER_SERVICE_ID)
                {
                {
                    memcpy(&uuid, &bta_dm_search_cb.uuid, sizeof(tSDP_UUID));
                    memcpy(&uuid, &bta_dm_search_cb.uuid, sizeof(tSDP_UUID));
                }
                }



                LOG_INFO("%s search UUID = %04x", __func__, uuid.uu.uuid16);
                APPL_TRACE_ERROR("****************search UUID = %04x***********", uuid.uu.uuid16);
                //SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, num_attrs, attr_list);
                SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, 0, NULL);
                SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, 0, NULL);



                memset(g_disc_raw_data_buf, 0, sizeof(g_disc_raw_data_buf));
                memset(g_disc_raw_data_buf, 0, sizeof(g_disc_raw_data_buf));
                bta_dm_search_cb.p_sdp_db->raw_data = g_disc_raw_data_buf;
                bta_dm_search_cb.p_sdp_db->raw_data = g_disc_raw_data_buf;


@@ -5349,7 +5342,7 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id)
        APPL_TRACE_ERROR("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
        APPL_TRACE_ERROR("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used );
    }
    }


    APPL_TRACE_ERROR("bta_dm_gatt_disc_result serivce_id len=%d ", service_id.uuid.len);
    LOG_INFO("%s service_id_uuid_len=%d ", __func__, service_id.uuid.len);
    if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE)
    if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE)
    {
    {


+5 −2
Original line number Original line Diff line number Diff line
@@ -22,7 +22,7 @@
 *  machine.
 *  machine.
 *
 *
 ******************************************************************************/
 ******************************************************************************/
#define LOG_TAG "bta_gattc_act"
#define LOG_TAG "bt_bta_gattc"


#include "bt_target.h"
#include "bt_target.h"


@@ -565,8 +565,11 @@ void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg
        /* always call open to hold a connection */
        /* always call open to hold a connection */
        if (!GATT_Connect(p_data->client_if, p_data->remote_bda, FALSE, p_data->transport))
        if (!GATT_Connect(p_data->client_if, p_data->remote_bda, FALSE, p_data->transport))
        {
        {
            uint8_t *bda = (uint8_t *)p_data->remote_bda;
            status = BTA_GATT_ERROR;
            status = BTA_GATT_ERROR;
            APPL_TRACE_ERROR("bta_gattc_init_bk_conn failed");
            APPL_TRACE_ERROR("%s unable to connect to remote bd_addr:%02x:%02x:%02x:%02x:%02x:%02x",
                __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);

        }
        }
        else
        else
        {
        {
+7 −5
Original line number Original line Diff line number Diff line
@@ -976,7 +976,7 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,


    if (!p_char_id)
    if (!p_char_id)
    {
    {
        APPL_TRACE_ERROR("deregistration failed, unknow char id");
        APPL_TRACE_ERROR("%s deregistration failed, unknown char id", __func__);
        return status;
        return status;
    }
    }


@@ -988,7 +988,8 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
                !memcmp(p_clreg->notif_reg[i].remote_bda, bda, BD_ADDR_LEN) &&
                !memcmp(p_clreg->notif_reg[i].remote_bda, bda, BD_ADDR_LEN) &&
                bta_gattc_charid_compare(&p_clreg->notif_reg[i].char_id, p_char_id))
                bta_gattc_charid_compare(&p_clreg->notif_reg[i].char_id, p_char_id))
            {
            {
                APPL_TRACE_DEBUG("Deregistered.");
                APPL_TRACE_DEBUG("%s deregistered bd_addr:%02x:%02x:%02x:%02x:%02x:%02x",
                    __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
                memset(&p_clreg->notif_reg[i], 0, sizeof(tBTA_GATTC_NOTIF_REG));
                memset(&p_clreg->notif_reg[i], 0, sizeof(tBTA_GATTC_NOTIF_REG));
                status = BTA_GATT_OK;
                status = BTA_GATT_OK;
                break;
                break;
@@ -997,13 +998,14 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
        if (i == BTA_GATTC_NOTIF_REG_MAX)
        if (i == BTA_GATTC_NOTIF_REG_MAX)
        {
        {
            status = BTA_GATT_ERROR;
            status = BTA_GATT_ERROR;

            APPL_TRACE_ERROR("%s registration not found bd_addr:%02x:%02x:%02x:%02x:%02x:%02x",
            APPL_TRACE_ERROR("registration not found");
                __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
        }
        }
    }
    }
    else
    else
    {
    {
        APPL_TRACE_ERROR("Client_if: %d Not Registered", client_if);
        APPL_TRACE_ERROR("%s client_if: %d not registered bd_addr:%02x:%02x:%02x:%02x:%02x:%02x",
            __func__, client_if, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
    }
    }


    return status;
    return status;
Loading