Skip to content

Commit 25a78fa

Browse files
authored
Added all configurations options to example
Added all configurations options
1 parent 06a1b8f commit 25a78fa

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

examples/CustomerBufferSize/CustomerBufferSize.ino

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,56 @@
11
#include <BLEMIDI_Transport.h>
22

3+
static uint32_t customPasskeyRequest()
4+
{
5+
// FILL WITH YOUR CUSTOM AUTH METHOD CODE or PASSKEY
6+
// FOR EXAMPLE:
7+
uint32_t passkey = 123456;
8+
9+
// Serial.println("Client Passkey Request");
10+
11+
/** return the passkey to send to the server */
12+
return passkey;
13+
};
14+
315
struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings {
16+
//See all options and them explanation in the library.
17+
18+
/*
19+
##### BLE DEVICE NAME #####
20+
*/
21+
//static constexpr char *name = "BleMidiClient";
22+
/*
23+
###### TX POWER #####
24+
*/
25+
//static const esp_power_level_t clientTXPwr = ESP_PWR_LVL_P9;
26+
/*
27+
###### SECURITY #####
28+
*/
29+
//static const uint8_t clientSecurityCapabilities = BLE_HS_IO_NO_INPUT_OUTPUT;
30+
//static const bool clientBond = true;
31+
//static const bool clientMITM = false;
32+
//static const bool clientPair = true;
33+
//static constexpr PasskeyRequestCallback userOnPassKeyRequest = customPasskeyRequest;
34+
/*
35+
###### BLE COMMUNICATION PARAMS ######
36+
*/
37+
//static const uint16_t commMinInterval = 6; // 7.5ms
38+
//static const uint16_t commMaxInterval = 35; // 40ms
39+
//static const uint16_t commLatency = 0; //
40+
//static const uint16_t commTimeOut = 200; // 2000ms
41+
/*
42+
###### BLE FORCE NEW CONNECTION ######
43+
*/
44+
//static const bool forceNewConnection = false;
45+
/*
46+
###### BLE SUBSCRIPTION: NOTIFICATION & RESPONSE ######
47+
*/
48+
//static const bool notification = true;
49+
//static const bool response = true;
50+
/*
51+
###### AND THE OTHER SETTINGS OF MIDI LIBRARY ######
452
static const size_t MaxBufferSize = 16;
53+
554
};
655
756
#include <hardware/BLEMIDI_ESP32_NimBLE.h>

0 commit comments

Comments
 (0)