Reference   Language | Libraries | Comparison | Changes

ArduinoBLE : BLE class

setAdvertisedServiceUuid()

Description

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();

See Also




Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.