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

Android dropping packets

I have created a nRF52 based peripheral device which is used to stream sensor data to a connected central device, usually an iPhone. I can stream data, reliably to the iPhone up to 104 packets per second with very little data loss, maybe 1 notification in 1000. But when trying to stream data to a similar Application on an Android phone I see a lot of data loss, almost 50%. This happens at lower transmission rates of 64 per second.

So, same type of application running on an iOS and an Android phone, connected to the same nRF52 peripheral running the same firmware.

What gives?

Parents
  • Hi,

    64 packets per seconds is about 1 BLE packet each 16ms. How do you decodes the BLE packets ? IMO you are doing this in the main UI thread so you are not able to run faster than 16 ms (maybe I am wrong but this sounds like this is the refresh time of your device).

    Could you try to decode the BLE packets from another Thread ? Then you should use a buffer to display the data from the main thread.

    Hope this help. Christopher

Reply
  • Hi,

    64 packets per seconds is about 1 BLE packet each 16ms. How do you decodes the BLE packets ? IMO you are doing this in the main UI thread so you are not able to run faster than 16 ms (maybe I am wrong but this sounds like this is the refresh time of your device).

    Could you try to decode the BLE packets from another Thread ? Then you should use a buffer to display the data from the main thread.

    Hope this help. Christopher

Children
No Data
Related