ArduinoBLE - BLE.setConnectable()

Set if the device is connectable after advertising, defaults to true.

Syntax

BLE.setConnectable(connectable)

Parameters

  • true: the device will be connectable when advertising
  • false: the device will NOT be connectable when advertising

Returns

Nothing.

Example


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

    while (1);
  }

  // ...

  BLE.setConnectable(false); // make the device unconnectable when advertising