cancel
Showing results for 
Search instead for 
Did you mean: 

Packet counter in blueNRG

Mary W
Associate
Posted on June 22, 2018 at 09:54

Hi everyone,

I would like to count packets which I send in advertising channel. How can I do it? Maybe could I send each packet manually with any function? Then I will be able to increase my counter after sending one packet. 

BR

Mary W
1 REPLY 1
Winfred LU
ST Employee

Hi Mary,

Please try the aci_hal_end_of_radio_activity_event call back function.

By default all events are disabled. Please call aci_hal_set_radio_activity_mask() and enable advertising (0x0002) activities.

Then, each time when a beacon is sent, the stack calls the callback.

And you may customize the callback whatever you'd like to, such as increasing the counter,

or modify the advertising data with ACI like aci_gap_update_adv_data().

I tested this scenario with BlueNRG-2 and successfully sent each Beacon with different content.

Best Regards,

Winfred