Comments (9)
Timeout is 15 seconds, defined here: https://github.com/asterics/Addon-Bluetooth-WebGUI/blob/main/webgui/js/communication/ATDevice.js#L206
You can change it, if you want.
I can also change the behaviour so that AT SR
is only sent after a successful upgrade.
from addon-bluetooth-webgui.
👍 THX for the hint, I will have a look!
from addon-bluetooth-webgui.
Did you test with a longer timeout? Currently I'm sending AT SR
in a finally
-block, so in any case in order to restore GUI-functionalities that are dependent on live values. So I think we should just increase the timeout and not change the AT SR
behaviour.
What timeout should be sufficient?
from addon-bluetooth-webgui.
What timeout should be sufficient?
Hard to say, it depends on the binary size and even on the chip revision.
I think your implementation with the finally
is the correct choice,
maybe we should increase the timeout. 20s seems very long,
but the GUI is not waiting that long if the "FIN" string is received...
from addon-bluetooth-webgui.
OK, I've increased it to 20s: 1db2bb8 - should already be live. Why can this take so long, whats happening in the background? In my current test it took about 5 seconds, how could it happen that it sometimes takes >15 seconds? Maybe the transmission speed is a littlebit too fast and so sometimes the upgrade fails and waiting for OTA:FIN runs into a timeout?! See the throttling code here: https://github.com/asterics/Addon-Bluetooth-WebGUI/blob/main/webgui/js/adapter/sercomm.js#L93
I'm sending chunks of 2048 bytes and then waiting for 50ms. These values I've just found out by trial and error.
from addon-bluetooth-webgui.
Hint: for testing purposes you can open the browser console and run logReceived = true
in order to get the received raw values logged and see what response is received where "OTA:FIN" is supposed.
from addon-bluetooth-webgui.
Hint: for testing purposes you can open the browser console and run
logReceived = true
in order to get the received raw values logged and see what response is received where "OTA:FIN" is supposed.
THX!
Regarding the transmission size: this could be the problem as well.
I'm sending 128Bytes with 10ms delays:
https://github.com/asterics/esp32_addon_bootloader/blob/b803e2d336759a2793094c209ccb36b7a3e2f7d5/update.py#L38
from addon-bluetooth-webgui.
OK, then I'll adapt this as well. However your speed is 12,8B/ms and mine is 40,96B/ms - much faster and seems to also work for most cases. So maybe we should use something like 30B/ms?! Do you know what's the limiting factor here?
Edit: Ah, just realized that you're using FABIs and I'm testing with the FLipMouse. So we could simply use two different speeds for both...
from addon-bluetooth-webgui.
Changed BT upgrade speeds to:
- FLipMouse: 256B chunk / 10ms pause -> 25,6B/ms
- FABI: 128B chunk / 10ms pause -> 12,8B/ms
Tested both several times and seemed to work.
Additionally added a global variable which can be used to show the upgrade button, even if BT module version is not found or latest:
- open browser console and write
showUpgradeButton = true;
- go to "Tab General" or switch to other tab and go back to "Tab General" in order to let the variable take effect.
from addon-bluetooth-webgui.
Related Issues (13)
- Safe experimental mode with auto revert
- Device Initialisiation - FLipPad
- Updating BT firmware - locking of uC updating
- Updating BT firmware - beginning of upgrade process on Arduino RP2040
- FABI3 HOT 2
- Add support for Web Bluetooth connection to device HOT 1
- No BT module - "Installed version undefined.undefined.undefined" HOT 3
- FABI - Updating the Arduino Pro Micro HOT 3
- FLipMouse - Teensy Update Code HOT 1
- "Upload & replace all slots" -> slots are renamed unintentionally HOT 5
- problem with .md preview for settings files
- update of release data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addon-bluetooth-webgui.