You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I encountered a similar issue. When pairing my service device using an Android/win device, a “Pairing Request” window pops up. However, when using the NimBLE library to connect, there is no “Pairing Request” window that pops up, even though I have enabled secure pairing.
// Connect to the specified server address and set up automatic reconnection
pClient->connect(NimBLEAddress(serverAddress), true);
NimBLEDevice::setSecurityAuth(true, true, true);
NimBLEDevice::setSecurityIOCap(BLE_HS_IO_KEYBOARD_DISPLAY);
pClient->setConnectTimeout(30);
if (pClient->secureConnection())
{
Serial.println("Pairing successful"); // Pairing request success message
}
else
{
Serial.println("Pairing failed");
uint32_t err = pClient->getLastError();
Serial.print("Error code: ");
Serial.println(err, HEX); // Print error code
}
The serial terminal outputs “Pairing failed” with an error code ‘D’. The service device also does not show a “Pairing Request” window.
I'm transitioning my BLE implementation from the BLEDevice library to the NimBLE library to optimize flash and RAM usage. Here's the issue I'm facing:
Previous Library (BLEDevice):
client->connect(remote_address);
to connect to a remote device based on its Bluetooth address (remote_address
).NimBLE Implementation:
desc->peer_ota_addr
anddesc->peer_id_addr
as the client address inclient->connect(remote_address);
.Current Issues:
Looking for guidance on how to resolve these issues in NimBLE, especially for establishing pairing and secure client-server connections.
The text was updated successfully, but these errors were encountered: