Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Disconnecting devices..
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Disconnecting devices..

by willwade on Fri Feb 14, 2020 1:16 pm

Im using a nrf52840 express as a HID Keyboard. I want to drop currently connected devices..

I'm trying to do this using

Code: Select all | TOGGLE FULL SIZE

bluefruit.h

void changeAdvertisementName (char *cname) {
  Serial.println("Disconnecting clients...");
  BLEConnection* conn = Bluefruit.Connection(DEFAULT_CONN_HANDLE);
  conn->disconnect();
  Serial.println("Setting name..");
  Bluefruit.setName(cname);
  Bluefruit.Advertising.stop();
  Bluefruit.Advertising.start();
}


But this doesn't drop current devices (or rename them unless I "forget" the device and repair)... What is the correct way to do this?

willwade
 
Posts: 32
Joined: Sat Dec 01, 2018 3:04 pm

Please be positive and constructive with your questions and comments.