I'm using the nRF51822 DK + SDK10.0.0 + s110. I'm going to create a system where I do an SPI read from two sensors every 6ms. From these sensors I will get 20B each over SPI. I will send this data over BLE. Using 7.5ms connection events, I believe the BLE throughput should be sufficient (since some Android devices support 3-4 20B packets every 7.5ms). I want to test this out using the DK before developing my system.
Using the app_ble_hrs example, I modified the BATTERY_LEVEL_MEAS_INTERVAL to use 6ms (and disabled the other timers). Upon a m_battery_timer_id timeout, I call heart_rate_meas_send() which sends two 20B packets to the softdevice via sd_ble_gatts_hvx().
The Android Nexus 7 2013 is able to update to the 7.5ms connection event and data streams once notifications are enabled. However, the nRF51 eventually disconnects and goes back to advertising. If I set the timer to a slower value, the BLE connection seems to remain indefinitely. It also seems that SPI has some effect. For example, with 40B SPI reads (really just toggling the SPI lines to simulate a sensor read since I don't have the sensors hooked up) and 2 packets of psuedo-data sent every 6ms, the BLE connection gets dropped relatively quickly (say, 10 minutes). Sending the pseudo-data every 10ms causes the connection to last longer (1hr), but still eventually get dropped. Without SPI, sending the pseudo-data every 10ms the connection lasts long (>2hrs), but sending the pseudo-data every 6ms causes the disconnection to occur (relatively quickly at 10 minutes).
Since my application's datarate requires 2x 20B packets every 6ms, I also tried 4x 20B packets every 12ms, but the BLE connections still breaks. How can I resolve this BLE disconnection issue?