From 25a78fa7f1fba6eb3e307dd5457af6202f26e2c7 Mon Sep 17 00:00:00 2001 From: RobertoHE Date: Tue, 29 Nov 2022 09:05:26 +0100 Subject: [PATCH] Added all configurations options to example Added all configurations options --- .../CustomerBufferSize/CustomerBufferSize.ino | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/examples/CustomerBufferSize/CustomerBufferSize.ino b/examples/CustomerBufferSize/CustomerBufferSize.ino index 864e456..33c41c1 100644 --- a/examples/CustomerBufferSize/CustomerBufferSize.ino +++ b/examples/CustomerBufferSize/CustomerBufferSize.ino @@ -1,7 +1,56 @@ #include +static uint32_t customPasskeyRequest() +{ + // FILL WITH YOUR CUSTOM AUTH METHOD CODE or PASSKEY + // FOR EXAMPLE: + uint32_t passkey = 123456; + + // Serial.println("Client Passkey Request"); + + /** return the passkey to send to the server */ + return passkey; +}; + struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings { + //See all options and them explanation in the library. + + /* + ##### BLE DEVICE NAME ##### + */ + //static constexpr char *name = "BleMidiClient"; + /* + ###### TX POWER ##### + */ + //static const esp_power_level_t clientTXPwr = ESP_PWR_LVL_P9; + /* + ###### SECURITY ##### + */ + //static const uint8_t clientSecurityCapabilities = BLE_HS_IO_NO_INPUT_OUTPUT; + //static const bool clientBond = true; + //static const bool clientMITM = false; + //static const bool clientPair = true; + //static constexpr PasskeyRequestCallback userOnPassKeyRequest = customPasskeyRequest; + /* + ###### BLE COMMUNICATION PARAMS ###### + */ + //static const uint16_t commMinInterval = 6; // 7.5ms + //static const uint16_t commMaxInterval = 35; // 40ms + //static const uint16_t commLatency = 0; // + //static const uint16_t commTimeOut = 200; // 2000ms + /* + ###### BLE FORCE NEW CONNECTION ###### + */ + //static const bool forceNewConnection = false; + /* + ###### BLE SUBSCRIPTION: NOTIFICATION & RESPONSE ###### + */ + //static const bool notification = true; + //static const bool response = true; + /* + ###### AND THE OTHER SETTINGS OF MIDI LIBRARY ###### static const size_t MaxBufferSize = 16; + }; #include