Skip to main content
Mary W
Visitor II
June 22, 2018
Question

Packet counter in blueNRG

  • June 22, 2018
  • 1 reply
  • 600 views
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
    This topic has been closed for replies.

    1 reply

    Winfred LU
    ST Employee
    July 30, 2018

    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