-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
With the current setup, I cannot trigger a BLE disconnect to trigger pairing mode, or swap to another, already paired device.
Use case is an NRF52840 that is sealed up in a case and not easily accessible. Ideally, we should be able to trigger either a swap or disconnect/pairing programmatically, or even via a particular keycode.
Can you present the underlying Bluefruit.connection for this.
Similar code using Bluefruit library directly:
uint16_t connectionHandle = 0;
BLEConnection* connection = NULL;
connectionHandle = Bluefruit.connHandle();
connection = Bluefruit.Connection(connectionHandle);
delay(2000);
connection->disconnect();
void bleDisconnectAll(){
for (int i = 0; i < MAXIMUM_SWAP_CONNECTIONS; ++i) {
if (conn_handles[i] != INVALID_CONN_HANDLE) {
if (Bluefruit.connected(conn_handles[i]))Bluefruit.disconnect(conn_handles[i]) ;
}
}
}
Metadata
Metadata
Assignees
Labels
No labels