wait for feedback more often during flashing

There have been some reports of firmware flashing not working with a
checksum timeout error, meaning that we probably overflowed a buffer
on the Bluetooth chip from sending data too fast.

We don't have info of the Bluetooth firmware so we are just guessing
here.
This commit is contained in:
David Lechner
2020-07-02 21:37:00 -05:00
committed by David Lechner
parent 0944a27eb9
commit 9cfc7c5bd1
+5 -3
View File
@@ -319,9 +319,11 @@ function* flashFirmware(action: FlashFirmwareFlashAction): Generator {
yield put(progress(offset, firmware.length));
if (connectResult.canWriteWithoutResponse) {
// request checksum every 25 packets to prevent buffer overrun on
// the hub because of sending too much data at once
if (++count % 25 === 0) {
// Request checksum every 10 packets to prevent buffer overrun on
// the hub because of sending too much data at once. The actual
// number of packets that can be queued in the Bluetooth chip on
// the hub is not known and could vary by device.
if (++count % 10 === 0) {
const checksumAction = (yield put(
checksumRequest(),
)) as BootloaderChecksumRequestAction;