TCP send issues
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 send issues
by lawrence WIZnet ·
Hello, Bill
There is the way to check if the send data is the same with the data in Tx memory with Sn_TX_RD and Sn_TX_WR.
When user write a data in Tx, the write pointer increases and user can check it with Sn_TX_WR.
When user send the data written in Tx, the send pointer increases until the write pointer and user can check it with Sn_TX_RD.
After ‘SEND’ is done, if it is all right, Sn_TX_WR and Sn_TX_RD will have the same pointer value.
I recommend you to check both register and compare.
If a part of the data sent, it will make a difference between both register.
Thank you,
lawrence
RE: TCP send issues
by cedric83 ·
I have the exact same problem here… Data is send correctly to W5200 but impossible to send a reply. SEND_OK signal is never set after I call the command SEND… I have the same socket configuration…
Bill, did you make any progress on your problem ?
UPDATE
As recommended, after executing the SEND command, my pointer RD and WR match, but the IRQ is never set and the data is not transmitted on the network…
RE: TCP send issues
by Eugeny ·
[quote=“wbasser”]I take the pointer (0x2B3C), mask it with 0x7FF and this then gets added to the TX base which for socket 0 is 0x8000. This is the address(0x833C) that is now sent in the command to transfer the data.
So in my case, I am writing 7 bytes.
I then send the send command
I than add 7 to the pointer and update it (0x2B43).[/quote]
Cedric, That seems to be wrong. You calculate absolute pointer to the data in the chip using WR pointer, then write those bytes you need to send sequentially to the TX buffer using calculated pointer, then increase WR pointer and only then issue SEND command.
The reason is that increasing WR pointer you create difference between RD and WR pointers which identify how many bytes to send.
If you do not increase pointer (WR=RD before you issue SEND) nothing should be sent.
RE: TCP send issues
by cedric83 ·
Hi Eugeny,
First of all thanks for your help. I was doing what you said but with no luck. I have WR and RD pointers are different before sending the command SEND… and actually remain different after calling SEND, which confirms that I never get the irq SEND_OK…
Here is a practical case:
I use socket 0, socket size 2K.
I am monitoring the TCP on wireshark and confirm that nothing is sent. However I manage to get a ping response from W5200. Thoughts ?
RE: TCP send issues
by Eugeny ·
When it happens please perform dump of all the registers (is it possible?) - all main registers and all socket registers.
What specifically to check (just first coming to my mind)
In general please ensure that during all of your operations no significant registers are being corrupt.
RE: TCP send issues
by cedric83 ·
I use a point to point connection with no router in between both computer and W5200 have static addresses.
I have not change the default MAC address of the W5200, should I ?
The picture attached show the communication from the computer to W5200. There is no reply back to the computer.
RE: TCP send issues
by Eugeny ·
So there’re two directly connected devices:
Correct?
Why W5200 device is having MAC address composed of all 0s? Which source and destination ports does W5200 device use?
RE: TCP send issues
by cedric83 ·
Yes, this is correct. I have changed the address MAC of the W5200 to be non-zero (00:08:dc:01:02:03). Now it shows Wiznet_01:02:03. But same problem persists.
The destination address used by the W5200 is 192.168.0.101 and gateway 192.168.0.1. The same gateway address is specified on the computer.
RE: TCP send issues
by cedric83 ·
I have noticed that the time when I get the last message (sa shown in screen capture) correspond to the RTR time value – which means the W5200 timeout right ? To me, it means that the W5200 gets the data but don’t interpret it as a correct TCP frame.
RE: TCP send issues
by cedric83 ·
Hi Eugeny,
I have dumped the data of the common register as you suggested. I have dumped from address 0x0000 to 0x0036.
dump unsigned int[54] 0x00000417@Data (Hex) 0x00000417@Data
MR: [0] unsigned int 0x0000 (Hex) 0x00000417@Data
GAR: [1] unsigned int 0x00C0 (Hex) 0x00000418@Data
[2] unsigned int 0x00A8 (Hex) 0x00000419@Data
[3] unsigned int 0x0000 (Hex) 0x0000041A@Data
[4] unsigned int 0x0001 (Hex) 0x0000041B@Data
SUBR: [5] unsigned int 0x00FF (Hex) 0x0000041C@Data
[6] unsigned int 0x00FF (Hex) 0x0000041D@Data
[7] unsigned int 0x00FF (Hex) 0x0000041E@Data
[8] unsigned int 0x0000 (Hex) 0x0000041F@Data
SHAR: [9] unsigned int 0x0000 (Hex) 0x00000420@Data
[10] unsigned int 0x0008 (Hex) 0x00000421@Data
[11] unsigned int 0x00DC (Hex) 0x00000422@Data
[12] unsigned int 0x0001 (Hex) 0x00000423@Data
[13] unsigned int 0x0002 (Hex) 0x00000424@Data
[14] unsigned int 0x0003 (Hex) 0x00000425@Data
SIPR: [15] unsigned int 0x00C0 (Hex) 0x00000426@Data
[16] unsigned int 0x00A8 (Hex) 0x00000427@Data
[17] unsigned int 0x0000 (Hex) 0x00000428@Data
[18] unsigned int 0x0002 (Hex) 0x00000429@Data
IR: [19] unsigned int 0x0000 (Hex) 0x0000042A@Data
IMR: [20] unsigned int 0x0000 (Hex) 0x0000042B@Data
RTR: [21] unsigned int 0x0000 (Hex) 0x0000042C@Data
[22] unsigned int 0x0001 (Hex) 0x0000042D@Data
RCR: [23] unsigned int 0x0000 (Hex) 0x0000042E@Data
[24] unsigned int 0x000A (Hex) 0x0000042F@Data
PATR: [27] unsigned int 0x0000 (Hex) 0x00000432@Data
[28] unsigned int 0x0000 (Hex) 0x00000433@Data
PPPALGO: [29] unsigned int 0x0000 (Hex) 0x00000434@Data
[30] unsigned int 0x0000 (Hex) 0x00000435@Data
VERSIONR: [31] unsigned int 0x0003 (Hex) 0x00000436@Data
Reserved: [32] unsigned int 0x0000 (Hex) 0x00000437@Data
[33] unsigned int 0x0000 (Hex) 0x00000438@Data
[34] unsigned int 0x0000 (Hex) 0x00000439@Data
[35] unsigned int 0x0000 (Hex) 0x0000043A@Data
[36] unsigned int 0x0000 (Hex) 0x0000043B@Data
[37] unsigned int 0x0000 (Hex) 0x0000043C@Data
[38] unsigned int 0x0000 (Hex) 0x0000043D@Data
[39] unsigned int 0x0000 (Hex) 0x0000043E@Data
PTIMER: [40] unsigned int 0x0028 (Hex) 0x0000043F@Data
PMAGIC: [41] unsigned int 0x0000 (Hex) 0x00000440@Data
INTLEVEL: [42] unsigned int 0x0000 (Hex) 0x00000441@Data
[43] unsigned int 0x0000 (Hex) 0x00000442@Data
Reserved: [44] unsigned int 0x0000 (Hex) 0x00000443@Data
[45] unsigned int 0x0000 (Hex) 0x00000444@Data
[46] unsigned int 0x0000 (Hex) 0x00000445@Data
[47] unsigned int 0x0000 (Hex) 0x00000446@Data
[48] unsigned int 0x0000 (Hex) 0x00000447@Data
[49] unsigned int 0x0000 (Hex) 0x00000448@Data
[50] unsigned int 0x0000 (Hex) 0x00000449@Data
IR2: [51] unsigned int 0x0000 (Hex) 0x0000044A@Data
PHYSTATUS: [52] unsigned int 0x0000 (Hex) 0x0000044B@Data
IMR2: [53] unsigned int 0x0027 (Hex) 0x0000044C@Data
irq union Sn_IR_REG {…} 0x00000416@Data
all unsigned int 0 0x00000416@Data
bit struct Sn_IR_REG_BITS {…} 0x00000416@Data
CON unsigned int : 1 0 0x00000416@Data bit 0
DISCON unsigned int : 1 0 0x00000416@Data bit 1
RECV unsigned int : 1 0 0x00000416@Data bit 2
TIMEOUT unsigned int : 1 0 0x00000416@Data bit 3
SEND_OK unsigned int : 1 0 0x00000416@Data bit 4
PNEXT unsigned int : 1 0 0x00000416@Data bit 5
PFAIL unsigned int : 1 0 0x00000416@Data bit 6
PRECV unsigned int : 1 0 0x00000416@Data bit 7
rsvd unsigned int : 8 0 0x00000416@Data bit 8-15
socket unsigned int 0 0x00000451@Data
tmp unsigned int 0 0x0000044D@Data
tsz unsigned int 62 0x00000450@Data
TxRdRing unsigned int 0x0383 (Hex) 0x0000044F@Data
TxRdRing2 unsigned int 6553 0x0000044E@Data