Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W5500前端没有路由器直接接网关会创建socket失败 #48

Open
zhigangbox opened this issue Sep 24, 2020 · 3 comments
Open

W5500前端没有路由器直接接网关会创建socket失败 #48

zhigangbox opened this issue Sep 24, 2020 · 3 comments

Comments

@zhigangbox
Copy link

系统都是静态IP方式:
1.1 如果接到路由器上或者路由器带的交换机上系统没有问题,wiz_socket.c中的wiz_socket函数中的socket_state = getSn_SR(sock->socket)正常为0;
1.2但如果直接接交换机上则创建socket会失败,跟踪发现socket_state =0x22,所以会-1返回,查手册ox22是socket_udp,此时按udp放行可以发送udp信息;但是tcp因0x22会一直失败。
在不接路由只接交换机的情况下:
2.1 如果按照:拔掉网线->上电->插入网线,则系统先失败后自动恢复正常;
2.2 如果按照:插入网线->上电->拔掉网线->再插入网线,则系统始终失败
万一中间断电,我总不能一根根去按1来操作吧?请问这个问题怎么解决,急急急

@xiangxistu
Copy link
Collaborator

修改了 sal_check_netdev_internet_up 函数后,问题得到解决,是这样吗?

@lincoln310
Copy link

@zhigangbox @xiangxistu 遇到同样的问题,解决了吗?

@lincoln310
Copy link

我发现如果不是用宏设置的ip,而是代码运行中设置,会在重连网络的时候,被替换成宏设置的,很可能就导致网络故障了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants