No announcement yet.

gen4-IoD-24T Self Generation of .gci/.dat to uSD Card?

  • Filter
  • Time
  • Show
Clear All
new posts

  • gen4-IoD-24T Self Generation of .gci/.dat to uSD Card?

    Hello guys!

    The gen4-IoD-24T that I am using is connected to an external microcontroller via UART. Hypothetically speaking, lets say the customer has access to this external microcontroller. Also, let's say we can update the gen4-IoD-24T with new firmware, without any issues. Obviously, if our new firmware involves some additional widgets or user images, etc. then we must update the uSD card with the new .gci and .dat files, in order for our application to retrieve these files and display the media necessary. Our customer however does not have access to this internal uSD card.

    Just for proof of concept, I have created a simple program using WS4 that simply displays a "cool gauge". Upon generating the .gci and .dat files, I have then copied their contents into my Arduino code. For example, the .dat contains a single line of code which is written to a new .dat file generated by the ESP8266 at run-time. i.e, I start of with a blank uSD, and when the program is running, it generates the .dat file automatically with the necessary code. Please see below for clarity!

    if (myDATFile)
    myDATFile.write(""Coolgauge1" 0000 0000 1C 34\r\n"); /// carriage return / new line required in addition!

    This works for as far as the .dat file is concerned (I am still pre-loading the .gci onto the uSD card prior to running the program). The result is a working "cool gauge".

    Is this possible to do with the .gci file as well? (Obviously I would not just enter the entire file as a string as I have done for the .dat file!).
    Just a few concerns:

    1. gci files are relatively large, for example 7 million characters for a single "cool gauge".
    2. gci files generated via WS4 have illegal characters that are not recognised by IDE.
    3. is there an easier way of doing this? (Supplying that the uSD can not be accessed, yet firmware updates are inevitable?)

    Thanks a lot!