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

NRF51822 data stream to Linux machine

Hi, we're working on a project that involves constant streaming of gyroscope and accelerometer data from an NRF51822 based module to a Linux machine.

What we've been working with so far is having the central (Linux machine) read a GATT characteristic from the peripheral (NRF51822). The problem we're having is that the connection interval chosen by the central (which we've found no way of setting manually) is too high and we're only getting data every ~100ms. We're striving to stream data at 100Hz+.

We understand that the L2CAP is more suitable than GATT for high-throughput/low-latency. Can someone point us in the right direction here? Any examples / reference code (for the central and peripheral).

This Kickstarter campaign claims to achieve accelerometer data stream at 200Hz. Is this possible considering that the lowest connection interval is 7.5ms => 133Hz?

  • Just about sampling frequency: They could achieve 200Hz ex. by sending 100packets per sec, each packet containing 2 samples...

  • FormerMember
    0 FormerMember

    There are several options that could work:

    1) If setting a too low connection interval in the peripheral, a connection interval lower than the central accepts, it seems like the central chooses a very long connection interval. What you can try is to increase the preferred connection interval for the peripheral and see when the central choose to use that connection interval. Normally, a central should be able to handle much lower than 100 ms.

    You can also try the ble_app_hids_mouse example in the SDK. If the linux machine supports mouse application over BLE, it will need to have connection interval much lower than 100 ms.

    2) If you have an extra nRF51-DK/Dongle or nRF52-DK, you can use that kit as the central for you application by using the newly released nRF Connect. nRF Connect is based on S130/S132 v2.0 SoftDevice versions, and S130/S132 v.2.0 supports short connection intervals.

    If you want to develop your own central you can for instance use pc-ble-driver-js that can be found on Nordics github repository.

Related