lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] problem with multiple UDP sockets


From: Mario Ribeiro
Subject: Re: [lwip-users] problem with multiple UDP sockets
Date: Fri, 4 Jul 2014 00:34:22 +0100

Hi,

Im trying to run a demo of LWIP with ChibiOS on a Olimex STM32 P107 revC, but Im getting the following behaviour:
- for the first ~10s both RJ45 leds blink (slowly)
- then green led is turned off, orange blinks fast (the board is receiving packets) and then is kept on
- I'm unable to communicate with the board (ping doesn't work)

The demo includes an http server.

I enabled all the debug switches of LWIP to try to understand what's happening in the stack but Im unable to extract meaningful information from the output (see below). Can somebody help me understand what's going on? For the received packets the stack says "packet not for us".

lwip_thread
sys_timeout: p msecs=536890160 handler= arg=p
sys_timeout: p msecs=536890140 handler= arg=p
netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 192.168.1.67
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 192.168.1.255
netif: added interface ms IP addr 192.168.1.67 netmask 255.255.255.0 gw 192.168.1.255
netif: setting default interface ms
etharp_request: sending ARP request.
pbuf_alloc(length=42)
pbuf_alloc(length=42) == p
etharp_raw: sending raw ARP packet.
netconn_new_with_proto_and_callback
tcpip_thread: API message p
tcpip_thread: API message p
tcp_bind: bind to port 80
tcpip_thread: API message p
pbuf_free(p)
pbuf_free: deallocating p
tcpip_thread: CALLBACK p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=arp_timer arg=p
tcpip: etharp_tmr()
etharp_timer
sys_timeout: p msecs=536890140 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=arp_timer arg=p
tcpip: etharp_tmr()
etharp_timer
sys_timeout: p msecs=536890140 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
pbuf_alloc(length=92)
pbuf_alloc: allocated pbuf p
pbuf_alloc(length=92) == p
tcpip_thread: PACKET p
ethernet_input: dest:FF:FF:FF:FF:FF:FF, src:90:FB:A6:85:92:11, type:800
pbuf_header: old p new p (536899572)
ip_input: iphdr->dest 0xFFFFFEA9 netif->ip_addr 0x4301A8C0 (0xFFFEA9, 0x1A8C0, 0xFF000000)
ip_input: packet not for us.
pbuf_free(p)
pbuf_free: deallocating p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
pbuf_alloc(length=92)
pbuf_alloc: allocated pbuf p
pbuf_alloc(length=92) == p
tcpip_thread: PACKET p
ethernet_input: dest:FF:FF:FF:FF:FF:FF, src:90:FB:A6:85:92:11, type:800
pbuf_header: old p new p (536899572)
ip_input: iphdr->dest 0xFFFFFEA9 netif->ip_addr 0x4301A8C0 (0xFFFEA9, 0x1A8C0, 0xFF000000)
ip_input: packet not for us.
pbuf_free(p)
pbuf_free: deallocating p
tcpip_thread: CALLBACK p
etharp_request: sending ARP request.
pbuf_alloc(length=42)
pbuf_alloc(length=42) == p
etharp_raw: sending raw ARP packet.
pbuf_free(p)
pbuf_free: deallocating p
stmf calling h=arp_timer arg=p
tcpip: etharp_tmr()
etharp_timer
sys_timeout: p msecs=536890140 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
pbuf_alloc(length=92)
pbuf_alloc: allocated pbuf p
pbuf_alloc(length=92) == p
tcpip_thread: PACKET p
ethernet_input: dest:FF:FF:FF:FF:FF:FF, src:90:FB:A6:85:92:11, type:800
pbuf_header: old p new p (536899572)
ip_input: iphdr->dest 0xFFFFFEA9 netif->ip_addr 0x4301A8C0 (0xFFFEA9, 0x1A8C0, 0xFF000000)
ip_input: packet not for us.
pbuf_free(p)
pbuf_free: deallocating p
pbuf_alloc(length=92)
pbuf_alloc: allocated pbuf p
pbuf_alloc(length=92) == p
tcpip_thread: PACKET p
ethernet_input: dest:FF:FF:FF:FF:FF:FF, src:90:FB:A6:85:92:11, type:800
pbuf_header: old p new p (536899572)
ip_input: iphdr->dest 0xFFFFFEA9 netif->ip_addr 0x4301A8C0 (0xFFFEA9, 0x1A8C0, 0xFF000000)
ip_input: packet not for us.
pbuf_free(p)
pbuf_free: deallocating p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
pbuf_alloc(length=92)
pbuf_alloc: allocated pbuf p
pbuf_alloc(length=92) == p
tcpip_thread: PACKET p
ethernet_input: dest:FF:FF:FF:FF:FF:FF, src:90:FB:A6:85:92:11, type:800
pbuf_header: old p new p (536899572)
ip_input: iphdr->dest 0xFFFFFEA9 netif->ip_addr 0x4301A8C0 (0xFFFEA9, 0x1A8C0, 0xFF000000)
ip_input: packet not for us.
pbuf_free(p)
pbuf_free: deallocating p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=arp_timer arg=p
tcpip: etharp_tmr()
etharp_timer
sys_timeout: p msecs=536890140 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p
stmf calling h=ip_reass_timer arg=p
tcpip: ip_reass_tmr()
sys_timeout: p msecs=536890160 handler= arg=p




Mário Ribeiro


On 3 July 2014 21:34, Jeremy Link <address@hidden> wrote:
I'm running FreeRTOS 8.1 with LwIP 1.3.2.

In one of my threads, I create 2 UDP sockets (using netconn) with different port numbers.

One of them I connect to INADDR_BROADCAST (multicast transmit) and the other I bind to INADDR_ANY (receive from anyone).

Ideally, I would use the same socket, but I found that it did not work.

With 2 sockets, only the one that I create first works.

If I create my Tx socket first, then my Rx socket will report back an ICMP message that the port is unreachable.

If I create my Rx socket first, then I can receive, but my netconn_send() call will block.

Any ideas on what could be happening here?

Thanks.


_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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