0

我正在尝试在 stm32f407 发现(以太网扩展/RMII)上运行 LwIP,我的 LwIP 调试输出显示:

netif_set_ipaddr: netif address being changed
netif: IP address of interface  set to 192.168.1.4
netif: netmask of interface  set to 255.255.255.0
netif: GW address of interface  set to 0.0.0.0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=arp_timer arg=0
tcpip: etharp_tmr()
etharp_timer
sys_timeout: 0x20000bb8 msecs=5000 handler=arp_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0
stmf calling h=ip_reass_timer arg=0
tcpip: ip_reass_tmr()
sys_timeout: 0x20000bcc msecs=1000 handler=ip_reass_timer arg=0

有人可以告诉我发生了什么,为什么 sys_timeout 运行以及 ip_reass_tmr() 的用途。产生这种输出的可能错误是什么?

4

1 回答 1

1

您的输出中没有任何内容 (1) 表明存在任何错误或任何错误。

除了通过from全局启用调试打印输出之外,这只是由您定义的,TIMERS_DEBUG ETHARP_DEBUG可能还有其他 from引起的调试输出lwip/opt.hLWIP_DEBUGlwip/debug.h

sys_timeout()是处理定时器的函数。TCP/IP 堆栈需要各种计时器,例如超时等待 IP 片段、超时 ARP 条目、传输/重新传输 TCP 段和 ACK 等。

ip_reass_tmr()定期调用以丢弃旧的 IP 片段,其中不会收到所有 IP 片段(即使无事可做,也会定期调用计时器 - 只要您启用IP_REASSEMBLY了 lwip 堆栈的选项)。

(1) 除非您配置了 0.0.0.0 的默认 GW - 这意味着您的堆栈将只能与本地子网上的设备通信,而不能与 192.168.1.4/24 子网之外的任何设备通信。

于 2015-12-15T14:24:15.463 回答