cancel
Showing results for 
Search instead for 
Did you mean: 

Is SPWF04 designed for running HTTP server and editing files over AT cmds simultaneously??

Richard Bene¨
Associate II
Posted on May 28, 2018 at 11:13

Hello everyone,

I've got one question about SPWF04 usage.

Hardware design:

  • There is SPWF04
  • There is SD card connected to SPWF04
  • There is a host MCU that controls SPWF04 over SPI

What it has to do:

  • Host MCU collects data from CAN
  • Host MCU writes those data to log files on SD card that is connected on SPWF04 (AT+FSC cmd)
  • SPWF04 runs a web interface where user can list and download those files

Is it possible and safe to run HTTP Server while host MCU is working with files on external SD?

I've got problems with it - when anybody connects to web server, SPWF04 starts to send to host MCU responses 'Unable to open file', and this error continues even when client disconnects from web server.

Sometimes module ends in watchdog.

I think that there could be problem with FAT on SPWF04 - it cannot have opened two files (index.html for client browser and something.log for writing to) simultaneously.

Am I right♯?

Best regards

Richard Bene�

#spwf04
1 REPLY 1
Elio Cometti
Senior II
Posted on May 31, 2018 at 01:10

Hello Richard,

FW 1.1 is not suitable for accessing a file from HTTP server while the MCU is writing to it from AT command, you should synchronize the access from HTTP server (e.g. using a dynamic web page) in order to avoid accessing a file being modified.

Next FW will properly manage concurrent access to a file from HTTP server and AT command.

Best Regards,

Elio