help
This enables extra runtime asserts and host debugging
+config BT_NIMBLE_SM_SC_DEBUG_KEYS
+ bool "Use predefined public-private key pair"
+ default n
+ depends on BT_NIMBLE_SM_SC
+ help
+ If this option is enabled, SM uses predefined DH key pair as described
+ in Core Specification, Vol. 3, Part H, 2.3.5.6.1. This allows to
+ decrypt air traffic easily and thus should only be used for debugging.
+
config BT_NIMBLE_SVC_GAP_DEVICE_NAME
string "BLE GAP default device name"
depends on BT_NIMBLE_ENABLED
MYNEWT_VAL(BLE_HCI_EVT_BUF_SIZE))
];
+const static char *TAG = "NimBLE";
+
void ble_hci_trans_cfg_hs(ble_hci_trans_rx_cmd_fn *cmd_cb,
void *cmd_arg,
ble_hci_trans_rx_acl_fn *acl_cb,
assert(cmd != NULL);
*cmd = BLE_HCI_UART_H4_CMD;
len = BLE_HCI_CMD_HDR_LEN + cmd[3] + 1;
- while (!esp_vhci_host_check_send_available()) {
+ if (!esp_vhci_host_check_send_available()) {
+ ESP_LOGE(TAG, "Controller not ready to receive packets from host at this time, try again after sometime");
+ return BLE_HS_EAGAIN;
}
esp_vhci_host_send_packet(cmd, len);
data[0] = BLE_HCI_UART_H4_ACL;
len++;
- while (!esp_vhci_host_check_send_available()) {
- vTaskDelay(1000 / portTICK_PERIOD_MS);
+ if (!esp_vhci_host_check_send_available()) {
+ ESP_LOGE(TAG, "Controller not ready to receive packets from host at this time, try again after sometime");
+ return BLE_HS_EAGAIN;
}
os_mbuf_copydata(om, 0, OS_MBUF_PKTLEN(om), &data[1]);
#endif
#endif
+#ifndef MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS
+#ifdef CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS
+#define MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS (1)
+#else
+#define MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS (0)
+#endif
+#endif
+
#ifndef MYNEWT_VAL_BLE_HS_AUTO_START
#define MYNEWT_VAL_BLE_HS_AUTO_START (1)
#endif