2019-11-12 11:51 PM
Hello,
i want to make my STM32 board as client and create GET/POST request to my server running remotely using Ethernet present on the board.
i have got an lwip example which explains the process of making board as a server not a client.
2019-11-13 12:05 AM
Googling for "lwip http client" returned dozens of results, e.g. https://www.nongnu.org/lwip/2_1_x/group__httpc.html which indicates that newer versions of lwip already contain an example; or https://github.com/kennethnoyens/lwipHttpClient , or similar.
Basically, it;'s just opening a TCP connection to the server, sending the request and the processing the reply; the process to do this as a general concept (i.e. not http-specific) should be outlined in the basic lwip documentation.
JW
2019-11-13 12:10 AM
Shouldn't be that hard to send a TCP HTTP GET request and parse the response, should it? There are relatively simple/concise forms. Written a spider using Berkeley Sockets here before...
2019-11-14 09:43 PM
Thanks you for reply ,
but I want to this using stm HAL libraries . and there are many things to set up in stmcubemx for initializing ethernet LWIP. which things should i do for client mode.
2019-11-14 09:46 PM
thanks for your reply
how can i setup for Berkeley Sockets in STM32CubeMX .
actually there are many things to set up in stmcubemx for initializing ethernet LWIP.
can you please tell any example for client mode for stm32 and setup using cubemx.
2019-11-14 11:09 PM
Jan already gave you the basis of information. And begin understanding that there is no such a thing as "HTTP client using HAL library". The HAL is driver library, lwIP is IP stack library and CubeMX can generate the (buggy and bloated) initialization of these, but it does not generate HTTP client or any other application!
> which indicates that newer versions of lwip already contain an example
Exactly! Here it is: https://github.com/yarrick/lwip/blob/master/src/apps/http/http_client.c
You have to understand that example or you'll not be able to make HTTP client. And, by the way - it's not a task for beginners...
2019-11-21 10:11 PM
ok thanks i will try it...........