2017-02-23 08:30 AM
Hi,
I am currently working with STM32F779 and i'm trying to obtain an IP address using the LwIP Middleware unsuccessfully.
Here are the configurations:
1. Change some jumpers according to the user manual page 23.
2. Using the STM32CubeMX, i've made the following configurations
3. In the header file lwip.h i have extern the following variables (used in lwip.c file) because they will also be used at freertos.c file :
extern struct netif gnetif;
extern ip4_addr_t ipaddr; extern ip4_addr_t netmask; extern ip4_addr_t gw;4. In the source file
freertos.c
, inside the defaultThread, i have the following:MX_LWIP_Init();
while (gnetif.ip_addr.addr == 0)
{
sys_msleep(DHCP_FINE_TIMER_MSECS);
dhcp_fine_tmr();
mscnt += DHCP_FINE_TIMER_MSECS;
if (mscnt >= DHCP_COARSE_TIMER_SECS * 1000)
{
dhcp_coarse_tmr();
mscnt = 0;
}
BSP_LCD_DisplayStringAtLine(20,''DHCP Negotiating'');
}
Unfotunately, the
gnetif.ip_addr.addr
is not changing as it should be after obtaining an IP address.Is there something that i am missing?
Please help me to find the right solution.
Kind regards,
Ioannis
#stm32f779-cubemx-hal #dhcp #lwip2017-03-15 06:32 AM
Hi,
You may refer to LwIP examples available in STM32CubeF7 package and compare your own project with the working application available there, in order to deduce what is going wrong in your case:
STM32Cube_FW_F7_V1.6.0\Projects\STM32F769I_EVAL\Applications\LwIP
Imen
2023-08-22 07:41 AM
Any other alternatives to solve this? Thank you in advance.
2023-08-22 07:47 AM
Hello, were you able to solve this? It would be really helpful if you could share it here. Thanks
2023-08-22 08:10 AM
I am trying to build a Webserver to display a index.html and a 404 error upon receiving http request. A custom made board is used for this application which has a STM32F69NI MCU. More details about the board can be found here.
I am getting the IP address but once I enable the HTTPD in the ioc file then the below statement is always false: