pin timeout

发布于 2019-08-22 15:18:43    浏览:1101
    本帖最后由 jszhou 于 2019-8-22 15:23 编辑


电脑能够ping通开发板,但是在ping局域网中的IP地址的时候总是timeout。防火墙这些都是关闭了的。刚接触网络这一块,不知道怎么下手.........
msh />
msh />ping 192.168.3.201
lwip_socket(PF_INET, SOCK_RAW, 1) = 0
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=192.168.3.201 port=264
lwip_recvfrom(0, 24006e38, 64z, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=00000000
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=00000000
lwip_recvfrom[UDP/RAW](0): buf == NULL, error is "Timeout."!
From 192.168.3.201 icmp_seq=0 timeout
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=192.168.3.201 port=36
lwip_recvfrom(0, 24006e38, 64z, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=00000000
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=00000000
lwip_recvfrom[UDP/RAW](0): buf == NULL, error is "Timeout."!
From 192.168.3.201 icmp_seq=1 timeout
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=192.168.3.201 port=36
lwip_recvfrom(0, 24006e38, 64z, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=00000000
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=00000000
lwip_recvfrom[UDP/RAW](0): buf == NULL, error is "Timeout."!
From 192.168.3.201 icmp_seq=2 timeout
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=192.168.3.201 port=36
lwip_recvfrom(0, 24006e38, 64z, 0x0, ..)
lwip_recvfrom_udp_raw[UDP/RAW]: top sock->lastdata=00000000
lwip_recvfrom_udp_raw[UDP/RAW]: netconn_recv err=-3, netbuf=00000000
lwip_recvfrom[UDP/RAW](0): buf == NULL, error is "Timeout."!
From 192.168.3.201 icmp_seq=3 timeout
lwip_close(0)
msh />ping 127.0.0.1
lwip_socket(PF_INET, SOCK_RAW, 1) = 0
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=127.0.0.1 port=264
Send 127.0.0.1 - error
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=127.0.0.1 port=36
Send 127.0.0.1 - error
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=127.0.0.1 port=36
Send 127.0.0.1 - error
lwip_sendto(0, data=240042d4, short_size=40, flags=0x0 to=127.0.0.1 port=36
Send 127.0.0.1 - error
lwip_close(0)


Wireshark抓包如下:


host.png
201-200.png
200--201.png

查看更多

2 个回答
Cheney_Chen
Cheney_Chen 2019-08-22
This guy hasn't written anything yet
楼主使用的什么版本的 lwIP 协议栈,如果不是建议使用 2.0.2 版本,然后从抓包看好像发送和接收响应都是正常的,ifconfig 查看一下当前网络状态看看吧
jszhou
jszhou 2019-08-23
This guy hasn't written anything yet
    本帖最后由 jszhou 于 2019-8-23 10:18 编辑


谢谢,[float=right]


[/float]
Cheney_Chen,问题已经解决了,H743的板子,自己移植的LwIP-2.1.2目前还不支持ifconfig,是配置问题,手动定义了一下DEFAULT_RAW_RECVMBOX_SIZE就好了:lol

撰写答案

请登录后再发布答案,点击登录
关注者
0
被浏览
1.1k

发布
问题

分享
好友

手机
浏览

扫码手机浏览