cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 + CGI Handler

Ina
Associate

 

Hello everyone,

I am using the STM32F407 µC and would like to create a web interface. A few functions, such as getting the temperature value from the µC once (SSI) and switching on the LED via the web interface on the board (CGI), work. Now I would like to get the temperature value cyclically without having to reload the complete page.

My idea was to use JSON fetch to query the variable in json.cgi.

Ina_0-1706269581280.png

The function in the JV is also called correctly and the corresponding function in the µC is called (CGIJSON_Handler).

Ina_2-1706269658737.png

Ina_1-1706269637603.png

My only problem is that CGI returns a web page by default and not a value (int or float). Would anyone have an idea where in the standard httpd.c file I have to adjust this so that a value is returned?

FYI: I generated the code with the cube and use LWIP without RTOS.

Many thanks in advance.

Translated with www.DeepL.com/Translator (free version)

1 REPLY 1
Pavel A.
Evangelist III

 without having to reload the complete page.

Then you need a different technology instead of CGI and SSI: WEB sockets or something else. Stack Overflow is a good place to ask about this. If this seems too hard or complicated - here you can find help with your project.