if (bta_gattc_mark_bg_conn(p_data->client_if, p_data->remote_bda, TRUE, FALSE)) {
/* always call open to hold a connection */
if (!GATT_Connect(p_data->client_if, p_data->remote_bda, p_data->remote_addr_type, FALSE, p_data->transport)) {
+#if (!CONFIG_BT_STACK_NO_LOG)
uint8_t *bda = (uint8_t *)p_data->remote_bda;
+#endif
status = BTA_GATT_ERROR;
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]);
*******************************************************************************/
tBTA_GATT_STATUS bta_gattc_co_cache_load(tBTA_GATTC_NV_ATTR *attr, UINT8 index)
{
+#if (!CONFIG_BT_STACK_NO_LOG)
UINT16 num_attr = 0;
+#endif
tBTA_GATT_STATUS status = BTA_GATT_ERROR;
size_t length = 0;
// Read the size of memory space required for blob
nvs_get_blob(cache_env.cache_addr[index].cache_fp, cache_key, NULL, &length);
// Read previously saved blob if available
esp_err_t err_code = nvs_get_blob(cache_env.cache_addr[index].cache_fp, cache_key, attr, &length);
+#if (!CONFIG_BT_STACK_NO_LOG)
num_attr = length / sizeof(tBTA_GATTC_NV_ATTR);
+#endif
status = (err_code == ESP_OK && length != 0) ? BTA_GATT_OK : BTA_GATT_ERROR;
APPL_TRACE_DEBUG("%s() - read=%d, status=%d, err_code = %d",
__func__, num_attr, status, err_code);
status = BTA_GATT_ERROR;
}
+#if CONFIG_BT_STACK_NO_LOG
+ (void) status;
+#endif
APPL_TRACE_DEBUG("%s() wrote hash_key = %x%x%x%x, num_attr = %d, status = %d.", __func__, hash_key[0], hash_key[1], hash_key[2], hash_key[3], num_attr, status);
}
}
if (!add) {
if (remote_bda_ptr) {
- // bdstr_t bdstr = {0};
+#if (!CONFIG_BT_STACK_NO_LOG)
char bdstr[18] = {0};
+#endif
APPL_TRACE_ERROR("%s unable to find the bg connection mask for: %s", __func__,
bdaddr_to_string((bt_bdaddr_t *)remote_bda_ptr, bdstr, sizeof(bdstr)));
}
*device_added = true;
}
+#if (!CONFIG_BT_STACK_NO_LOG)
char bd_str[20] = {0};
+#endif
BTC_TRACE_DEBUG("%s() Adding key type %d for %s", __func__,
key_type, bdaddr_to_string(&bd_addr, bd_str, sizeof(bd_str)));
BTA_DmAddBleKey(bta_bd_addr, (tBTA_LE_KEY_VALUE *)buffer, key_type);
}
+#if (CONFIG_BT_STACK_NO_LOG)
+ (void) status;
+#endif
BTC_TRACE_DEBUG("%s, authentication status = %x", __func__, status);
return;
#define CASE_RETURN_STR(const) case const: return #const;
#if (SMP_INCLUDED == TRUE)
+#if (!CONFIG_BT_STACK_NO_LOG)
static const char *interop_feature_string(const interop_feature_t feature)
{
switch (feature) {
return "UNKNOWN";
}
-
+#endif // (!CONFIG_BT_STACK_NO_LOG)
// Interface functions
bool interop_match(const interop_feature_t feature, const bt_bdaddr_t *addr)
{
for (size_t i = 0; i != db_size; ++i) {
if (feature == interop_database[i].feature &&
memcmp(addr, &interop_database[i].addr, interop_database[i].len) == 0) {
+#if (!CONFIG_BT_STACK_NO_LOG)
char bdstr[20] = {0};
+#endif
LOG_WARN("%s() Device %s is a match for interop workaround %s", __func__,
bdaddr_to_string(addr, bdstr, sizeof(bdstr)), interop_feature_string(feature));
return true;
packet->offset++;
packet->len--;
if (type == HCI_BLE_EVENT) {
+#if (!CONFIG_BT_STACK_NO_LOG)
uint8_t len = 0;
STREAM_TO_UINT8(len, stream);
+#endif
HCI_TRACE_ERROR("Workround stream corrupted during LE SCAN: pkt_len=%d ble_event_len=%d\n",
packet->len, len);
osi_free(packet);
void BTM_VendorHciEchoCmdCallback(tBTM_VSC_CMPL *p1)
{
+#if (!CONFIG_BT_STACK_NO_LOG)
if (!p1) {
return;
}
uint8_t status, echo;
STREAM_TO_UINT8 (status, p);
STREAM_TO_UINT8 (echo, p);
+#endif
BTM_TRACE_DEBUG("%s status 0x%x echo 0x%x", __func__, status, echo);
}
/* function prototype */
static int btm_pm_find_acl_ind(BD_ADDR remote_bda);
static tBTM_STATUS btm_pm_snd_md_req( UINT8 pm_id, int link_ind, tBTM_PM_PWR_MD *p_mode );
+#if (!CONFIG_BT_STACK_NO_LOG)
static const char *mode_to_string(tBTM_PM_MODE mode);
+#endif
/*
#ifdef BTM_PM_DEBUG
}
}
+#if (!CONFIG_BT_STACK_NO_LOG)
static const char *mode_to_string(tBTM_PM_MODE mode)
{
switch (mode) {
default: return "UNKNOWN";
}
}
+#endif
{
tBTM_SEC_DEV_REC *p_dev_rec;
tBTM_STATUS status;
+#if (!CONFIG_BT_STACK_NO_LOG)
UINT8 *p_features;
+#endif
UINT8 ii;
tACL_CONN *p = btm_bda_to_acl(bd_addr, transport);
BTM_TRACE_API ("btm_sec_bond_by_transport BDA: %02x:%02x:%02x:%02x:%02x:%02x\n",
}
for (ii = 0; ii <= HCI_EXT_FEATURES_PAGE_MAX; ii++) {
+#if (!CONFIG_BT_STACK_NO_LOG)
p_features = p_dev_rec->features[ii];
+#endif
BTM_TRACE_EVENT(" remote_features page[%1d] = %02x-%02x-%02x-%02x\n",
ii, p_features[0], p_features[1], p_features[2], p_features[3]);
BTM_TRACE_EVENT(" %02x-%02x-%02x-%02x\n",
memset (&app_uuid.uu.uuid128, 0x81, LEN_UUID_128);
status = GATTS_StartService(gap_cb.gatt_if, service_handle, GAP_TRANSPORT_SUPPORTED );
+#if (CONFIG_BT_STACK_NO_LOG)
+ (void) status;
+#endif
GAP_TRACE_EVENT ("GAP App gatt_if: %d s_hdl = %d start_status=%d",
gap_cb.gatt_if, service_handle, status);
}
}
+#if (CONFIG_BT_STACK_NO_LOG)
+ (void) status;
+#endif
+
GATT_TRACE_API ("GATT_SetIdleTimeout idle_tout=%d status=%d(1-OK 0-not performed)",
idle_tout, status);
}
*/
status = GATTS_StartService (gatt_cb.gatt_if, service_handle, GATTP_TRANSPORT_SUPPORTED );
+#if (CONFIG_BT_STACK_NO_LOG)
+ (void) status;
+#endif
+
GATT_TRACE_DEBUG ("gatt_profile_db_init: gatt_if=%d start status%d\n",
gatt_cb.gatt_if, status);
}
UINT8 op = p_clcb->operation, disc_type = GATT_DISC_MAX;
tGATT_DISC_CMPL_CB *p_disc_cmpl_cb = (p_clcb->p_reg) ? p_clcb->p_reg->app_cb.p_disc_cmpl_cb : NULL;
UINT16 conn_id;
+#if (!CONFIG_BT_STACK_NO_LOG)
UINT8 operation;
+#endif
GATT_TRACE_DEBUG ("gatt_end_operation status=%d op=%d subtype=%d",
status, p_clcb->operation, p_clcb->op_subtype);
osi_free(p_clcb->p_attr_buf);
}
+#if !CONFIG_BT_STACK_NO_LOG
operation = p_clcb->operation;
+#endif
+
conn_id = p_clcb->conn_id;
btu_stop_timer(&p_clcb->rsp_timer_ent);
UINT8 pkt_type;
tL2C_LCB *p_lcb;
tL2C_CCB *p_ccb = NULL;
- UINT16 l2cap_len, rcv_cid, psm;
+ UINT16 l2cap_len, rcv_cid;
+#if (!CONFIG_BT_STACK_NO_LOG)
+ UINT16 psm;
+#endif
UINT16 credit;
/* Extract the handle */
//counter_add("l2cap.ch2.rx.bytes", l2cap_len);
//counter_add("l2cap.ch2.rx.pkts", 1);
/* process_connectionless_data (p_lcb); */
+#if !CONFIG_BT_STACK_NO_LOG
STREAM_TO_UINT16 (psm, p);
+#endif
L2CAP_TRACE_DEBUG( "GOT CONNECTIONLESS DATA PSM:%d", psm ) ;
#if (L2CAP_UCD_INCLUDED == TRUE)
BOOLEAN SMP_CreateLocalSecureConnectionsOobData (tBLE_BD_ADDR *addr_to_send_to)
{
tSMP_CB *p_cb = &smp_cb;
+#if (!CONFIG_BT_STACK_NO_LOG)
UINT8 *bd_addr;
+#endif
if (addr_to_send_to == NULL) {
SMP_TRACE_ERROR ("%s addr_to_send_to is not provided", __FUNCTION__);
return FALSE;
}
+#if (!CONFIG_BT_STACK_NO_LOG)
bd_addr = addr_to_send_to->bda;
+#endif
SMP_TRACE_EVENT ("%s addr type: %u, BDA: %08x%04x, state: %u, br_state: %u",
__FUNCTION__, addr_to_send_to->type,
switch (p_cb->selected_association_model) {
case SMP_MODEL_SEC_CONN_JUSTWORKS:
case SMP_MODEL_SEC_CONN_NUM_COMP:
- if (p_cb->role == HCI_ROLE_MASTER)
+ if (p_cb->role == HCI_ROLE_MASTER) {
SMP_TRACE_WARNING ("local commitment calc on master is not expected \
for Just Works/Numeric Comparison models\n");
+ }
smp_calculate_f4(p_cb->loc_publ_key.x, p_cb->peer_publ_key.x, p_cb->rand, 0,
p_cb->commitment);
break;
switch (p_cb->selected_association_model) {
case SMP_MODEL_SEC_CONN_JUSTWORKS:
case SMP_MODEL_SEC_CONN_NUM_COMP:
- if (p_cb->role == HCI_ROLE_SLAVE)
+ if (p_cb->role == HCI_ROLE_SLAVE) {
SMP_TRACE_WARNING ("peer commitment calc on slave is not expected \
for Just Works/Numeric Comparison models\n");
+ }
smp_calculate_f4(p_cb->peer_publ_key.x, p_cb->loc_publ_key.x, p_cb->rrand, 0,
output_buf);
break;