Hi,
I'm trying to modify simple central/peripheral code so that the peripheral only auto-connect to a specific central device by enabling direct advertising. Here is what I did:
In central:
#define FPGA_AUTO_CONNECT 1
In peripheral I added these below the GAP_ROLE_PARAMETER lines:
uint8 connectedDeviceAddr[B_ADDR_LEN] = {0x36,0x4E,0xAA,0x2D,0x07,0x98}; //0x98072DAA4E36 << this is my central btAddr uint8 advDirectType = GAP_ADTYPE_ADV_HDC_DIRECT_IND; uint8 advDirectAddrType = ADDRMODE_STATIC; 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 these two devices cannot auto connect, is there something I did wrong here?
Thanks!