Hi Michael, sorry for thinking so long about a proper answer to your post.
When I hear “CGI”, I’ve always thought that you need an OS which can at least run a script or a program. It doesn’t sound like FreeRTOS, which is running tasks, not programs. And ‘scripts’, yes, you can interpret scripts.
I understand the need for flexible HTML code. What we decided, well not “we” but the JS (
JQuery
) programmers that I work with, is to make extensive use of the statement:
~~~
$(‘#id’).html( );
~~~
That is a different way of creating flexible HTML code.
The actual
<html code>
is often the result of a JSON request to an HTML server. And this request is indeed handled by the application hook ( with
ipconfigHTTP_HAS_HANDLE_REQUEST_HOOK
enabled ).
Only requests with a certain characters (usually a
'?'
) will be forwarded to the application. All other requests are about retrieving files.
In some project I’m showing the properties of a sound-limiter, gain, bass, treble, and also the actual (measured) sound pressure. There is a constant polling of these properties and they’re shown in a browser with e.g.:
~~~
$(‘#id
volume’).html(settings.volume);
$(‘#idbass’).html(settings.bass);
$(‘#id
soundpressure’).html(settings.spl);
~~~
The advantage of this approach is more simplicity at the embedded side. It just has to answer simple questions about settings and measurements. And also it gets commands of course, to change the settings.
Browsers are normally running on powerful CPU’s with lots of memory. Let them do more work to unload our small cheap MCU’s 🙂
As soon as I have some code I will append it here,
but I’m already up for comments and feedback.
Please do, post it. Many people are looking for workable solutions. It is not original to say, but there are many ways to Rome.
Regards.