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

pc-ble-driver-py: throughput limited and maximum amount of peripherals

Hello,

For a bachelor project I'm currently testing the throughput of the nRF52840 Dongle with pc-ble-driver-py and it appears that the pc-ble-driver-py has a maximum notification data rate of roughly 700 Bytes/sec.

In my setup I have a peripheral which sends a notification every 20ms to the nRF Dongle.
I used both blatann and a modified version of the heart_rate_collector.py / nus_collector (on Windows 10) to enable notifications from the peripheral and I can only handle notifications every 30ms in both cases. (rarely, the time between two consecutive notification event is also roughly 15ms).


Setting the minimum connection time interval to 7.5ms did not improve the performance either.

Additionally, by using nRF Connect, I did receive all notifications without problem.

Does this issue happen due to the Python binding? Is there anything i could do to increase the throughput?

Another question regarding the maximum number of peripherals: Using blatann I cannot set the amount of peripherals to more than 4. I would receive the error:
pc_ble_driver_py.exceptions.NordicSemiException: Failed to ble_enable. Error code: NrfError.no_mem

Does this also happen to the Python binding?

Best,
jaclim

Note: About the data throughtput: On blatann I noticed that the ble_event_handler handles every x * 15ms the next ble_event (where x being a number). However increasing the frequency of the notification from the peripheral side (to 100Hz) did not change the behaviour on the driver-py side.

  • Hello Vidar,

    I checked again and basically realized that I've made a mistake during my measurement. The nRF Dongle with the new driver does definitely perform better than the old one on Windows. In my experimental setup it does reach a rate of at least 125kbps.

    What still remains a mystery for me is why the time between two consecutive notifications vary between 1ms and 30ms for a peripheral which sends a notification every 10ms. Here is a plot where you can see whenever the pc-ble-driver-py calls the on_notification function. Could you explain how the pc-ble-driver handles notifications?

    Also, are there already plans for updating the pc-ble-driver-py repo with new driver?

    Best,

    jaclim

  • Hello Jaclim,

    jaclim said:
    peripheral which sends a notification every 10ms.

    Is the Softdevice nofiication send function aligned with the connection events interval, or do you just trigger a send every 10 ms? Either way, I would suggest that you capture a sniffer trace (nRF Sniffer for Bluetooth LE) to confirm if the GATT server is really sending one notification per connection event.

    jaclim said:
    Also, are there already plans for updating the pc-ble-driver-py repo with new driver?

     Yes, we plan to have the latest update included in the next pc-ble-driver-py release. However, I'm not able to give you an exact timeframe of when this release will come.

  • Hello Vidar,

    I doublechecked my connection interval configuration and it is indeed the reason why I had the 30ms delay.

    Thank you very much for your help!

    Best,
    jaclim

  • Hell Vidar,

    I know this is a very old post. However, I am working on streaming from a NRF52840 dongle to a python application I am developing that will feed data into Matlab. I've got everything working, but the data stream is missing packets. I know this setup works because I am able to stream data reliable with the NRF Connect Desktop Application. 

    I tried using these Lib files, but I get an error about WIN32. How can I fix this throughput issue with python? 

    Lucas

Related