Hello everyone!
Long story short, we are developing a BLE application based on the Nordic UART peripheral example. The board (STM32 micro + BL652 BLE module w nrf52832 inside) receives different commands from a central (PC running nRF Connect for desktop in this case) and sends back either a discrete response or streams data until another command is received to stop the streaming. All these responses are received via notifications.
The problem is that when connected to the device via either the built-in Bluetooth transceiver of the latptop, or a 3rd-party UBS dongle and some Python or Matlab script (as PC app), the connection performs much worse than when connected to our device via nRF52840 USB dongle and nRF Connect for desktop.
We logged the traffic in Wireshark for this data streaming when triggered from both nRF Connect and Python. The pictures look as follows:
NRF CONNECT and nRF52840 USB dongle:
3rd-party (or built in laptop BLE) with Matlab or custom Python script:
As you can see, in the second picture, there seem to be extra transactions taking place involving the link layer. The time between the two events marked with a red vertical line is ~50ms!!! This ruins our data rate and severely cripples the performance of the device.
Unfortunately we do not know who is at fault here and how to properly interpret what we see in the picture. Is the master requesting something and the slave device does not answer in a timely manner? Or, is the slave maybe failing to send another notification and the master sends some confirmation again?
The proper understanding of the events taking place at this link layer is currently baffling us.
Any help is much appreciated.
Thank you very much!