fix: OTA twee-weg handshake — Android stuurt 0xFF reboot confirmatie na COMPLETE (closes #1) #7
No reviewers
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!7
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-1-ota-ack"
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?
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 ESP-kant van de fix was al geïmplementeerd (wait-loop verplaatst naar
loop(),esp_ota_set_boot_partition()na confirmatie, 0xFF handler), maar Android stuurde de 0xFF confirmatiebyte nooit.Fix
OtaManager.kt): Na ontvangst vanfinalStatus = 0x10(OTA_STATUS_COMPLETE) stuurt Android nu een 0xFF bevestigingsbyte viasendOtaData()src/main.cpp): Geen wijzigingen — de OTA-flow had al de juiste structuur:sendOtaNotify(OTA_STATUS_COMPLETE)inonWrite→ callback returned direct (geen blokkade)loop()wacht opotaConfirmed(via 0xFF inonWrite) of 10s timeout fallbackesp_ota_set_boot_partition()+esp_restart()Twee-weg handshake flow
Test
pio run)./gradlew assembleDebug)Closes
Fixes #1
Branch was already merged to main via commit
b192c26. PR has no remaining changes — closing.Pull request closed