#define GAP_FILTER_POLICY_ALL 0x00 //!< Allow Scan Request from Any, Allow Connect Request from Any (default).
#define GAP_FILTER_POLICY_WHITE_SCAN 0x01 //!< Allow Scan Request from White List Only, Allow Connect from Any
#define GAP_FILTER_POLICY_WHITE_CON 0x02 //!< Allow Scan Request from Any, Connect from White List Only
#define GAP_FILTER_POLICY_WHITE 0x03 //!< Allow Scan Request and Connect from White List Only
上面几个参数涉及到白名单,怎么设置白名单?
cedar_xuesong:
看名字这个是设置白名单策略的,应该还有其他的API来添加地址,没玩过,帮顶
Barbara Wu:
LL_AddWhiteListDevice(address, LL_DEV_ADDR_TYPE_PUBLIC );discoveryParams.taskID = hciExtApp_TaskID;discoveryParams.mode =DEVDISC_MODE_ALL;discoveryParams.nameMode = true;discoveryParams.whiteList = true;GAP_DeviceInit( hciExtApp_TaskID, GAP_PROFILE_CENTRAL, 1, IRK, SRK, &hciExtSignCounter );GAP_DeviceDiscoveryRequest(&discoveryParams);