Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Project Requirements vs Mongoose System Capabilities

catotoniccatotonic United States

I want to develop a ReactJS project using the ESP32.
* While at first it sounded unrealistic, I realized that the the main app would be running on a tablet, phone or computer.
* The main stumbling block, I see at this time, is the ability to serve the static ReactJS file from the ESP32 to the device connecting to it.
* The ReactJS file will be from 750 KB to 2 MB, which would not be a problem if I could store it on a SD Card.
So my question is; Has anyone implemented SPIFFS for a SD memory card?
* I have no need to append or update the content in a file, just the ability to write and read a complete file.
The other requirements are listed below. Some questions I have are:
* Would I implement this in JS or C or a combo of both?
* Should I even be doing this on a ESP32?
* How far are we from being able to mount a SD card?
* Is DMA implemented in Mongoose, or do I need to go into the ESP32 API?
Here is a list of everything I think I will need. Any and all advice is appreciated.
Project Requirements
WiFi - Access Point:
* No SSL or TLS, application is point to point
DHCP Server:
HTTP Web Server:
* The server needs to serve 1 large static ReactJS application file along with a png logo resource file.
* These file will be up to 1-2 Megs.
* They will be stored and retrieved from a SD Card or potentially a serial flash.
UART: For device driver which will interface serially with another device. The UART will need to:
* Write short, 10-40 Byte strings
* Read long, 10-40 KB strings. Buffer requirements are a concern here.
SPIFF and or SD interface for storing and serving the above :
* Write once read many large 1-2 Meg file
* Write and read many 10-40 KB files
Websocket for interacting with tablet running the ReactJS application.:
* Listen for short: 10-100 Byte JSON command objects
* Write medium: 20-50KB JSON response objects to phone or tablet (for graphs)

Comments

  • rojerrojer Dublin, Ireland

    SD card is not currently supported, though groundwork for it was laid some time ago, it should be a relatively minor change.
    there are no mOS APIs for DMA, but you can use SDK.

    juggling chunks of data on the order of tens of kilobytes will be tricky. with bluetooth off, there's about 150KB free, give or take. ensureing there's a single request in flight at all times should do it, but may make it slower.

  • SergeySergey Dublin, Ireland

    I want to develop a ReactJS project using the ESP32.
    * While at first it sounded unrealistic, I realized that the the main app would be running on a tablet, phone or computer.
    * The main stumbling block, I see at this time, is the ability to serve the static ReactJS file from the ESP32 to the device connecting to it.
    * The ReactJS file will be from 750 KB to 2 MB, which would not be a problem if I could store it on a SD Card.
    So my question is; Has anyone implemented SPIFFS for a SD memory card?

    We don't yet have a driver for it, but adding that is easy, would take us couple of days work.

    • I have no need to append or update the content in a file, just the ability to write and read a complete file.

    The other requirements are listed below. Some questions I have are:
    * Would I implement this in JS or C or a combo of both?

    Go for C+JS if you need some sort of flexible customisation.
    Otherwise, a C implementation sounds plausible if reliability is required.
    Is it a commercial application?

    • Should I even be doing this on a ESP32?

    Why not?
    Flash ecnryption, bluetooth provisioning are at no cost.

    • How far are we from being able to mount a SD card?

    couple of days

    • Is DMA implemented in Mongoose, or do I need to go into the ESP32 API?

    As rojer mentioned, DMA is quite platform specific so use ESP-IDF API.

    Here is a list of everything I think I will need. Any and all advice is appreciated.
    Project Requirements
    WiFi - Access Point:
    * No SSL or TLS, application is point to point
    DHCP Server:

    What is the provisioning procedure?
    Will the app operate on device's AP, or use external WiFi network?

    HTTP Web Server:
    * The server needs to serve 1 large static ReactJS application file along with a png logo resource file.
    * These file will be up to 1-2 Megs.
    * They will be stored and retrieved from a SD Card or potentially a serial flash.

    What are the requirements in terms of download speed?

    UART: For device driver which will interface serially with another device. The UART will need to:
    * Write short, 10-40 Byte strings
    * Read long, 10-40 KB strings. Buffer requirements are a concern here.

    What are Latency / throughput requirements?

    SPIFF and or SD interface for storing and serving the above :
    * Write once read many large 1-2 Meg file
    * Write and read many 10-40 KB files

    Same, what are latency / throughput requirements, end-to-end?

    Websocket for interacting with tablet running the ReactJS application.:
    * Listen for short: 10-100 Byte JSON command objects
    * Write medium: 20-50KB JSON response objects to phone or tablet (for graphs)

    Pretty much all of the above is doable right now, with the exception of SD card.

  • catotoniccatotonic United States

    Sergey,
    Thanks for helping me allay my fears.
    RE: Your questions.
    Is it a commercial application? Yes it will be.. I need a better understanding of you licensing requirements.
    Will the app operate on device's AP, or use external WiFi network? Initially I need no provisioning only AP no external network only point to point. I think I read that I might not need DHCP, just push a high ipV4 address.
    What are the requirements in terms of download speed? Why do you ask? Is there a problem with the Wifi speed on the ESP32? I only need to download the 1-2 Meg of static files once at the beginning of a session. I am thinking I only need TCP and not HTTP if I attach the proper headers file holding the SPA. Forgive me if I am way off in my technologies, I am still learning what once was done for me with node and express.
    Same, what are latency / throughput requirements, end-to-end? The 10-50KB files are acquired at 19.2 KBaud over the UART and written to flash or SD. Reading will only be done to offload all acquired files occasionally or to serve a single file to the user for display on a graph. The latency requirements if I understand properly, is avoiding the user throwing his tablet against the wall while he waits for a 50 KB file. I am concern why you ask this. The SPI runs at 40 Mb/sec and I need to potentially serve a 2 MB file. How long should it take? What would be great is to up the UART to 256 KB and send a data file to the user for display twice a second. But first things first.
    I will continue to study and learn your system and not worry about SD until is it required. I am also researching using a 64 or 128 Mb flash chip which might avoid the SD all together.
    Thank you for giving me your time in what I know must be a busy day.

Sign In or Register to comment.