WIZnet Developer Forum

WIZ107SR UDP garbled output

Hello,

We want to use the WIZ107SR in our product but we ran into some weird issues with the UDP functionality.

The problem: garbled message received.

Test #1

UDP packet size: 23 bytes

Data sent: ‘abcdefghijklmnopqrstuv\n’.

​ Received data:​

1 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)

166 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)
167 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)
168 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)
169 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)
170 received message: b’abcdefghijklmnopqrstuv\n’ from addr (‘10.195.141.55’, 50000)
171 received message: b’abrstuv\nabcdefghijklmno’ from addr (‘10.195.141.55’, 50000)
172 received message: b’pqpqrstuv\nabcdefghijklm’ from addr (‘10.195.141.55’, 50000)
173 received message: b’noopqrstuv\nabcdefghijkl’ from addr (‘10.195.141.55’, 50000)
174 received message: b’mnmnopqrstuv\nabcdefghij’ from addr (‘10.195.141.55’, 50000)
175 received message: b’kllmnopqrstuv\nabcdefghi’ from addr (‘10.195.141.55’, 50000)
176 received message: b’jkklmnopqrstuv\nabcdefgh’ from addr (‘10.195.141.55’, 50000)
177 received message: b’ijjklmnopqrstuv\nabcdefg’ from addr (‘10.195.141.55’, 50000)
178 received message: b’hiijklmnopqrstuv\nabcdef’ from addr (‘10.195.141.55’, 50000)
179 received message: b’ghhijklmnopqrstuv\nabcde’ from addr (‘10.195.141.55’, 50000)
180 received message: b’fghijklmnopqrstuv\nabcde’ from addr (‘10.195.141.55’, 50000)

1300 received message: b’fghijklmnopqrstuv\nabcde’ from addr (‘10.195.141.55’, 50000)

After a few messages, the content of the UDP packet is not longer valid (i.e. #171).

Firmware: 4.06 (tried firmware 4.05 but event the first messages were garbled).

Our serial implementation is already in production but we tripled checked it to make sure the issue is not on our end.

Test #2

UDP packet size: 10 bytes

Data sent: 'abcdefghi\n'.

1 received message: b’abcdefghi\n’ from addr (‘10.195.141.55’, 50000)

402 received message: b’abcdefghi\n’ from addr (‘10.195.141.55’, 50000)
403 received message: b’abcdefefgh’ from addr (‘10.195.141.55’, 50000)
404 received message: b’i\nabcdabcd’ from addr (‘10.195.141.55’, 50000)
405 received message: b’efghi\nabcd’ from addr (‘10.195.141.55’, 50000)
406 received message: b’efghi\n\nabc’ from addr (‘10.195.141.55’, 50000)
407 received message: b’defghiefgh’ from addr (‘10.195.141.55’, 50000)
408 received message: b’i\nabcdabcd’ from addr (‘10.195.141.55’, 50000)
409 received message: b’efghi\nabcd’ from addr (‘10.195.141.55’, 50000)
410 received message: b’efghi\n\nabc’ from addr (‘10.195.141.55’, 50000)
411 received message: b’defghi\nabc’ from addr (‘10.195.141.55’, 50000)

1664 received message: b’defghi\nabc’ from addr (‘10.195.141.55’, 50000)

Configs:

!

Test #3

Extra delay of 8 seconds before sending any data (we delay the initialization of our micro controller by 8000ms).

UDP packet size 23 bytes

We need to do further testing to see if this extra delay fixes the issue but it seems to be working at least for the first 20 minutes.

More updates:

We performed Test #3 (delay of 7 seconds before sending data).

It worked for a few hours but by morning the output was garbled again.

I tried the test under the following conditions.

  • Config Setting : same as yours
  • Data Size : 23byte
  • Data : abcdefghijklmnopqrstuv (last char is space)
  • Send Period : 100ms
  • Network : Company Switching Hub

The result is normal during about 1Mbyte transmission.

Please let us know your network environment.
Also, please use Wireshark to check if data is lost on the network. And send us the log.

And, Is there a way to check if your serial data is coming up normally?
The fact that you received UDP data from the peer means that it is the same packet that was sent from the Chip.

Please try to pack serial data by Time Packing instead of Data Size. You will then be able to see if the serial side data is normal or not.

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