Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6

aaartis1
New Contributor II

Hello!

Part of application I'm developing needs to be able to store last n advertisement reports in array. How can I do it inside CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT event?

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator

Hi @aaartis1 ,

The CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT  will have an event parameter of type  cy_stc_ble_gapc_adv_report_param_t that will have all information about the adv packet. You can create a new object of this type or create a new structure with necessary data that you want to store from the adv packet  and store the adv report in that structure.

For example,

 cy_stc_ble_gapc_adv_report_param_t  adv_report[10]; //Can store 10 devices adv data

You can turn on Duplicate filtering to avoid the same device getting reported multiple times.

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator

Hi @aaartis1 ,

The CY_BLE_EVT_GAPC_SCAN_PROGRESS_RESULT  will have an event parameter of type  cy_stc_ble_gapc_adv_report_param_t that will have all information about the adv packet. You can create a new object of this type or create a new structure with necessary data that you want to store from the adv packet  and store the adv report in that structure.

For example,

 cy_stc_ble_gapc_adv_report_param_t  adv_report[10]; //Can store 10 devices adv data

You can turn on Duplicate filtering to avoid the same device getting reported multiple times.

Regards,
Bragadeesh

View solution in original post

0 Likes