diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index 6828b28c8..65aa1daed 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -831,7 +831,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg) { int rc; -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t len = OS_MBUF_PKTLEN(om); if (len + 1 <= BLE_HS_HCI_LOG_BUF_SIZE) { uint8_t data[BLE_HS_HCI_LOG_BUF_SIZE]; @@ -867,7 +867,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg) int ble_hs_tx_data(struct os_mbuf *om) { -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t pkt_len = OS_MBUF_PKTLEN(om); if (pkt_len + 1 <= BLE_HS_HCI_LOG_BUF_SIZE) { uint8_t data[BLE_HS_HCI_LOG_BUF_SIZE]; diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 8aff43310..d9926780e 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -700,7 +700,7 @@ ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg) BLE_HS_DBG_ASSERT(hci_ev != NULL); -#if ((BT_HCI_LOG_INCLUDED == TRUE)) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t len = hci_ev[1] + 3; if (host_recv_adv_packet(hci_ev)) { bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, &hci_ev[1], len - 2); diff --git a/nimble/host/src/ble_hs_hci_cmd.c b/nimble/host/src/ble_hs_hci_cmd.c index e92ca0408..a9487eaa6 100644 --- a/nimble/host/src/ble_hs_hci_cmd.c +++ b/nimble/host/src/ble_hs_hci_cmd.c @@ -91,7 +91,7 @@ ble_hs_hci_cmd_send(uint16_t opcode, uint8_t len, const void *cmddata) buf--; #endif -#if ((BT_HCI_LOG_INCLUDED == TRUE)) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint8_t *data; #if !(SOC_ESP_NIMBLE_CONTROLLER) && CONFIG_BT_CONTROLLER_ENABLED data = (uint8_t *)buf + 1;