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.

LAUNCHXL-CC2640R2: How to enable directed advertising on simple peripheral ?

Part Number: LAUNCHXL-CC2640R2

Hi,

We are using LAUNCHXL-CC2640R2 and simple peripheral codebase. 

We need to enable direct advertising for specific remote device. It means only specific  device can scan and connect our peripheral

Here is what I did:

simple_peripheral_oad_offchip.c

...

uint16_t desiredConnTimeout = DEFAULT_DESIRED_CONN_TIMEOUT;

+ uint8 connectedDeviceAddr[B_ADDR_LEN] = {0x24,0xDF,0x6A,0x83,0xDB,0x35};// Nexus BD_ADDR 24DF6A83DB35
+ uint8 advDirectType = GAP_ADTYPE_ADV_HDC_DIRECT_IND;
+ uint8 advDirectAddrType = ADDRMODE_STATIC;
+
// Set the GAP Role Parameters
GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8_t),
...
GAPRole_SetParameter(GAPROLE_ADVERT_OFF_TIME, sizeof(uint16_t),
&advertOffTime);

+ GAPRole_SetParameter( GAPROLE_ADV_EVENT_TYPE, sizeof( uint8 ), &advDirectType );
+ GAPRole_SetParameter( GAPROLE_ADV_DIRECT_ADDR, sizeof( connectedDeviceAddr ), connectedDeviceAddr );
+ GAPRole_SetParameter( GAPROLE_ADV_DIRECT_TYPE,sizeof( uint8 ), &advDirectAddrType );
+

After these changes the directed advertising is not work, is there something wrong I did?

Thank you.