Waveshare Ble400 bluetooth pairing rejected

Waveshare Ble400 , nRF51822

  1. Bluetooth setting on the smartphone.
    The smartphone refused to register the device for the ble400 board.

  2. Some Bluetooth Apps on the smartphone scan and connect to the ble400, then read data that ble400 sent.

  3. Several Bluetooth apps on the smartphone scan the ble400, but some apps fail to find it. The device name is not visible.

  4. It's also marked as "pairing failed".

How can I solve these problems...

The below is the source code that I used.

* BLE_REQ ,BLE_RDY, BLE_RST :  I didnot  have any pin connection.


 

#include <SPI.h>
#include <BLEPeripheral.h>
#include "BLESerial.h"
#include <BLEUtil.h>


#define BLE_REQ 10 // -1
#define BLE_RDY 2 // -1
#define BLE_RST 9 // -1


BLEPeripheral blePeripheral = BLEPeripheral(BLE_REQ, BLE_RDY, BLE_RST);
BLEService linghswitch = BLEService("1101");;//BLEService("FF10");

BLESerial BLESerial(BLE_REQ, BLE_RDY, BLE_RST);

void setup() {

BLESerial.setLocalName("Light");
BLESerial.setDeviceName("Smart");
BLESerial.begin();

}


void loop()
{

BLESerial.poll(); 

if (BLESerial )
{
BLESerial.println(" tick-tacks!");
}

delay(1000);

}