iotile/iotile-device

BLE optimizer does not correctly back off

Closed this issue · 1 comments

This could be the source of some of our connection issues. The BLE Optimizer was supposed to check for busy error codes from the BLE stack and slow down but instead those return values are being incorrectly thrown as exceptions:

See https://github.com/iotile/iotile-device/blob/master/src/device/iotile-device.ts#L383

The ble optimizer expects that updateBLEParams will return an error object but it doesn't instead it throws the error because the call is to errorHandlingRPC rather than typedRPC:

https://github.com/iotile/iotile-device/blob/master/src/device/iotile-ble-optimizer.ts#L140