TCP client error - hang-out at function ret = recv(sn,buf,size) ;
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: TCP client error - hang-out at function ret = recv(sn,buf,size) ;
by Eugeny ·
Anh Tuan, please modify code a little to capture value of the getSn_CR(sn). Let’s say, display it in binary format on LED row or in any other way independent from W5100 communication channels.
If we will know the value W5100 gets stuck in, we may have an idea about what is going on.
In general under normal circumstances when processor issues command to W5100 and reads command register back, it should read non-zero value; when W5100 completes command it was instructed to perform, command register’s value becomes 0. In your case, for some reason, it does not happen.
RE: TCP client error - hang-out at function ret = recv(sn,buf,size) ;
by tuanken92 ·
Hello Eugeny, thanks for reply!
In case MCU was hang, the value of function [color=#FF0000]getSn_CR(sn);[/color] is 255, so it can not escape [color=#FF0000]while(getSn_CR(sn));[/color]
Could you give me some solution, thanks you!
RE: TCP client error - hang-out at function ret = recv(sn,buf,size) ;
by Eugeny ·
IMHO it is not normal, W5100 gets stuck somewhere, and does not respond to queries.
Let’s check the process first: as I understand you use several HTTP sessions to communicate, thus one of the separate sessions hangs. Can you elaborate on which stage this connection hangs - on you opening connection (command 01), you establishing connection (command 04), you sending anything (command 20), on listening (02), on receiving (40)? In other words, which command you write to W5100 after which it starts responding with FF, and which commands precede this command?
RE: TCP client error - hang-out at function ret = recv(sn,buf,size) ;
by tuanken92 ·
Thanks for your help, Eugeny!
I’ll try carefully consider