-->
Page 1 of 1

Downloading a file from server

PostPosted: Tue May 01, 2018 4:26 am
by harry12
Hi,

I am a complete noob here with respect to esp8266. :D

I am working on a project with a arm cortex m7 MCU. I need to download multiple files from a server over WI-Fi connection and save them on SDcard. So here are my questions:

1- Is this possible with ESP-01 to ESP-14 modules (or other modules based on esp8266)?
2- Should I use a module or directly drive the esp8266 chip with my MCU?
3- What is the maximum baudrate I can achieve between MCU and ESP modules or chip? I need at least 1Mbits for acceptable performance.
4- What is the range of these modules?

Thanks.

Re: Downloading a file from server

PostPosted: Wed May 02, 2018 7:02 am
by btidey
If I understand you correctly you want to download files over wifi then into the ARM mcu which will store them on the SD card controlled by the ARM processor.

An ESP module could do the wifi download piece maybe storing in SPIFFS prior to transferring to MCU. What is file size you are considering? I would consider using an SPI connection between the ESP and the ARM instead of serial if you want maximum bandwidth. You could either include a header with the data (filename etc.) or use the serial connection as a control path.

The range of the esp wifi is good but will obviously depend upon local conditions, walls etc. I have found them to be just as good if not better than most wifi clients, smartphones etc.

Don't use an ESP-01 (not enough GPIO). Modules like ESP-12 would be a typical choice, although you may want to use a NodeMCU like device with built in serial usb connection for development purposes.

Re: Downloading a file from server

PostPosted: Wed May 02, 2018 1:34 pm
by harry12
btidey wrote:If I understand you correctly you want to download files over wifi then into the ARM mcu which will store them on the SD card controlled by the ARM processor.

Yes that is the Idea.

btidey wrote:An ESP module could do the wifi download piece maybe storing in SPIFFS prior to transferring to MCU. What is file size you are considering? I would consider using an SPI connection between the ESP and the ARM instead of serial if you want maximum bandwidth. You could either include a header with the data (filename etc.) or use the serial connection as a control path.


I don't know what SPIFFS is, but the file will first be completely downloaded into external SDRAM then copied into SDCARD. Most files will be about 100kbytes or less. There will be occasional files that are 512kbytes or even 1Mbyte. I'll also look into using SPI instead of uart.

btidey wrote:The range of the esp wifi is good but will obviously depend upon local conditions, walls etc. I have found them to be just as good if not better than most wifi clients, smartphones etc.

Thanks. That is more than enough for our needs.

btidey wrote:Don't use an ESP-01 (not enough GPIO). Modules like ESP-12 would be a typical choice, although you may want to use a NodeMCU like device with built in serial usb connection for development purposes.

I don't need GPIO or any other functionality (MCU already has everything I need). I simply want the to use the wifi connectivity with the best possible speed.

Any reason why I should choose ESP-12 over say ESP-14?

P.S. Thanks for the great response.