[W5500] SOCK_CLOSED 관련 문의 드립니다.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: [W5500] SOCK_CLOSED 관련 문의 드립니다.
by Edward ·
안녕하세요.
정확한 오동작 발생 포인트를 알지 못하기 때문에 추정되는 원인을 잘 모르겠습니다…
정말 소켓이 CLOSE가 제대로 안된 것인지, 다른 무한루프에 빠져있는 것인지 정확한 문제 파악이 필요해 보입니다.
우선 요청하신 문의에 답을 드리자면,
저희가 제공드리는 ioLibrary 내부의 socket.c 함수를 참고하시면 close, disconnect함수가 있습니다.
이 함수 내부에 Sn_IR_TIMEOUT이 세팅되어 있기 때문에 이 값을 참고하시면 됩니다.
그리고 저희 W5500칩은 칩 내부적으로 Command 동작이 이루어져야 소켓 상태가 변경됩니다.
Sn_CR 레지스터를 이용하여 세팅을 하면 칩은 그걸 받아들여 최종적으로 세팅을 하게 됩니다.
그래서 인위적으로 SOCK_CLOSED(Socket open)상태로 가기 위해서는 반드시 socket을 강제적으로 종료하시는 방법을 사용하셔서(close,diconnet함수) 다시 Socket open형태로 가셔야 Socket listen(SOCK_INIT)으로 넘어갈 수 있습니다.
감사합니다.