Pebble AppMessages communication data loss in background mode
Closed this issue · 3 comments
janm399 commented
When running the app in background mode, the device is allowed to into deeper power-saving modes, resulting in approximately 10-15 % BLE packet loss. Find out the root cause of the packet loss, and find approaches to eliminate it.
Though power consumption is a concern, it is more important to achieve less than 2 % BLE packet loss.
mpetruska commented
- Determine the meaning of the error code (64, -1064). The error is: APP_MSG_BUSY (http://developer.getpebble.com/docs/c/group___app_message.html#ga695a78c926b20edbb14d7faf5a78c29e)
- Update the code so that data sending is more reliable (less packet loss occurs).
- Code review
janm399 commented
It may be necessary to drop to 50Hz sampling rate.
mpetruska commented
Added a queue for messaging, which fixes the problem. It should be okay for now to remain at 100Hz.