lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Can't process incoming UDP packets after one of hosts is po


From: Grzegorz Niemirowski
Subject: [lwip-users] Can't process incoming UDP packets after one of hosts is powered down
Date: Thu, 23 Jul 2015 03:34:11 +0200

Hello

I have a strange problem with UDP packets on my STM32 board. It communicates with four hosts:
A - an NTP server in Internet (UDP "connection")
B - a PC running a simple TCP server
C - second board runnging UDP server
D - a WWW server in Internet (providing weather data using JSON)
There is also a WWW server running on my board. I use lwip 1.4.1 with FreeRTOS and socket API. Everything works fine and there are no problems. Except when host B is turned off. Then UDP stops working on my board. It no longer synchronizes time over NTP and can't exchange data with host C. Local WWW server works OK and the board downloads weather data from server D. In other words TCP still works but UDP doesn't. The problem occurs after B is powered down. There is no problem when B was turned off while my lwip board was powered on. There is no problem when network service on B is turned off or was turned off. The problem is only when the operating system of B is shot down during my board operating. I can't explain this behavior. My only idea is that there is a problem with ARP cache. Maybe powering down host B removes its entry from ARP cache in some uncontrolled way which affects UDP memory allocation? I also traced down UDP handling. I discovered that in recv_udp the memp_malloc(MEMP_NETBUF) function returns NULL. It doesn't happen during normal operation. I don't understand why memory can't be allocated.

Best regards,
Grzegorz Niemirowski
http://www.grzegorz.net/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]