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

nrf51822 throughput iPhone6 BLE 4.0 iOS 10.3

Hello,

I'm using a nRF51822 to send data to the iPhone using the NUS service. I'm using the oldest SDK4.x and v5.x S110 soft device. I know that the least connection interval for iOS 10 is 30ms and the number of packets per connection interval is 3.

Considering the maximum payload of 20bytes per packet, the throughput is calculated as follows:

Throughtput = (1/30ms) * 3 * 20Bytes = 2000 Bps

Considering, I'm sending only 1 byte, instead of the maximum payload of 20bytes:

Throughtput = (1/30ms) * 3 * 1Byte = 100Bps

100 Bps means 1 Byte of data being sent 1/100 of every second.

Currently, I have a timer, which goes off every 0.01, which is 1/100 of every second. When the timer goes off, the sensor values are sent to the iPhone. When I log the data on the iPhone over a period of 5 mins, what I receive is only 66.667Bps and not 100Bps.

I have been trying to track down this issue but I'm not successful till now. Can anyone help me out with this?

Parents
  • I completely agree with you on the first point, that the value with be very close to 100Bps and not 100Bps as there will be losses/ retransmission.

    The sensors are based out of I2C communication. The loop in the main function, keeps communicating and updating the values to a global variable. And once the timer goes off, the callback function just takes the global variable values and sends it to the function ble_nus_send_string(). In this scenario, does a queue really matter? As, I just read the value from a global variable and send it.

    Also, the above data which I stated, connection interval = 30ms and number of packets per connection interval = 3. Are they correct? Though apple developer docs says it to be 30ms, in other forums I read that it can brought down to 20ms and the number of packets can be increased to 6. So, just wanted a confirmation.

    Finally, because I'm using a very old version of SDK, is there a chance that the number of packets per connection interval is restricted to 2, and that's why I get a lower throughput?

Reply
  • I completely agree with you on the first point, that the value with be very close to 100Bps and not 100Bps as there will be losses/ retransmission.

    The sensors are based out of I2C communication. The loop in the main function, keeps communicating and updating the values to a global variable. And once the timer goes off, the callback function just takes the global variable values and sends it to the function ble_nus_send_string(). In this scenario, does a queue really matter? As, I just read the value from a global variable and send it.

    Also, the above data which I stated, connection interval = 30ms and number of packets per connection interval = 3. Are they correct? Though apple developer docs says it to be 30ms, in other forums I read that it can brought down to 20ms and the number of packets can be increased to 6. So, just wanted a confirmation.

    Finally, because I'm using a very old version of SDK, is there a chance that the number of packets per connection interval is restricted to 2, and that's why I get a lower throughput?

Children
No Data
Related