2018-06-15 06:53 AM
I created a webpage associated with the IP address of my Discovery board. The page allows you to choose a txt file and send it to the board.
What I want to do is receive the txt file and read what is inside. I know I have to implement a code to match the POST method implemented in the webpage.
I think I have to use a function like httpd_post_receive_data() that I found in httpd.h but I don't know how to use it..
Is there any example that shows this part? or other ways to do it?
Thanks!
#stm32f7 #discovery #lwip2018-06-15 01:38 PM
Hello
marco.pirotta
,one option is to use as you mentioned, but I would suggest you to go with NETCONN API and handle server with it.
In this case you need RTOS to handle multi-threading for you, but data processing will be linear and much more easier for you.
Please check for Netconn_server_RTOS examples in your favourite STM32Cube package. There is server for HTTP webpage and you may rewrite it to handlePOST instead ofGET in the first data packet.
Best regards,
Tilen
2018-06-18 07:10 AM
Thanks for the advice
Majerle.Tilen
. Anyway I would like to avoid the use of RTOS since it is already a pretty big project.Any other way to do it without an operating system?
I noticed functions such ashttpd_post_receive_data() orhttpd_post_finished() that may be suitable to my purpose. Does anyone know if these functions can be used and how to use them? (for example I don't know what the connection requested in input really is..)
Thanks!