OTA server: chunk 0 geen ACK na 3 pogingen #1
Labels
No labels
bug
bug
critical
documentation
duplicate
enhancement
enhancement
feature
good first issue
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eddy/Project_SylDa#1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptoom
Server ESP gaat in OTA-modus (led knippert groen) maar chunk 0 krijgt nooit een ACK terug.
Logs (Android)
Tussenoplossingen al toegepast (geen oplossing)
enableOtaNotifications(): expliciete CCCD descriptor write voor Android 13+firmware.binMogelijke oorzaken
Workaround
OTA via USB werkt wel (EspFlasher)
Root Cause
De
sendOtaNotify()+delay(100)wait-loop stond in de NimBLEonWritecallback, die in de BLE task context draait. Dedelay()blokkeerde de BLE task waardoor de GATT notificatie (OTA_STATUS_COMPLETE) nooit verzonden werd. Android kreeg de notificatie nooit → timeout → foutmelding "OTA mislukt: ESP SHA256 verificatie fout". De firmware was wel correct geflashed (SHA256 OK), maar de handshake faalde.Fixes
ESP (
src/main.cpp)onWritenaarloop()— BLE task blijft vrij om de notificatie te verzendenesp_ota_set_boot_partition()verplaatst naar ná Android-bevestiging (0xFF), zodat oude firmware actief blijft tot de handshake slaagtOTA_STATUS_COMPLETE→ wacht inloop()op 0xFF confirmatie → switch boot partition + rebootAndroid (
OtaManager.kt)finalStatus = 0x10Testresultaat
OTA v12→v13 getest op Samsung A26: alle 2278 chunks succesvol, SHA256 verificatie OK, handshake voltooid, ESP reboot correct naar v13. Geen foutmeldingen.
wijzigingen nooit gecommit en daardoor verloren gegaan
issue is weer helemaal open