[ESP8266] flashing the spiffs and using it as webserver

extro
Posts: 1
Joined: Sat Apr 23, 2022 3:03 am

[ESP8266] flashing the spiffs and using it as webserver

Postby extro » Sat Apr 23, 2022 4:11 am

Hello,

As I struggled to use the spiffs on the esp8266, I decided to rename my work in progress repo to make it into a tutorial on "how to flash and use spiffs as a webserver".

I was trying to convert the arduino tutorial "A Beginner's Guide to the ESP8266" into the ESP8266_RTOS_SDK. Even if the conversion is not complete, the main part being the problem with the spiffs documentation of the esp8266, I hope it will be helpfull for some of you out there !

As I see, I think this solution is quite different than the Bernard's approach.

Here's my WIP spiffs webserver's repository. I hope I didn't make too much errors, easy to use for everyone (not just me on my computer...) and it will be a good help for beginners and others.

At the moment what it does :
  • Integrated into the project's Cmake file for auto compiling and flashing.
  • Create an image of the files to be flash into the spiffs.
  • Flash the spiffs binaries with the code each time (need to comment the line in the Cmake file. Would like to add an option to be able to "flash" or "flash all").
  • The esp can browse all the files inside the spiffs.
  • The esp can fetch all the files asked and send it to the client (needs to modify the sdk).
  • Basic threadless websocket client gestion (code from IBM)(the esp was rebooting with more than 3 websockets threads, no idea why, ressources ?)

TODO list :
  • Adding the websocket protocol.
  • Adding led control (as seen in the exemples).
  • Adds more (refactor) comments in order to match Doxygen's style.

All criticism is welcomed and higly appreciated, my work is far from perfect and bugs free.

Regards, Extro.

Who is online

Users browsing this forum: No registered users and 1 guest