KW36: BLE whitelist query

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

KW36: BLE whitelist query

988 次查看
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

标记 (2)
0 项奖励
回复
1 回复

899 次查看
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 项奖励
回复