Invalid socket status for socket operation
MCU & Boards
No replies yet. Be the first to reply.
Join the discussion.
MCU & Boards
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: Invalid socket status for socket operation
by justinkim ·
SOCKERR_SOCKSTATUS를 return 할 경우는 send 함수내용을 보면 알 수 있습니다.
getSn_SR로 상태를 읽어왔는데 ESTABLISHED와 CLOSE_WAIT 상태가 모두 아닐경우 ERR를 리턴합니다.
현재 Sn_SR 상태값을 읽어 보시기 바랍니다.
client 쪽에서 ack가 늦게와서 timeout이 나는 것은 아닌지요?
firmware와 패킷을 다시한번 확인 해보시기바랍니다.
그리고 이어지는 질문은 하나의 게시물로 reply 부탁드립니다.
RE: Invalid socket status for socket operation
by lancia02 ·
정상적으로 서버와 클라이언트가 통신이 이뤄지고, 뜬금없이 Send에서 SOCKERR_SOCKSTATUS를 리턴합니다.
혹시,
getSn_TX_FSR()
getSn_SR()
wiz_send_data() 와 같은 함수들 중간에 인터럽트(UART Recv, Timer)가 걸리면 예상치 못한 오류가 발생하나요?
현재 Send()함수를 Main에서 돌아가고있고, Uart, Timer 인터럽트 사용중입니다.
RE: Invalid socket status for socket operation
by justinkim ·
저도 잘 이해가안되네요
W7500이 server라고 하셨는데 최초의 패킷은 client가 보내는것인가요?
동작과정을 다시 설명해주시면 감사하겠습니다
같은방법으로 test 해보려고 합니다.
괜찮으시면 올리신 firmware를 justinkim@wiznet.io로 보내주시면 그걸로 test해보겠습니다.
RE: Invalid socket status for socket operation
by lancia02 ·
동작과정
혹시 send()함수 실행중에, 다른 인터럽트가 발생하면 문제가 발생할 확률이 있나요?
그외의 문제 발생원인들이 없는것으로 보여서, 질문드립니다…
클라이언트는 w7500에 접속만 하고 특별한 일이 없는 한, 서버에서 주로 데이터를 보냅니다.
메일로 펌웨어 보냅니다.
RE: Invalid socket status for socket operation
by lancia02 ·
Send()함수 호출전에 getSn_TX_FSR()로 내부 버퍼 가용 공간 확인결과,
평상시엔 0x800(2048)로 보내면 바로바로 돌아갑니다.
그러다가 어느순간 버퍼 메모리가 처리가 안되고, 계속 쌓여서 메모리 공간이 줄어듭니다.
클라이언트에서는 정상적으로 ack를 보내는데 버퍼에 메모리가 쌓이는 다른 원인이 있나요?
RE: Invalid socket status for socket operation
by justinkim ·
server부문만 참고하여 현재 server에서 60ms마다 client로 data 보내는 test 중입니다.
1시간이 지났지만 아직까지 연결이 끊어지지않습니다.
최초에 client 쪽에서는 connect만 하나요?? 종료시에 client에서 rst packet을 보낸다지 하지 않나요??
getSn_SR()함수에서 1~3초가 머문다고 하셨는데 그 상황에 interrup가 발생하여 3초간 다른 일을 하지 않는다면 그럴일이 없을 것 같습니다.
만약 timeout으로 close가 되는 상황이라면 RTR 값을 조정하여 timeout 시간을 늘리면 될 텐데 현재 상황으로 봐서는 RST 패킷을 받아 connection이 끊어지는 것으로 보여집니다.