This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BLE delay measurements (cc2650 DK)

Other Parts Discussed in Thread: CC2650

Hi all,

I am currently trying to measure the delay performance of BLE using the CC2650 DK, and I have a couple of doubts that some of you might be able to guide me with. 

I am using a program similar to the Sunlight example, that exposes a series of attributes (the slave/Server), and I am also using the HostTest program to work with BTool (The master/Client). I am interested in measuring the times when the read request is sent and received and when the correspondent response is sent and received. In BTool it is possible to see the times related to the master, so I can calculate the round trip time. Although, I would need to find a way to do it programmatically, since I need thousands of samples, and with BTool i dont get the times related to the slave. Hence, I tried to modify the codes to get the timestamps of the events mentioned before but I got a little bit confused on how to do it.

Here I list some of my doubts:

- As I said, for the master I am using BTool with the HostTest program. Is it possible to modify this code to get the times?

- How can I get timestamps, or something equivalent, using these codes?

- How can I send these times to the computer using the serial port? I looked up for the posts realted but it is not clear for me how it works.

- Is it better to use the simpleBLECentral program and send periodically read requests to the server, instead of using BTool?

I apologize for making these beginners kind of questions, but I am trying to get started.

Thank you in advance.

  • Hello. Yes, I would recommend starting with simpleBLECentral since the amount of control you have with BTool is limited.
    I would recommend looking at the TimeApp sample project for timestamp examples.
    You can see how to add a serial driver here: processors.wiki.ti.com/.../CC2640_Serial_Communication

    I'm not entirely sure what the end goal is but you could eliminate delay related to the serial driver by just looking at a sniffer capture.
  • Hi! Thank you for your help. I have started with the simpleBLECentral already. I will have a look now at the links you have provided.
    I am interested in studying statistically the delay performance of BLE, so I need to have thousands of measurements of the times between, lets say, a read request and when the value is actually received. I have not used the sniffer yet, I am not sure if i can get the times automatically withouth having to look one by one. do you have any thoughts on this?
    Thanks in advance.
  • It may be possible to do something like that with a more expensive sniffer such as frontline or Ellysis. In your case, as long as you are willing to deal with the extremely minimal serial delay, I would recommend using the simpleBLECentral approach.
  • Hi!

    I have been looking at the timeApp. From what I have seen, the resolution of the time structures goes down only to seconds. Is there a way to get milliseconds with these libraries?

  • Hello. Yes, this is possible.   Time app uses functions from UTC_clock.c where UTC is initialized as a 1 second periodic clock:

    void UTC_init(void)
    {
      // Construct a periodic clock with a 1000ms duration and period to start
      // immediately.
      Util_constructClock(&UTC_clock, UTC_timeUpdateHandler, UTC_UPDATE_PERIOD,
                          UTC_UPDATE_PERIOD, true, 0);
    }

    You can initialize this period to 1 ms instead of 1 second.