ArduinoBLE - BLE.setLocalName()

Set the local value used when advertising.

Syntax

BLE.setLocalName(name)

Parameters

  • name: local name value to use when advertising

Returns

Nothing

Example


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

    while (1);
  }

  BLE.setLocalName("LED");

  // ...  

  // start advertising
  BLE.advertise();