Arduino 101 BLE using "sandeepmistry/arduino-BLEPeripheral'

Hi, all.

I’m trying to use the library “arduino-BLEPeripheral” on

instead of CurieBLE to program my Arduino 101.

My problem is that the constructor of class BLEperipheral in “arduino-BLEPeripheral” has three parameters indicates the pins connected to the BLE module, while the constructor of class BLEperipheral in CurieBLE has no parameter.

Is it possible to use “arduino-BLEPeripheral” for the on-board BLE on Arduino 101?

// Import libraries (BLEPeripheral depends on SPI)
#include <SPI.h>
#include <BLEPeripheral.h>

// define pins (varies per shield/board)
#define BLE_REQ   10
#define BLE_RDY   2
#define BLE_RST   9

// create peripheral instance, see pinouts above
BLEPeripheral blePeripheral = BLEPeripheral(BLE_REQ, BLE_RDY, BLE_RST);

// uuid's can be:
//   16-bit: "ffff"
//  128-bit: "19b10010e8f2537e4f6cd104768a1214" (dashed format also supported)

// create one or more services
BLEService service = BLEService("fff0");

// create one or more characteristics
BLECharCharacteristic characteristic = BLECharCharacteristic("fff1", BLERead | BLEWrite);

// create one or more descriptors (optional)
BLEDescriptor descriptor = BLEDescriptor("2901", "value");

void setup() {
#if defined (__AVR_ATmega32U4__)
  delay(5000);  //5 seconds delay for enabling to see the start up comments on the serial board

  blePeripheral.setLocalName("local-name"); // optional
  blePeripheral.setAdvertisedServiceUuid(service.uuid()); // optional

  // add attributes (services, characteristics, descriptors) to peripheral

  // set initial value

  // begin initialization

void loop() {
  BLECentral central = blePeripheral.central();

  if (central) {
    // central connected to peripheral
    Serial.print(F("Connected to central: "));

    while (central.connected()) {
      // central still connected to peripheral
      if (characteristic.written()) {
        // central wrote new value to characteristic
        Serial.println(characteristic.value(), DEC);

        // set value on characteristic

    // central disconnected
    Serial.print(F("Disconnected from central: "));

starter.ino (1.96 KB)