1

I'm trying to make a webserver out of my STM32F769I-Discovery board with RTOS and LwIP. It's supposed to return a few simple html/image files.

Here's the link to the full code I have so far:

https://github.com/xtrinch/stm32f7-demos/tree/master/05-rtos-lwip

Note that it's 90% copied from STM32Cube_FW_F7_V1.7.0\Projects\STM32F769I-Discovery\Applications\LwIP\LwIP_HTTP_Server_Socket_RTOS.

50% of the time, the board gets an IP from DHCP, 50% of the time, the DHCP requests timeout.

When the board does get an IP from DHCP, I can ping it, but when I try to access it via a browser, it doesn't return anything and ping stops working after the attempt.

If the IP is assigned statically with LwIP, I cannot ping it at all.

I have zero idea where to start. Maybe there's an issue with my RTOS thread priorities? I have tcp/ip thread on osPriorityHigh, DHCP thread on osPriorityBelowNormal and webserver thread on osPriorityAboveNormal.

My webserver thread successfuly binds itself to port 80, but the following:

    newconn = accept(sock, (struct sockaddr *)&remotehost, (socklen_t *)&size);

is never executed.

glts
  • 21,808
  • 12
  • 73
  • 94
xtrinch
  • 2,232
  • 1
  • 24
  • 46

0 Answers0