KW36: BLE whitelist query

cancel
Showing results for 
Search instead for 
Did you mean: 

KW36: BLE whitelist query

488 Views
skalyan2
Contributor IV

Hi,

According to my requirement, pairing needs to be disabled, But i have a requirement to store three devices in whitelist,

is it possible ? 

If possible, i have two questions:

1)   What type of information apart from pairing parameters can i store in white list ?

2)   How can i "advertise only to whitelisted devices" ? 

Regards,

Sai Kalyana Raman

Tags (2)
0 Kudos
1 Reply

399 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Sai,

Please see the parameters that you need to save a device into the whitelist.

/*! *********************************************************************************
* \brief  Adds a device address to the White List.
*
* \param[in] address The address of the white-listed device.
* \param[in] addressType The device address type (public or random).
*
* \return  gBleSuccess_c or error.
*
********************************************************************************** */
bleResult_t Gap_AddDeviceToWhiteList
(
    bleAddressType_t          addressType,
    const bleDeviceAddress_t  address
);

2. How can i "advertise only to whitelisted devices"? 

You have to change the filter policy. gap_types.h gScanWithWhiteList_c

/*! Default value for Scanning Parameters struct */
#define gGapDefaultScanningParameters_d \
{ \
    /* type */              gScanTypePassive_c, \
    /* interval */          gGapScanIntervalDefault_d, \
    /* window */            gGapScanWindowDefault_d, \
    /* ownAddressType */    gBleAddrTypePublic_c, \
    /* filterPolicy */      gScanWithWhiteList_c, \ 
    /* scanning PHY */      gLePhy1MFlag_c\
}

Regards,

Mario

0 Kudos