Search code examples
bluetooth-lowenergy

Analysis quality and robustness of a BLE connection


I need some help. This is my first project with Bluetooth Low-Energy. I'm mandated to create a POC to analyze the quality and the robustness of a BLE connection. I had read the BLUETOOTH LOW ENERGY, THE DEVELOPER'S HANDBOOK by Robin Heydon to first have a nice overview of the BLE protocol but I'm kind of lost. I'm gonna explain a little bit more about what we are using and what we wanna analyze

That we are using

  • Our DUT (Device under test) has a nRF52840 from Nordic Semi
  • We don't want to use a phone as the central since we can't really configure the connection parameters

That we want to analyze (KPIs)

  1. number of connect/disconnect without pairing/bonding in a time interval
  2. number of connection lost in a time interval
  3. distance to disconnect
  4. distance to reconnect
  • if possible, time to reconnect
  1. data throughput
  • measure real large payload
  • find a generic service and measure data loopback time
  1. RSSI
  2. Study how connection parameters influence the KPIs above

I don't really understand how I can measure this connection's quality. My first thought was to use a sniffer, as we already own an Ellisys Tracker or a nRF52840 DK. However I'm not sure if the tracker can provide every statistic we want. I don't have a really good understand of the DTM (Direct Test Mode) too. How can this mode analyze wireless connections while being wired ? Is it trustable in my case ?

I didn't find as much as recent informations about analysis BLE connection online a part to sniff and debug.

Some questions

Is it a good idea to use a sniffer in that case ? If not, what would you consider as an other option ?

What kind of device can I use as the central if the phone is prohibited ? I found that the BLE's API from Windows 10 wasn't good back in 2016. Did it change ? Btw I'm using WSL but it doesn't support BLE and I don't really want to recompile the kernel...

I believe that when the DUT is advertising mode, the Tx will be more powerful that during connection. Does it mean that the DUT will be scan able afar than during connection ? It isn't link with data throughput, right ?

I would like to thanks in advance everyone taking the time to read this post and provide an explanation or an answer.


Solution

  • As Emil said, your best option would be to use another nRF52840, especially given that it is your DUT which you will have to learn to use anyway, and therefore you will not need to learn how to use a new device. If your plan is to use Zephyr/nRF Connect SDK (which is what I would recommend), then you can technically use any other supported nRF device from the list here. You can also modify one of the existing samples/demos/tests that are found here:-

    If you prefer that the other device uses a different hardware/stack, then my recommendation is to use a BlueZ device as it will most likely be the easiest/most documented/most mature option. You can use a Raspberry Pi for this option or any Linux machine with Bluetooth support (or an attached BLE dongle).

    To answer your main question, a Bluetooth sniffer will not be very suitable for this use case. Sniffers are best used for debugging specific wireless/stack issues and not for automation or stress testing. As for Direct Test Mode, it might be useful for testing some of the criteria but it is more focused on testing the physical layer and the radio (which is why it is mainly used for certification/qualification), therefore my recommendation is to not rely on it alone for your testing.

    Some other useful links:-