You are here

adding device to whitelist while scanning | Cypress Semiconductor

adding device to whitelist while scanning

Summary: 4 Replies, Latest post by vaisakh.hari21_1668226 on 06 Dec 2016 01:07 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
vaisakh.hari21_1668226's picture
User
3 posts

Can anyone please suggest me or send me a sample code on how to add devices to whitelist while scannin. im looking to receive an address from the user via UART and add that to whitelist during scanning.please send a sample code if possible.

Thankyou,

Vaisakh Haridas
email-vaisakh.hari21@gmail.com
mob-+91 8879009971

HIMA's picture
Cypress Employee
205 posts

Hello Vaisakh,

Please have a look at the whitelist example project:https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Pro....

 

Thanks,

Hima

vaisakh.hari21_1668226's picture
User
3 posts

Hello Hima,

Yes I did go through this program , the fact is that im trying to add devices to whitelist while in scanning mode rather than in broadcasting mode, so when i try using the program fragment to add device the program flow directly goes to the default case ie enter valid address.

when im entering 'a' in serial terminal it directly goes to the condition that address entered is invalid and hence i am not able to add the device.

please help

yssu's picture
Cypress Employee
20 posts

Hi,

Please find the example project modified such that you can add devices to whitelist whilst scanning. The device will process advertisement packets only from devices in the White List.

vaisakh.hari21_1668226's picture
User
3 posts

Hi yssu,

Thankyou for the code. but again it shows the same error..instead of accepting the entire string, it directly access the default condition ie invalid address entered.Plus in this code if the same device is present it is scanned and displayed continuously. Rather i just want it to displayed only once as long as it is on. Once if broadcasting device turns off and on again only then should the PSOC display it again ..can u please look into it

I have attached a pic of the error im talking about on the Serial terminal.

please let me know

Attachments: 
Log in to post new comments.