Coder Social home page Coder Social logo

Comments (7)

fbiego avatar fbiego commented on May 28, 2024

160000? looks like the last part was not written to the file. This usually happens when using SPIFFS.
A delay before installing the update may resolve the issue

from esp32_ble_ota_arduino.

Fabchick avatar Fabchick commented on May 28, 2024

I am getting the same error when I am following your tutorial carefully and setting the partition table to "minimal SPIFFS".
I am working with platform.io plugin on VSCode. There I added board_build.partitions = min_spiffs.csv to the platformio.ini file and added this csv partition table to the root in the filesystem.

But! everything works when I disregard your advice to set that minimal spiffs partition table. platformio uses the default partition table which works fine for me.

Sadly, I dont know why it works, because I am new to this and I have to get more knowledge about how those partition stuff works and why I even have to alter it.

ps: fbiego, thanks for the nice tutorial and codes. Really appreciate it because it accelerates my project on OTA over BLE.

from esp32_ble_ota_arduino.

fbiego avatar fbiego commented on May 28, 2024

Hello @Fabchick,
here is a brief description.

app0 stores the uploaded code via serial and the esp will boot from that by default.
When the OTA file is transferred via BLE it will be stored in spiffs temporarily.
The installation process involves transferring the update file from spiffs to app1, if successful esp will set a flag to boot from app1 which now contains the new firmware.

So app0 and app1 must be greater than your compiled code, your spiffs must also be large unless you're using external storage such as an SD card to store the file temporarily

from esp32_ble_ota_arduino.

Fabchick avatar Fabchick commented on May 28, 2024

This was an awesome and on-point explanation of it. Thank you! ☺️
Also I have to excuse myself. I have messed up by thinking that you have written this similar tutorial.

back to topic:
So If you do not have an SD card, you have to ensure that app0, app1 and spiffs is greater than the compiled code.
The "minimum spiffs table" I pointed out earlier has a size of 0x30000 - which is much smaller than app0 and app1.
Could this have been the problem I have got the #9 error?
Also: I just successfully flashed an 725KB binary file via your app to my ESP32. How is this possible when the default partition options give app0 and app1 a size of 0x140000? 0x140000 < 725KB binary file, right? Or is the size of the binary file much bigger than the actual size of code transfered?

from esp32_ble_ota_arduino.

fbiego avatar fbiego commented on May 28, 2024

Yeah, app0, app1 & spiffs must be greater.

0x30000 (hex) translates to 196,608 bytes, which was not enough to store the update file

0x140000 is 1,310,720 bytes

from esp32_ble_ota_arduino.

Fabchick avatar Fabchick commented on May 28, 2024

Oh, I did not know the hex number is given in bytes. I thought I must divide it by 8 to get the bytes. 😣

You helped me a lot bro!
Also - I like your projects, keep it up.

from esp32_ble_ota_arduino.

itsaname avatar itsaname commented on May 28, 2024

I also have some error #9 when use spiffs, but it seem no problem in ffat system, everything is same except filesys.

from esp32_ble_ota_arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.