Is there a way to change the bluetooth name of my board?
It’s “Arduino” and is not affected by BLE.setLocalName(“insert_name”);
Hi there,
Do you mean the Advertised name that would show up in a scan or the device name of the service? there are two.
Here
I use this code to make the advertise name be what I want plus the Uniquies serial of each Xiao
void goblu(){
// begin BLE initialization
if (!BLE.begin()){
Serial.println("starting Bluetooth® Low Energy module failed!");
while (1);
}
get_id_address(mac_address);
sprintf(buffBle, "Xiao %02lX%02lX",mac_address[0],mac_address[1]);
// set advertised local name and service UUID:
BLE.setLocalName(buffBle);
BLE.setAdvertisedService(ledService);
// add the characteristic to the service
ledService.addCharacteristic(switchCharacteristic);
// add service
BLE.addService(ledService);
// set the initial value for the characeristic:
switchCharacteristic.writeValue(0);
BLE.advertise();
//get_id_address(mac_address);
//sprintf(buffBle, "Xiao %02lX%02lX",mac_address[0],mac_address[1]);//Serial.println("BLE Peripheral");
}
HTH
GL PJ
Yes, but when you change it you cannot change it again, you need a master Reset !