ArduinoBLE - BLE.setDeviceName()

Set the device name in the built in device name characteristic. If not set, the value defaults “Arduino”.

Syntax

BLE.setDeviceName(name)

Parameters

  • name: device name value

Returns

Nothing

Example


 // begin initialization
  if (!BLE.begin()) {
    Serial.println("starting Bluetooth® Low Energy module failed!");

    while (1);
  }

  BLE.setDeviceName("LED");

  // ...  

  // start advertising
  BLE.advertise();