Fix timeout issue sideload FW on iOS #82
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a problem on iOS with uploading custom FW, it almost always fails due to a timeout or because very large data packets are sent in a short period, causing the BL connection to fail.
Lowering the desiredRxWindow value from the default 25 to 6 has improved things. It worked well for me about 95% of the time without any issues.
However, this change affects not only sideloading but all communication between the Pebble and iPhone.
I notice that watchfaces/apps upload a little slower than usual with 25, notifications works as normal as before.
Perhaps we should look into a way to isolate the use of desiredRxWindow=6 for sideloading only, but that would require significant changes.
Old pebble supposedly use desiredRxWindow with 4.
I'm not sure if the same thing is happening on Android, or if it works fine and the problem is on iOS where large packets in a short period cause the BL connection to collapse.