3#if CONFIG_BT_BLE_ENABLED
18#include <esp_gap_ble_api.h>
21 esp_ble_gatts_cb_param_t *param) {
23 "Connection ID: %d, remote: "
24 "%02x:%02x:%02x:%02x:%02x:%02x:",
25 param->connect.conn_id, param->connect.remote_bda[0],
26 param->connect.remote_bda[1], param->connect.remote_bda[2],
27 param->connect.remote_bda[3], param->connect.remote_bda[4],
28 param->connect.remote_bda[5]);
41 esp_ble_conn_update_params_t conn_params;
42 memcpy(conn_params.bda, param->connect.remote_bda,
sizeof(esp_bd_addr_t));
44 &conn_params.max_int);
45 conn_params.latency = 0;
46 conn_params.timeout = 400;
47 esp_ble_gap_update_conn_params(&conn_params);
51 esp_ble_gatts_cb_param_t *param) {
52 ESP_LOGI(
"MIDIBLE",
"Disconnect reason: %d", param->disconnect.reason);
Advertising the MIDI service for Bluetooth Low Energy.
void advertising_get_connection_interval(uint16_t *itvl_min, uint16_t *itvl_max)
Get the connection interval range from the advertising data.
void advertising_start(void)
Start advertising, after already being configured.
void midi_ble_instance_handle_disconnect(uint16_t conn_handle)
void midi_ble_instance_handle_connect(uint16_t conn_handle)
Declarations of internal functions for the MIDI over BLE system, used in the midi-*....
void midi_handle_disconnect_event(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)
void midi_handle_connect_event(esp_gatt_if_t gatts_if, esp_ble_gatts_cb_param_t *param)