WIZ550SR data buffering at small gap between messages
Serial-to-Ethernet & ConfigTool
No replies yet. Be the first to reply.
Join the discussion.
Serial-to-Ethernet & ConfigTool
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: WIZ550SR data buffering at small gap between messages
by Ricky ·
Dear, PKalen
Both serial to ethernet and ethernet to serial process data by polling. In other words, data is delivered immediately. The cause of delay can occur when searching for AT command trigger code or when packing data. Disable At Command. And please do not use packing condition.
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
thank you for your answer. I checked my settings and tried a few things, however I still have that delay.
Here are my settings:
I logged the communication with Hterm. I used the Evaluation Board WIZ550SR EVB to monitor the data sent out via uart. Additionally I watched the transmitted data with a scope.
I made a minimal TCP Client Application running on my PC. I’m sending two bytes from “p0” counting up to “p9” and then again from “p0”…
Everything above 200ms it send out immidiatly. Below 200ms I have that delay/buffering.
Here are some Logs from Hterm:
Logs.zip (69,3 KB)
The AT commands and packing is disabled. Since I send out 2 Bytes I triedthe same with the Size 2 in Packing Conditions without any changes.
Are my settings correct? Is there anything else I could do?
RE: RE: WIZ550SR data buffering at small gap between messages
by Ricky ·
Dear, PKalen
As mentioned earlier, it polls the serial data and sends it to Ethernet. If the interval for sending serial data is short, serial data will continue to be generated while the module receives some serial data and sends it to Ethernet. This is the limit of the module. So we provide a function called serial data packing. If the serial you send has a certain rule, use that function. More information can be found at the link below.
https://wizwiki.net/wiki/doku.php?id=products:wiz550sr:wiz550sr_userguide_en
Your attempt to set and test the size to 2 is correct. Currently, there seems to be no other way.
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
again, thank you for your time helping me out.
I tried a lot of different settings:
with no changes…
The description of the packing conditions mentions UART to Ethernet all the time. But is this valid for the data the other direction (Ethernet to UART)?
Because I have this issue from Ethernet to UART, if I send data continiously from my PC (Client) to the Module (Server) every <200ms it does that buffering.
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
I got myself a WIZ850io, hooked it up to a STM32 NUCLEO board and
built my own TCP(server) to UART application to test the issue.
I used the ioLibrary (w550.c/h, socket.c/h and wizchip_conf.c/h).
First I had the same behavior. Everything send to the w5500 with less than 200ms
wouldn’t be send immidiatly.
I then searched anything indicating to that delay.
There is a define RTR in the w5500 header. The description says:
“And so the default timeout period is 200ms(100us X 2000). During the time configured by @ref RTR, W5500 waits for the peer response
to the packet that is transmitted by \ref Sn_CR (CONNECT, DISCON, CLOSE, SEND, SEND_MAC, SEND_KEEP command).”
If a socket has been opend, this timeout period will be used all the time. Except if the socket
is opened with “SF_TCP_NODELAY” as the socket flag parameter of the socket() function.
Checking the source code of the WIZ550SR the socked gets opend whith:
socket(sock, Sn_MR_TCP, net->local_port, SF_IO_NONBLOCK);
Therefor the timeout period is used.
Since I can measure the 200ms timeout I guess the WIZ550SR does not chnage the RTR value?!
With my test setup, before opening the socket with SF_NON_BLOCKING flag I set the timeout to 1 (=100µs).
The data will be sent out immidiatly (almost, 100µs delay is still there).
Changing the open socked parameters to (…, “SF_TCP_NODELAY”) without changeing the RTR value,
data will be send immidiatly. However the socket is no more non-blocking.
I’m not sure what will be the best setting for me (have to test this).
Since the socket open is hard-coded with SF_NON_BLOCKING, there is no option to change it to SF_TCP_NODELAY without changes to the firmware.
But is there a way to change the RTR value without changeing the firmware of the WIZ550SR?
RE: RE: WIZ550SR data buffering at small gap between messages
by Ricky ·
Dear, PKalen
no. There is not. The firmware needs to be changed.
As mentioned earlier, Both serial to ethernet and ethernet to serial process data by polling. data is delivered immediately. The speed of polling depends on processor capabilities.
I think the SF_TCP_NODELAY, RTR, RCR are not related to this problem. However, I will provide the changed firmware if necessary for your test.
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
if you could change the opening socket with SF_TCP_NODELAY so I can test it. This would be very helpful.
RE: RE: WIZ550SR data buffering at small gap between messages
by Ricky ·
Dear, PKalen
Sorry for the late reply.
Attach the modified version with the SF_TCP_NODELAY option.
Please check and notify the results.
WIZ550SR_App.bin (58.3 KB)
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
thank you for the firmware.
I don’t know if I have the time to test it this week. However I will notify you with the results.
RE: WIZ550SR data buffering at small gap between messages
by PKalen ·
Hello Ricky,
I flashed the module with your firmware.
After that the modul isn’t doing anything. No green led blinking, nor any reply from both serial interfaces.
Can I simply programm your binary with the ST tool? I did this with several moduls and firmware 1.1.7 and didn’t have any issue.
RE: RE: WIZ550SR data buffering at small gap between messages
by Ricky ·
Dear, PKalen
The attached .bin file should be uploaded using the configuration tool and tftp server.
Please refer to the link below.
https://wizwiki.net/wiki/doku.php?id=products:wiz550s2e:wiz550s2e_download
To upload using the st tool, please use WIZ550SR.hex in the attached file. app and boot are the combined files.
After upload if “input mac?” message appears, send a message like S0008DC123456.
WIZ550SR_Out.zip (231.4 KB)