ArduinoBLE - setAdvertisedServiceUuid()

Set the advertised service UUID used when advertising.

Syntax

BLE.setAdvertisedServiceUuid(uuid)

Parameters

uuid: 16-bit or 128-bit BLE UUID in String format

Returns

Nothing

Example


  // begin initialization
  if (!BLE.begin()) {
    Serial.println("starting BLE failed!");

    while (1);
  }

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

  // ...  

  // start advertising
  BLE.advertise();