ble.setIoCapabilities()

Description

Tell the network processor what IO capabilities the Energia device has.

Syntax

ble.setIoCapabilities(ioCapabilities);

Parameters

ioCapabilities: The mode to use.

  • BLE_DISPLAY_ONLY: This device only has a display.
  • BLE_DISPLAY_YES_NO: This device has a display and yes/no capabilities.
  • BLE_KEYBOARD_ONLY: This device has a keyboard only.
  • BLE_NO_INPUT_NO_OUTPUT: This device has no input and no output capabilities.
  • BLE_KEYBOARD_DISPLAY: This device has both a keyboard and a display.

 

Returns

Status code

Example

An MSP432 connected to the Energia serial monitor has display and yes/no (buttons) capabilities.

#include <BLE.h>

void setup() {
  Serial.begin(115200);
  ble.begin();
  ble.setPairingMode(BLE_SECURITY_WAIT_FOR_REQUEST);
  ble.setIoCapabilities(BLE_DISPLAY_YES_NO);
  ble.useBonding(true);
}

void loop() {
  ble.handleEvents();
}

Reference Home || BLE Library