3#if CONFIG_BT_BLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED
17#include <esp32-hal-bt.h>
18#include <esp_bt_main.h>
19#include <esp_gap_ble_api.h>
20#include <esp_gatt_common_api.h>
38 ESP_LOGE(
"MIDIBLE",
"Init bluetooth failed: %s",
47 ESP_LOGE(
"MIDIBLE",
"Enable bluetooth failed: %s",
79 ESP_LOGE(
"MIDIBLE",
"GATTS app register error: %s",
99 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_AUTHEN_REQ_MODE: %s",
107 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_IOCAP_MODE: %s",
117 "Failed to set ESP_BLE_SM_ONLY_ACCEPT_SPECIFIED_SEC_AUTH: %s",
125 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_MAX_KEY_SIZE: %s",
133 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_OOB_SUPPORT: %s",
141 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_SET_INIT_KEY: %s",
149 ESP_LOGE(
"MIDIBLE",
"Failed to set ESP_BLE_SM_SET_RSP_KEY: %s",
160 assert(!
"Not implemented");
Handlers for Bluetooth and BLE events.
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
void gatts_event_handler(esp_gatts_cb_event_t event, esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
Array< T, N > copyAs(const Array< U, N > &src)
Copy an Array to an Array of a different type.
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
uint16_t midi_get_app_id(void)
bool midi_deinit()
Cleanup the MIDI BLE application and de-initialize the Bluetooth stack.
bool midi_init()
Initialize the Bluetooth stack and register the MIDI BLE application with the Bluedroid driver.
void set_midi_ble_name(const char *name)
Set the name of the BLE device. Must be set before calling midi_init().