ArduinoBLE - BLE.setAdvertisedServiceUuid()

Set the advertised service UUID used when advertising.

Syntax

BLE.setAdvertisedServiceUuid(uuid)

Parameters

  • uuid: 16-bit or 128-bit Bluetooth® Low Energy UUID in String format

Returns

Nothing

Example


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

    while (1);
  }

  BLE.setAdvertisedServiceUuid(19B10000-E8F2-537E-4F6C-D104768A1214");

  // ...  

  // start advertising
  BLE.advertise();