ArduinoBLE - 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 BLE failed!");

    while (1);
  }

  BLE.setDeviceName("LED");

  // ...  

  // start advertising
  BLE.advertise();