You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.
When using Basecamp 0.1.8 with PlatformIO / Atom, the OTA feature works very easily. However it is not stable and not successful in a high number of attempts.
I guess, main reason for this is the excessive delay in Basecamp.cpp:
void Basecamp::OTAHandling(void * OTAParams) {
...
// The while loop checks if OTA requests are received and sleeps for a bit if not
while (1) {
ArduinoOTA.handle();
vTaskDelay(100);
}
}
The original value of 100 ms is way too high for the UDP based transmission, for high speed connections. Changing the value to 5 solved the problem for me for the moment.
But I am not sure on the side effects (runtime consumption) and if 5 ms is sufficiently low. Can you please check ?
The text was updated successfully, but these errors were encountered:
Fuempel
changed the title
Unstable OTA due to too high delay
Unstable OTA
May 4, 2018
After some additional investigation, I guess the above mentioned delay is not the real root cause. Still it remains unstable.
Also the parameter to vTaskDelay is not in ms, but in ticks.
But: I suspect the real root cause is that the ArduinoOTA library is not designed to run in a separate task in core 0, in parallel to the Arduino infrastucture.
I did a prototype, where the creatin of an additional task via xTaskCreatePinnedToCore(&OTAHandling, "ArduinoOTATask", ...) is avoided.
I have implemented a member function Basecamp::handle, called from main.cpp loop() function which then calls ArduinoOTA.handle(); Then ArduinoOTA runs on core 1 together with other Arduino infrastracture.
With this, I have a stabel setup of OTA functionality.
When using Basecamp 0.1.8 with PlatformIO / Atom, the OTA feature works very easily. However it is not stable and not successful in a high number of attempts.
I guess, main reason for this is the excessive delay in Basecamp.cpp:
The original value of 100 ms is way too high for the UDP based transmission, for high speed connections. Changing the value to 5 solved the problem for me for the moment.
But I am not sure on the side effects (runtime consumption) and if 5 ms is sufficiently low. Can you please check ?
The text was updated successfully, but these errors were encountered: