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

Packet loss sending data from iOS to nRF52 DK

Dear all members,

I am having a strange issue. I am using the iOS Nordic Toolbox and ble_app_uart. I am sending large amounts of data from Central to peripheral, iPhone to nRF52 DK. I finding that when I send indications or Write without Response packets in a loop, packets are silently dropped. Meaning the code executes but when I look at the data received large numbers of bytes disappear!  I am using a connection interval of 30ms and find that the problem persist no matter what the MTU is set as.

Has anyone else faced this issue? Are there any solutions anyone has come up with?

Thank you,

Saad

Parents
  • Hi,

    As I understand it, this is a limitation with the Bluetooth framework on ios.  App is not notified of buffer overflow in tx output buffer, and packets added while buffer is full will become lost. We've have run into the same problem for our DFU solution, and there we have solved it by using 'packet receipt notification'. I.e., the iphone will send n number of packets before having to wait for the next packet receipt notification. It's possible to implement a similar mechanism in the UART example, but will require changes in both app and FW. 

  • Vidar, this is a great answer. I successfully improved throughput by sending N number of packets before waiting for a custom ACK from the DK. I am investigating the Nordic DFU implementation in the Toolbox app and have discovered that since iOS 11 a new addition to the iOS CoreBluetooth called canSendWriteWithoutResponse. This seems to be a way to get information on iOS underlying transmission buffer! It seems to be working on iOS 11.2 and above but broken currently on MacOS. 

Reply
  • Vidar, this is a great answer. I successfully improved throughput by sending N number of packets before waiting for a custom ACK from the DK. I am investigating the Nordic DFU implementation in the Toolbox app and have discovered that since iOS 11 a new addition to the iOS CoreBluetooth called canSendWriteWithoutResponse. This seems to be a way to get information on iOS underlying transmission buffer! It seems to be working on iOS 11.2 and above but broken currently on MacOS. 

Children
Related