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

Theoretical evaluation of Long Range experiments

Hi,

I'm doing some experimental evaluation of BLE Long Range. I use the ble_app_att_mtu_throughput example with parameters:

  • ATT MTU: 247 bytes
  • Data length extension: 251 bytes
  • Connection interval: 20 ms
  • Connection length extension: on
  • Preferred PHY: Coded

Using these parameters, I get an experimental throughput of 40.08 kbps. I also want to theoretically validate this, in the same way I did for 1Mbps and 2 Mbps PHY (https://devzone.nordicsemi.com/f/nordic-q-a/29269/theoretical-throughput-doesn-t-match-experiments-done-via-ble_app_att_mtu_throughput-example). But now I need to use the packet format of a Coded Phy packet, given below:

Using this information, I calculate:

  • Tx-Time (full packet) = 80 µs + 256 µs + 16 µs + 24 µs + 257 * 8 * 8 µs + 24 * 8 µs + 3 * 8 µs = 17040 µs
  • Rx-Time (empty packet) = 80 µs + 256 µs + 16 µs + 24 µs + 2 * 8 * 8 µs + 24 * 8 µs + 3 * 8 µs = 720 µs
  • IFS = 150 µs

=> Theoretical send-time = 17040 µs + 720 µs + 150 µs * 2 = 18060 µs

But through previous questions (https://devzone.nordicsemi.com/f/nordic-q-a/29269/theoretical-throughput-doesn-t-match-experiments-done-via-ble_app_att_mtu_throughput-example and https://devzone.nordicsemi.com/f/nordic-q-a/28682/ble_app_att_mtu_throughput-throughput-calculation-packets-per-interval-data-length-extension) I know that the SoftDevice will first check if a full TX and RX can still be done before a next real packet exchange is scheduled. The timing for this is Tx-time (full packet) + Rx-time (full packet) + 150 µs * 2 = 2* 17040 µs + 300 µs = 34380 µs. However, this is already more than the full 20 ms connection interval... So it doesn't fit in there even once...

So in short, I'm a bit at a loss how to calculate the theoretical throughput for Long Range BLE...

Any help would be greatly appreciated. Thank you in advance.

Kind regards,

Mathias

Parents
  • Hi,

    I'm not sure if I understand your reasoning at the end. Shouldn't it be

    Tx-time + Rx-time + (IFS * 2) 

    and not 

    (Tx-time + Rx-time + IFS) * 2 

    ?

  • You mean "Tx-time (full packet) + Rx-time (full packet) + 150 µs * 2 = 2* 17040 µs + 300 µs = 34380 µs. "?  I calculated that the time for a full packet is 17040 µs. Because of the Softdevice checking if a full Tx and Rx can still be done before the real transmission is scheduled, the time to check is 2 * a full packet + 2 * IFS = 2 * 17040 µs + 2 * 150 µs. Or at least, that's how I understand it right now.

  • What kind of software do you use to open the .logdata file? It looks like a Saleae logic trace file, but I'm unable to open it with my Saleae software. It sounds like you are toggling GPIOs on certain events in software and measuring them with a logic analyzer? It would be helpful if we could see an actual sniffer trace of BLE packets. Do you have equipment for that?

     

  • Hmm, that's strange, I can open it with my Salea software. I downloaded it here https://www.saleae.com/downloads/. I am indeed toggling GPIOs on certain events. I'm toggling the radio using the notification handler and I'm toggling sending of packet and receiving of ACK, this right before hvx method and right after receiving TX complete for the packet respectively. I only send one packet a time, each time triggered after receiving a TX complete for the previous packet.

    Unfortunately, I don't have any equipment to sniff LR BLE packets... Is there any free or not so expensive sniffer possibility available?

    EDIT

    So the second GPIO pin actually maps the round trip time for each packet.

  • Hi,

    I have discussed a bit back and forth with the Softdevice team, and it turns out that our Coded phy solution doesn't actually support long packets at all. In other words, it is packets with maximum 27 bytes L2CAP + 2 bytes LL. So, we don’t send or receive long packets which explains why you see packets distributed over more than one connection event. It is strange though, that you are seeing 34 ms events. Maybe it is a result of using radio notifications.

    Anyway, to get any further in this, we will need your code so that we can use a sniffer and see what actually goes on in the air. 

     

  • Hi,

    You can find my code here: https://we.tl/MkCEBqs9Oi. The folder needs to placed in SDK15 folder/examples to be able to run.

    It's a variant of the max throughput example available in the SDK, in the central & peripheral folder. It's also with two boards. One board acts as tester and the other as dummy. So when button 3 is pressed on the tester it will starts scanning and when button 4 is pressed on the dummy it will start advertising. But I don't use any console input anymore, everything is preprogrammed, so when the two boards establish a connection, they just start communicating.

    After connection is established, the tester sends one packet of 244 payload and when it receives a TX complete for that one, it logs the throughput, round trip time, RSSI and channel on which the communication was done. It also sends the same packet again. This processing is repeated infinitely. When the connection goes out and comes back, the application takes care of this and the communication is reset. Communication while advertising/scanning and in connection is both using the LR PHY.

    The other used parameters are:

    • Connection interval: 40 ms
    • MTU: 247 bytes
    • Data Length Extension: 251 bytes
    • Connection length extension: ON

    Thanks,

    Mathias

  • Hi,

    My apologies for the slow response again. It is holiday season in Norway and those left of the Softdevice team (as well as the long range BLE sniffer equipment) are tied up in preparation for some upcoming releases. Your case is not forgotten, but unfortunately I'm not sure when I'll have time to work more on it either. 

Reply Children
Related