Skip to main content
RShar.9
Associate III
November 13, 2019
Question

Create HTTP client with STM32F746G board

  • November 13, 2019
  • 3 replies
  • 6082 views

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.

This topic has been closed for replies.

3 replies

waclawek.jan
Super User
November 13, 2019

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

RShar.9
RShar.9Author
Associate III
November 15, 2019

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.

Tesla DeLorean
Guru
November 13, 2019

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...​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
RShar.9
RShar.9Author
Associate III
November 15, 2019

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.

Piranha
Principal III
November 15, 2019

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...

RShar.9
RShar.9Author
Associate III
November 22, 2019

ok thanks i will try it...........