Error code in app loader? #8010
|
Recently I've been getting an error code in the BlueWatch app loader when trying to upload an app. |
Replies: 1 comment
|
I just checked, and it's flow control.
It's what happens when your app sends data to the Bangle faster than it's able to process it, and the Bangle asks the app to stop sending for a bit. I'm actually kind of surprised we haven't hit this with Android. The intention was that we used the UART.js library which handles this natively: https://github.com/espruino/EspruinoWebTools/blob/master/uart.js#L494-L500 But at least on the Android version (which I guess you're copying) we instead create a fake Puck.js library (which is the old one). You should be able to use the UART library but overwrite the endpoint, so then you're able to use all the existing UART.js code (which would enable packet transfers which will be faster too). There's an example of doing it for the emulator at https://github.com/espruino/BangleApps/blob/master/emulator.js#L65-L119 So you basically just want to swap https://github.com/espruino/BangleApps/blob/master/android.html#L251-L357 for https://github.com/espruino/BangleApps/blob/master/emulator.js#L65-L119 - it should make things simpler as UART.js should handle all the queueing/splitting/etc |
I just checked, and it's flow control.
It's what happens when your app sends data to the Bangle faster than it's able to process it, and the Bangle asks the app to stop sending for a bit.
I'm actually kind of surprised we haven't hit this with Android. The intention was that we used the UART.js library which handles this natively: https://github.com/espruino/EspruinoWebTools/blob/master/uart.js#L494-L500
But at least on the Android version (which I guess you're copying) we instead create a fake Puck.js library (which is the old one).
You should be able to use the UART library but overwrite the endpoint, so then you're able to use all th…