From 0586dddf04085e3ca996f0d69604a499d9acc463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Tanr=C4=B1verdi?= <78870676+5mustafa@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:17:53 +0300 Subject: [PATCH 1/3] Update BleKeyboard.cpp --- BleKeyboard.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BleKeyboard.cpp b/BleKeyboard.cpp index 48a8930..8c7013f 100644 --- a/BleKeyboard.cpp +++ b/BleKeyboard.cpp @@ -127,7 +127,13 @@ void BleKeyboard::begin(void) #else BLESecurity* pSecurity = new BLESecurity(); - pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); + if (CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3) + { + pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND); + } + else{ + pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); + } #endif // USE_NIMBLE From 850727a8d51aff8e89cd5524308877b7b46423df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Tanr=C4=B1verdi?= <78870676+5mustafa@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:43:58 +0300 Subject: [PATCH 2/3] Update BleKeyboard.cpp --- BleKeyboard.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/BleKeyboard.cpp b/BleKeyboard.cpp index 8c7013f..f2be3b5 100644 --- a/BleKeyboard.cpp +++ b/BleKeyboard.cpp @@ -127,13 +127,14 @@ void BleKeyboard::begin(void) #else BLESecurity* pSecurity = new BLESecurity(); - if (CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3) - { - pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND); - } - else{ - pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); - } + + //eğer kart esp32s3 veya esp32c3 ise bu kod bloğu çalışır +#if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) + pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND); +#else + pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_SC_MITM_BOND); +#endif + #endif // USE_NIMBLE From 9496d5954369ab72d45ee9d70a99ce3187021e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Tanr=C4=B1verdi?= <78870676+5mustafa@users.noreply.github.com> Date: Wed, 7 Aug 2024 17:01:38 +0000 Subject: [PATCH 3/3] Update BleKeyboard.cpp --- BleKeyboard.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BleKeyboard.cpp b/BleKeyboard.cpp index f2be3b5..f217702 100644 --- a/BleKeyboard.cpp +++ b/BleKeyboard.cpp @@ -128,11 +128,10 @@ void BleKeyboard::begin(void) BLESecurity* pSecurity = new BLESecurity(); - //eğer kart esp32s3 veya esp32c3 ise bu kod bloğu çalışır #if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3) pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND); #else - pSecurity->setAuthenticationMode(ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_SC_MITM_BOND); + pSecurity->setAuthenticationMode(ESP_LE_AUTH_REQ_SC_MITM_BOND); #endif