WIZnet Developer Forum

W5200 Sending TCP packets one byte at a time

Hi all,
I have a strange behaviour on my application. It is based on a Olimex STM32 (arduino-like) board with a SEEED W5200 shield. This system works as a TCP client which connects to a device over which I have no control which works as a TCP server (non-Web).
I used to program my application with the Maple Leaflabs IDE, and it worked rather well, except for occasional communication errors (every few hours).
Since the Maple environment is obsolete, I moved to the Arduino environment, with a STM32 package to support my board.
My code is the same as far as the TCP communication. The Ethernet libraries have been ported to the new environment, without any significant change.
Now for the problem : the client sends commands to the server. Each command is a string which lenght goes from 3 to 32 characters. When compiled with the new environment, my application produces lots of communication errors that ruin any chance to operate properly.
I have analyzed the Ethernet traffic using Wireshark. Here is the thing I cannot explain.
Every command is sent with ONE ethernet frame for EACH character of the command. That is to say that the 32 character command is sent using 32 frames, which takes so much time that the server produces a timeout before the reception is complete.
I double checked : when compiled back using the Maple environment, each command is entirely contained in ONE frame.
I have thoroughly compared the files of the two versions of the library : no significant difference could be found; Same initialization words, same procedures for writing and reading data. The only difference can be the clock frequency of the SPI, but in any case, it is within the specification of the W8200.
What could happen?

Eventually I found the cause in another library, and the behaviour of the W5200 is not responsible for the problem I described. So please ignore this topic.
Thanks.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.