Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Filesystem Image OTA (uploadfsota) fails to provide -s flag to espota #263

Closed
cregganna opened this issue Nov 23, 2021 · 7 comments · Fixed by #314
Closed

Upload Filesystem Image OTA (uploadfsota) fails to provide -s flag to espota #263

cregganna opened this issue Nov 23, 2021 · 7 comments · Fixed by #314

Comments

@cregganna
Copy link

Hi,

I have found an issue when uploading Filesystems via OTA. The "-s" flag is not supplied to the espota call and thus the OTA fails.

The issue is at:

if "uploadfs" in COMMAND_LINE_TARGETS:

When running OTA FS updates the Target is "uploadfsota" not "uploadfs".

With the original code I see (Note spiffs is reported as False)

Uploading .pio/build/esp12f_upload_ota/littlefs.bin
21:45:16 [DEBUG]: Options: {'esp_ip': '192.168.101.39', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 52607, 'auth': 'XXXXXXXX', 'image': '.pio/build/esp12f_upload_ota/littlefs.bin', 'spiffs': False, 'debug': True, 'progress': True}
21:45:16 [INFO]: Starting on 0.0.0.0:52607
21:45:16 [INFO]: Upload size: 1024000
21:45:16 [INFO]: Sending invitation to: 192.168.101.39
Authenticating...OK
21:45:17 [INFO]: Waiting for device...

Uploading: [                                                            ] 0% 
....
Uploading: [============================================================] 100% Done...

21:45:32 [INFO]: Waiting for result...

21:45:32 [ERROR]: ERROR[10]: 
*** [uploadfsota] Error 1

With the code modified to:

if "uploadfsota" in COMMAND_LINE_TARGETS:

I see (Note spiffs is reported as True)

Uploading .pio/build/esp12f_upload_ota/littlefs.bin
21:48:48 [DEBUG]: Options: {'esp_ip': '192.168.101.39', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 20550, 'auth': 'XXXXXXXX', 'image': '.pio/build/esp12f_upload_ota/littlefs.bin', 'spiffs': True, 'debug': True, 'progress': True}
21:48:48 [INFO]: Starting on 0.0.0.0:20550
21:48:48 [INFO]: Upload size: 1024000
21:48:48 [INFO]: Sending invitation to: 192.168.101.39
Authenticating...OK
21:48:49 [INFO]: Waiting for device...

Uploading: [                                                            ] 0% 
...
Uploading: [============================================================] 100% Done...

21:49:04 [INFO]: Waiting for result...
21:49:05 [INFO]: Result: OK

And the new FS is now loaded on the device.

With the change the non-OTA FS updates are still functional.

@becks0815
Copy link

I can confirm this. Tried to upload a program which uses littlefs via ota. Got the same response
Uploading: [============================================================] 100% Done...

22:36:48 [ERROR]: ERROR[10]:
*** [uploadfsota] Error 1

After changing main.py like mentioned above the error was gone.

@theplen
Copy link

theplen commented Mar 28, 2022

Agreed,

if "uploadfs" in COMMAND_LINE_TARGETS:

Changed to:
if "uploadfsota" in COMMAND_LINE_TARGETS:

Fixes the "Upload Filesystem Image OTA" issue.

@crazyduck
Copy link

crazyduck commented Jun 13, 2022

Working also for me.
How can this change be integrated in latest ESP8266 pio files?

Thanks for showing this up

@kmomberg
Copy link

Also worked for me. Thanks. 👍
Any idea when this change will be made official? or at least some other that address this issue.

@Helix70
Copy link

Helix70 commented May 29, 2023

This fixed it for me too. Not sure why this is not being adopted into the code, it is pretty clear.

@lycheejp
Copy link

lycheejp commented Aug 5, 2023

Super merci beaucoup cela fonctionne parfaitement de mon coté

@itldg
Copy link

itldg commented Oct 31, 2023

This solved my problem, thanks

Jason2866 added a commit to Jason2866/platform-espressif8266 that referenced this issue Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants