This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650 Auto authentication simple_central and simple_peripheral

Hi everyone,
Tell me please.
How I can make auto authentication and pairing.

How to setup?

I read section 5.4 but I cannot set up automatic authentication and pairing.

Maybe someone has a sample code.

I will be very grateful.

in SimpleBLECentral_init(void)

// Setup the GAP Bond Manager
{
uint32_t passkey = DEFAULT_PASSCODE;  //DEFAULT_PASSCODE = 111111
uint8_t pairMode = DEFAULT_PAIRING_MODE;//GAPBOND_PAIRING_MODE_WAIT_FOR_REQ
uint8_t mitm = DEFAULT_MITM_MODE;//FALSE
uint8_t ioCap = DEFAULT_IO_CAPABILITIES;//GAPBOND_IO_CAP_DISPLAY_ONLY
uint8_t bonding = DEFAULT_BONDING_MODE;//TRUE

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t),
&passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);

}

in SimpleBLEPeripheral_init(void)

// Setup the GAP Bond Manager
{
uint32_t passkey = 111111; 
uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
uint8_t mitm = TRUE;
uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
uint8_t bonding = TRUE;

GAPBondMgr_SetParameter(GAPBOND_DEFAULT_PASSCODE, sizeof(uint32_t),
&passkey);
GAPBondMgr_SetParameter(GAPBOND_PAIRING_MODE, sizeof(uint8_t), &pairMode);
GAPBondMgr_SetParameter(GAPBOND_MITM_PROTECTION, sizeof(uint8_t), &mitm);
GAPBondMgr_SetParameter(GAPBOND_IO_CAPABILITIES, sizeof(uint8_t), &ioCap);
GAPBondMgr_SetParameter(GAPBOND_BONDING_ENABLED, sizeof(uint8_t), &bonding);
}

With respect,

Arkadii.