I find that lwip blocks when calling netconn_write().
In particular for each call to netconn_write() the function
static err_t
netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg)
is called twice.
On the second calls the thread blocks forever waiting a semaphore.
tcpip_send_msg_wait_sem
Is this a bug? Is there a solution?
Thank you
---- Il gio, 19 set 2024 18:01:38 +0200, <lwip-users-requ...@nongnu.org> ha
scritto ---
Send lwip-users mailing list submissions to
mailto:lwip-users@nongnu.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/lwip-users
or, via email, send a message with subject or body 'help' to
mailto:lwip-users-requ...@nongnu.org
You can reach the person managing the list at
mailto:lwip-users-ow...@nongnu.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."
Today's Topics:
1. httpd hangs when opening page (Mario Raffin)
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Sep 2024 17:22:29 +0200
From: Mario Raffin <mailto:mario.raf...@primalucelab.com>
To: "lwip-users" <mailto:lwip-users@nongnu.org>
Subject: [lwip-users] httpd hangs when opening page
Message-ID:
<1920ae0add9.10537d24b2504319mailto:.6319461932620086...@primalucelab.com>
Content-Type: text/plain; charset="utf-8"
Hello,
I am unable to make httpd server. I am working with the following platform:
CPU: STM32G407 (Cortex-M4)
LAN PHY: LAN8720AI
SO: FREERTOS V10.3.1
I configured the LWIP and FreeRTOS using CubeMX tool.
The ping command works fine.
I defined in fsdata.c a very simple webpage, a sort of "hello world" html.
I checked possible stack overflow and MallocFailed from freertos.
When I try to open the webpage I see from debugger that the TCP connection is
set ESTABILISHED. But there is no packets sent from the board toward the
client.
As soon as I try to open the webpage the whole LWIP stack stop working and also
the ping fails until the next reboot.
I tried also to increase the MEMP_NUM_PBUF to 64 (from 16).
LwIP is initialized calling from DefaultTask():
MX_LWIP_Init()
The httpd server is initialized calling from DefaultTask():
httpd_init();
Enabling the LWIP_DEBUIG I cannot print everythink since the sprintf and the
sent to UART is too slow, but enabling a message ring buffer I see something
like this:
-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n0dd7c new 0x14 (0)\n chksum)\n)\nx0,
State: \030ù\002\b\003\n |1056668| 6716 | (id, flags, offset)\nn, fl
TCP connection established 56644 -> 31422
http_accept 0x2000dd34 / 0\n-----+\n(src port, dest port[...]
tcp_receive: ACK for 536927516, unacked->seqno 6511:0\n
tcp_receive: removing 536927468:134412984 from pcb->036934304\n\0, flags
(\00x0)\n\00x0)\n\0\0\0\075c)\n"
The size in tcp_receive is quite suspect.
The last message I get seems to be "tcp_receive: removing 536927468 etc"
It looks a memory allocation issue but I can't figure the cause.
Thank you
Mario
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<https://lists.nongnu.org/archive/html/lwip-users/attachments/20240919/affec09a/attachment.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
lwip-users mailing list
mailto:lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users
------------------------------
End of lwip-users Digest, Vol 253, Issue 4
******************************************
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users