NightDriverStrip
NightDriverStrip copied to clipboard
REGRESSION: OTA updates not functioning with expanded partition table
Problem The code contains OTA support that worked when the project was small enough to fit in the default partition table. When the code grew, partitions_custom.csv was added to accommodate it. Unfortunately doing so seems to have broken OTA support.
Steps
- Build the SPECTRUM config, ensure ENABLE_OTA is on
- Run it, note IP, set upload_port to it, upload
- Note that it connects but the OTA code bails internally when checking the partition table. That's as far as I debugged.
Found this on the espressif website:
"OTA requires configuring the Partition Table of the device with at least two “OTA app slot” partitions (i.e. ota_0 and ota_1) and an “OTA Data Partition”."
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ota.html
Looks like the "OTA app slot" partitions are commented out in the custom partition table. Though, there wouldn't be enough space in the 4MB flash to fit 3 1500K byte partitions in the flash. Even without the SPIFFS partition.
https://github.com/PlummersSoftwareLLC/NightDriverStrip/blob/4c8b6c2d8f210ca731e2a45b5ca708ab17d728c7/partitions_custom.csv#L10-L13
Oh, it looks like it might not be necessary to have a factory app. This might work? I don't have a M5Stick to test it.
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x150000,
app1, app, ota_1, 0x160000, 0x150000,
storage, data, spiffs, 0x330000, 0xF0000,
Well I don't have an M5Stick to test the spectrum project, but I was able to compile the DEMO for the heltec board and upload another image via OTA using the modified partition table.
I have an M5Stick and when I attempt to do an OTA (even with the above updates) the screen on the stick flashes momentarily followed by the IP addy no longer appearing on the stick's screen once the invitation has been sent to the device. A few moments later the OTA fails with the following: Sending invitation to 192.168.0.23 . 07:16:37 [INFO]: Waiting for device... 07:16:47 [ERROR]: No response from device *** [upload] Error 1
Yup, it seems OTA is borked. There was an open issue, and someone changed the partition table, but I wasn’t able to get that to boot at all. I’ve not got it booting again but not OTA yet.
On Oct 13, 2021, at 5:21 AM, altoidaddict @.***> wrote:
I have an M5Stick and when I attempt to do an OTA (even with the above updates) the screen on the stick flashes momentarily followed by the IP addy no longer appearing on the stick's screen once the invitation has been sent to the device. A few moments later the OTA fails with the following: Sending invitation to 192.168.0.23 . 07:16:37 [INFO]: Waiting for device... 07:16:47 [ERROR]: No response from device *** [upload] Error 1
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PlummersSoftwareLLC/NightDriverStrip/issues/28#issuecomment-942246790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4HCF2LZSKUPEWXN3YSB4DUGV2UBANCNFSM5FQDLS4Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Sorry, I thought the reason that PR was merged was because it had been tested and it was working.
I have ordered an M5Stick, so I should be able to test things further before contributing in the future.
I thought it was tested and working before it was checked in! We only verify that it BUILDS. I suppose given an ESP32 emulator… no, never mind.
It’s important to test any changes, as the pull requests get a code review and a buddy build but not a runtime test.
- Dave
On Oct 13, 2021, at 11:11 AM, Scott @.***> wrote:
I have ordered an M5Stick, so I should be able to test things further before contributing in the future.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PlummersSoftwareLLC/NightDriverStrip/issues/28#issuecomment-942584752, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4HCF42U3KKFMVTXCLOVZDUGXDV7ANCNFSM5FQDLS4Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I can submit a PR to revert the changes, if that works?
This seems to be resolved. I am no longer seeing crashes during OTA upload of the spectrum project.
Closing this as it was marked resolved over a year ago.