-
Notifications
You must be signed in to change notification settings - Fork 231
Closed as not planned
Closed as not planned
Copy link
Labels
conclusion: off topicOff topic for this repositoryOff topic for this repositorytype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project
Description
I used BLEDevice.h to turn on Bluetooth. My development board is esp32s3. Then I connected this Bluetooth with an Android 10 machine. At the moment of connection, Arduino reported an error. How can I solve it?

E (23013) BT_SMP: smp_calculate_link_key_from_long_term_key failed to update link_key. Sec Mode = 2, sm4 = 0x00
E (23013) BT_SMP: smp_derive_link_key_from_long_term_key failed
E (23019) BT_BTM: btm_proc_smp_cback received for unknown device
E (23236) BT_BTM: BTM_GetSecurityFlags false
E (23326) BT_BTM: BTM_GetSecurityFlags false
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
// 为BLE服务和特征定义UUID
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361b26a8"
void setup() {
Serial.begin(115200);
// 初始化BLE并设置设备名称
BLEDevice::init("ESP32_BLE_Server");
// 创建BLE服务器
BLEServer *pServer = BLEDevice::createServer();
// 创建BLE服务
BLEService *pService = pServer->createService(SERVICE_UUID);
// 创建BLE特征
BLECharacteristic *pCharacteristic = pService->createCharacteristic(
CHARACTERISTIC_UUID,
BLECharacteristic::PROPERTY_READ |
BLECharacteristic::PROPERTY_WRITE
);
// 启动服务
pService->start();
// 启动广告
pServer->getAdvertising()->start();
Serial.println("BLE服务器已准备就绪!");
}
void loop() {
// 服务器代码在这里
}Metadata
Metadata
Assignees
Labels
conclusion: off topicOff topic for this repositoryOff topic for this repositorytype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project