WhiteList in PSoC 6

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ClMe_4503246
Level 1
Level 1

Hello everybody!

I tried to implement WhiteList in PSoC 6 without succes!

I'm using PSoC 6 BLE PROTOTYPING KIT. I configurated it in Observer GAP Role and I want it to receive only the adv packets  from another specific PROTOTYPING KIT configured in Broadcaster GAP Role. How can I use WhiteList?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello,

Please refer to the attached project. In the code, after adding devices to the whitelise using Cy_BLE_AddDeviceToWhiteList(&WhitelistDevice[0]), status of the operation is informed through the status parameter returned along with the 'CY_BLE_EVT_ADD_DEVICE_TO_WHITE_LIST_COMPLETE' event. If the status is success (0x00u), the 'CY_BLE_EVT_PENDING_FLASH_WRITE' event is generated by the BLE Stack. Please check these events in the code.

If the Peer Advertising device address is 0x00A050AABBFF then it should be updated to the structure as shown below.
*******************
cy_stc_ble_bd_addr_t WhitelistDevice[8] = { {{0xFF,0xBB,0xAA,0x50,0xA0,0x00},CY_BLE_GAP_ADDR_TYPE_PUBLIC}, 
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          };

*******************

Please let me know if you have any questions.

Thanks,

P Yugandhar.

View solution in original post

5 Replies
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello ClMe_4503246 ,

The Filter policy in the scan settings parameter(in BLE_PDL Component) will defines how the advertisement packets are filtered.

▪ All – Process all advertisement packets.

▪ White List Only – Process advertisement packets only from devices in the White List.

In the firmware, we have to add the broadcaster device address to the whitelist using Cy_BLE_AddDeviceToWhiteList() API.

Could you please share your project so that we can check at our end ?

Thanks,

P Yugandhar.

0 Likes
lock attach
Attachments are accessible only for community members.

This is my project!

I did what you said but it doesn't work...

I inizialized the array :

cy_stc_ble_bd_addr_t WhitelistDevice[8] = { {{0x00,0xA0,0x50,0x00,0x02,0x01},CY_BLE_GAP_ADDR_TYPE_PUBLIC}, 

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                           {{0x00,0x00,0x00,0x00,0x00,0x00},0},

                                          };

Then in the case CY_BLE_EVT_STACK_ON I did the instruction:

Cy_BLE_AddDeviceToWhiteList(&WhitelistDevice[0]);

You can find it in file host_main.c

 

 
0 Likes

Hello ClMe_4503246 ,

Could you please resend the project ? I'm not able to open the project, it shows that the Archive is either damaged or in unknown format.

In the PSoC Creator, Go to File -> select 'Create Workspace Bundle' and send the archived file.

Thanks,

P Yugandhar.

0 Likes
lock attach
Attachments are accessible only for community members.

I'm so sorry! Now I'll try again

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

Please refer to the attached project. In the code, after adding devices to the whitelise using Cy_BLE_AddDeviceToWhiteList(&WhitelistDevice[0]), status of the operation is informed through the status parameter returned along with the 'CY_BLE_EVT_ADD_DEVICE_TO_WHITE_LIST_COMPLETE' event. If the status is success (0x00u), the 'CY_BLE_EVT_PENDING_FLASH_WRITE' event is generated by the BLE Stack. Please check these events in the code.

If the Peer Advertising device address is 0x00A050AABBFF then it should be updated to the structure as shown below.
*******************
cy_stc_ble_bd_addr_t WhitelistDevice[8] = { {{0xFF,0xBB,0xAA,0x50,0xA0,0x00},CY_BLE_GAP_ADDR_TYPE_PUBLIC}, 
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          {{0x00,0x00,0x00,0x00,0x00,0x00},0},
                                          };

*******************

Please let me know if you have any questions.

Thanks,

P Yugandhar.