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

How to get simultaneous data streaming between two devices using one BLE connection

GOAL: To send one 20-byte data packet from an Android Galaxy S5 to nrf51822 and send three 20-byte packets from the nrf51822 to the S5 in a single connection interval of 10 milliseconds or less. PROBLEM: I have not been able to get both devices to send data simultaneously. Instead, one device always waits to receive data from the other before it starts sending, so the complete transaction always takes at least two connection intervals, often three or four. ADDITIONAL INFO: I am using Android Studio for the Galaxy S5 and mbed for the nrf51822.

Parents
  • Hey!

    @Shibshab is correct about the GATT operations. Use Notifications on the peripheral and write commands on the central.

    When using mBed, the S130 Softdevice is used. This softdevice support concurrent central/peripheral operation, but has a smaller output buffer for each link. This results in the maximum packet per connection interval being 2. If you want to get maximum troughput, you can use the ble_app_uart example from our SDK, and use Softdevice S110. This gives you 6 packets each connection interval.

    Alternatively, you can export your mBed project to Keil, and manually flash the S110 softdevice. This will require a bit of tweaking of various parameters both in code and compiler settings. Let me know if you go for this solution, and i will help you out.

    -Anders

  • Are you using the nRF51 DK? Check the Keil settings under Target options -> Debug ->Settings. Also try searching devzone for the error. There are probably 100 posts about this.

    image description

Reply Children
No Data
Related