This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to inject sending time in packet in peripheral BLE module?

I'm trying to inject the time when the advertising packet is sent to the central BLE module, but I'm struggling to add "sending time" data into the advertising_data_set function.

I will sniff this advertising packet with wireshark and I want to check the time that i sent in the sniffed packet. then I can get the sending time and arriving time of the advertising packet.

Can anyone give me specific instruction for my question? 

This is the a part of code in the peripheral_long_range_demo_kit in nRF52-ble-long-range-demo in github.

peri_adv_data

Parents
  • I'm trying to inject the time when the advertising packet is sent to the central BLE module, but I'm struggling to add "sending time" data into the advertising_data_set function.

     Could you try to add the field p_manuf_specific_data in the struct adv_data. There you can add your custom data, such as "sending time" data. Take a look at the function advertising_init() in the example ..\nRF5_SDK_16.0.0_98a08e2\examples\ble_peripheral\ble_app_beacon\main.c, where you can see how to add manufacturer-specific data to your advertising packet. Make sure to not exceed the maximum amount of data, as specified here, then you may have to remove name_type or flags.

    I will sniff this advertising packet with wireshark and I want to check the time that i sent in the sniffed packet. then I can get the sending time and arriving time of the advertising packet.

    I am not sure what you are trying to say here. Are you struggling to sniff the packet using Wireshark, and need some help to get it working? If so, could you be more specific about the problems?

    Best regards,

    Simon

  • HI, thanks for replying

    please never mind about wireshark issue.

    So far I understood how to add custom data to adv_data. Then how can I get the sending time of advertising packet from peripheral beacon? I want to store sending time data in adv_data.

  • I am sorry for the long delay, I have been quite busy lately. I see that you have discussed this in other Devzone tickets in the meantime. Have you made any progress on this?

    Best regards,

    Simon

Reply Children
Related