So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Smajdalf
#76217 Hi,
in my project I am collecting data and saving them to an external flash memory in a raw format. Currently to retrieve the data I take the flash chip away and read it via Arduino. I would like to add ESP8266 to have access to the data wirelessly. I managed to configure the ESP8266 as a web server, sending hello word via server.send() command (in Arduino IDE) when accessed on WLAN. But this way I need to have the whole data prepared (in RAM?) at time of executing the send() command. I would like to send the web page in chunks - only a header, than read first page of the external flash, preprocess it to a better readable form and send it to the client and repeat until whole flash is read. How can I do this?
Thanks
User avatar
By McChubby007
#76242 One way is to recode the binary as text via base64 encode/decode. That way you are sure not to get any odd mis-interpretations it is what uuencode/decode does for mail transfer etc.

I actually use base91 which is a slightly more efficient form similar to base 64.
User avatar
By Smajdalf
#76243 I think this does not solve my problem: I have "a lot of data" - up to 4Mbit so I cannot read it whole to the RAM and then send it via server.send() and I think it is a poor way to copy the external flash to internal flash to send whole data server.streamFile().
User avatar
By gdsports
#76247 The ESP8266 Arduino package includes two examples that might help. FSBrowser is a web server file browser (upload, download, delete, etc.) for files stored in SPIFFS. SDWebServer is similar but for files stored on an SD card.