cancel
Showing results for 
Search instead for 
Did you mean: 

NetX Webserver Webpage Renderer

flaming_vines
Associate II

Hi,

I managed to successfully incorporate a webserver into our project with the following details:

- STM32H753

- Azure RTOS + NetX

- 32Mb QSPI NOR flash (8Mb for webserver purpose, 8Mb for File system, some part will be for product use)

- provision for SD card

 

What I can do so far:

1. Managed to display images from my file system on NOR flash

2. Managed to post an encrypted binary file for firmware updates

3. Show a basic web page with a select-send firmware file

4. Running on HTTP for now (later HTTPS)

These are all ok. I am at the point where I want to display web pages. What will be a good direction to achieve rendering web pages with probably 10 tabs (maybe similar to router setup and status)? Not sure if this is the correct forum for this. Apologies if not. I am a beginner in HTML. Rendering on my own is quite tedious because you have to consider member placement relative to screen size, tabs, text properties, etc. 

- I read about HTML drag-and-drop editors and converting to HTML codes

- I saw this page https://stackoverflow.com/questions/9398650/use-a-html-renderer-in-an-embedded-environment

Not sure if I can use a 3rd party rendering package that can be run on Windows given my project details above (Azure RTOS)

I read a lot of people saying that it might not be a good idea to run a webserver on ST MCU because web packages become bloated. Suggestion of using ST MPU instead. However, given the limitation of using STM32H7 with external NOR flash access, what will be a good approach moving forward? I know a question will be how complex the webpage is. It will be for a monitoring system with basic controls of outputs and status of inputs, probably pop-ups for alarms and warnings, display images, , Bi-directional, dynamic data (I read bout AJAX), etc

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Haithem Rahmani
ST Employee

Hi @flaming_vines 

Thanks for reaching out about this!

We have run a quite complex WebServer with dynamic updated webpages collecting data from the MCU.

https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H735G-DK/Applications/NetXDuo/Nx_WebServer

wheck the web_content folder, there you'll find the webpages being used in above application.

Hope this helps.

regards

Haithem.

View solution in original post

5 REPLIES 5
Haithem Rahmani
ST Employee

Hi @flaming_vines 

Thanks for reaching out about this!

We have run a quite complex WebServer with dynamic updated webpages collecting data from the MCU.

https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H735G-DK/Applications/NetXDuo/Nx_WebServer

wheck the web_content folder, there you'll find the webpages being used in above application.

Hope this helps.

regards

Haithem.

flaming_vines
Associate II

Hi Haithem,

Let me preface this by saying apologies if I may sound naive. I haven't done any webserver before. Hence, I am new to this.

I do understand that the example above satisfies what I am asking for. To proceed this route, I can use a GUI HTML editor and generate the codes from there (like WIz). That is straightforward for static elements. However, for dynamic elements, I will need to learn HTML, CCS, and Some Java(although this is not a problem) so I can link them. Although this is the most beneficial in the long run I think. But this has a learning curve for me.

I guess I was hoping if there is a package written in C that I can port that call say - Insert text, button in position relative to such and such with a callback. This in turn converts to HTML codes that I pass to NetX as string. I may sound naive with this idea since HTML might be more complex to have in a renderer package.

Thanks

 

Haithem Rahmani
ST Employee

hi @flaming_vines 

I guess I was hoping if there is a package written in C that I can port that call say - Insert text, button in position relative to such and such with a callback. This in turn converts to HTML codes that I pass to NetX as string. I may sound naive with this idea since HTML might be more complex to have in a renderer package.

What you suggested may not be possible for dynamic content, because usally Javascript libraries are being used to generate dynamic response based on the Web browser requests..

PS: I don't know why do you need to learn JAVA?

Hi @Haithem Rahmani 

I meant Javascript. Not sure if it is required or not. Anyway, I guess I need to start reading about HTML and CCS.

Thanks!

 

Hi @flaming_vines 

Indeed the javascipt is the main element for dynamic web content, HTML is only for static webpages et CSS is for styling.

regards

Haithem.