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

How to increase data transfer rate for BLE nrf51822 to raspberry pi?

I am working on a project where i need to send sensor values from nrf51822 module to a raspberry pi. The sensor values are received by the nrf using I2C protocol. I am using mbed compiler with the BLE.h and Gap.h libraries. I want to increase the data transfer rate. Currently it sends data at an interval of 150ms. I want to bring this down to 10ms. I tried tweaking parameters for the setAdvertisingInterval() function, but it didnt change the speed at all. Please help.

  • I tried this as well but still no improvement in results. I am a bit confused about the argument connHandle. Could you please explain it or suggest suitable articles to read upon it. Will I have to tweak these connection parameters on the Rpi as well?

  • Hi

    The connection handle is a unique index assigned to the connection when it is first established. BLE allows you to have multiple connections running at the same time, and you use the connection handles to keep them apart, and send commands to one connection or the other. When you only have a single connection the connection handle is typically 0.

    I am not very familiar with the BlueZ api used on the RPi side, but according to the response in this stack overflow exchange the recommended way to change the connection parameters is to have the peripheral request it. In other words you shouldn't have to do anything on the RPi side.

    Best regards

Related