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

Regarding BLE advertising packet's transferring time on nrf52840

HI I'm currently working on measuring distance between two points with two nrf52840 modules with the example "nRF52-ble-long-range-demo" (you can easily find it in github)

Both of my central and peripheral nrf52840 module have setup with Coded PHY & 8dbm

my research goal is to measure distance between two BLE modules with TOA & TDOA values.

So far I got two questions about my research

Q1) While one central BLE module is receiving an advertising packet from peripheral BLE module, I could check values of the RSSI and Channel of the advertising packet on J-Link RTT Viewer V6.60d.

  Does the numbers on the left side means RTC(Real Time Clock)?

    If yes, how can i convert this numbers to real time.

    if not, What are those numbers?

  This is a screenshot of the RTT Viewer when I connect central BLE module to my computer with RTT viewer application

screenshot of RTT viewer with central BLE module

Q2) Is there any specific way to check the time when the peripheral BLE beacon sends the advertising packet to the central BLE beacon?

  I wanted to check it but when I tried to read information about peripheral beacon on RTT viewer, it shows nothing except the comment "connected".

  • Hi,

    The logger module allows for configuring logs to be time stamped. You will see that for the project you are running, in main.c, the logger module is initialized with the line "ret_code_t err_code = NRF_LOG_INIT(app_timer_cnt_get);". The NRF_LOG_INIT() macro takes a function as an argument, and that function is the function that provides the timestamps. app_timer_cnt_get() is from the app timer library. This is not a Real Time Clock (RTC). We do have something named RTC on our SoC, but that is a "Real Time Counter". It is basically a low-frequency timer that can be used by e.g. real time operating systems, or any other purpose that needs a slower, but less power consuming, timer. In fact the application timer library uses the RTC (that is, the Real Time Counter), but as it is not a Real Time Clock it only gives the amount of time that has passed since enabling the library.

    Regards,
    Terje

  • Thanks for replying.

    So then can i make time logs whenever i send advertising packet from peri to central beacon?

    I want to measure the time whenever peripheral beacon sends the advertising packet to the central one while they are connected.

    I'm try to analyze the code on peripheral beacon, but i feel like i'm stock.

  • Hi,

    I am not sure if I understand.

    You can get timestamps on logs, which means you can get a timestamp from locations in code. You cannot however get accurate timestamps from when the BLE stack (that is the SoftDevice) sends packets. You can get a timestamps from the callback function after having received an advertisement.

    What timings do you need to measure, and with what accuracy?

    A different way to get measurements like that may be use a BLE sniffer, such as the nRF Sniffer.

    Regards,
    Terje

Related