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
  • You seems to be missing the main point how BLE works: data get transported only once per connection interval. Meaning that if you prepare multiple packets they might be transmitted all at once but not more then typically 6 (and even that requires decent BLE stack on phone side). So if your interval is 30ms but you will try to stack one-byte GATT packets each 10ms then typically 3 packets will be waiting for radio transmission when next connection interval will occur. Now under normal circumstances this should be fine for iPhone, all 3 packets should go through and if you collect enough packets for some statistics you should see ~100 packets per second. However it seems not the case in your set-up and to be honest most of the people would be doing it in opposite way: collecting sensor data with whatever frequency (100Hz in your example) and transmitting several samples per packet... (1/2)

Reply
  • You seems to be missing the main point how BLE works: data get transported only once per connection interval. Meaning that if you prepare multiple packets they might be transmitted all at once but not more then typically 6 (and even that requires decent BLE stack on phone side). So if your interval is 30ms but you will try to stack one-byte GATT packets each 10ms then typically 3 packets will be waiting for radio transmission when next connection interval will occur. Now under normal circumstances this should be fine for iPhone, all 3 packets should go through and if you collect enough packets for some statistics you should see ~100 packets per second. However it seems not the case in your set-up and to be honest most of the people would be doing it in opposite way: collecting sensor data with whatever frequency (100Hz in your example) and transmitting several samples per packet... (1/2)

Children
No Data
Related