WIZ145SR internal buffer overwrite
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: WIZ145SR internal buffer overwrite
by jameskim ·
Hi,
I’m James from WIZnet and I’m a developer of WIZ145SR.
WIZ145SR did have some fault for handling data buffer by Ver1.4x.
Firmware ver 1.6.1 handle internal data buffer with strict separation.
I’ll look through my code deeply.
Please wait for a few days.
Thank you.
James.
RE: WIZ145SR internal buffer overwrite
by jameskim ·
Hello,
How about testing with the latest firmware and configuration tool which I uploaded last week?
Please refer to [url][Notice]Latest FW and Configuration Tool]
Thank you.
James
RE: WIZ145SR internal buffer overwrite
by fdkz ·
Hi,
I was not able to work on the wiznet hardware for the past few months, but I’m on it again. This time with another WIZ145SR device (firmware is 1.6.3), but the buf overwrite problem persists. I’ve written two simple python scripts to test it:
wiz_serial.py
[code]
import serial
import sys
PORT = “/dev/ttyUSB0”
BAUD = 115200
rxtx_period = 0.2
port = serial.Serial(PORT, BAUD, timeout=rxtx_period) # port 1 of the WZ145SR
count = 0
while 1:
# send “0001_abcdef…z\n”
tx = “%04i_” % count + ‘’.join([chr(i) for i in range(ord(“a”), ord(“z”) + 1)]) + “\n”
port.write(tx)
wiz_tcp.py
One scipt sends out lines with small letters, the other with capital letters. Both scripts print what they receive. By default, both scripts send out lines with 0.2 s period. The overwrite errors occur multiple times per minute and even with lower data rates.
Example of an error:
RE: WIZ145SR internal buffer overwrite
by jameskim ·
Hello,
I understood what your test environment is now.
Thank you.
I’ll test and examine your problem.
Please wait for a few days. I will come back and answer you soon.
Thank you.
James.
RE: WIZ145SR internal buffer overwrite
by jameskim ·
Hello,
I encountered the symptom which you mentioned during my test.
After debugging, I found what made this problem.
It came from buffer overlap as everyone can imagine.
I added temporary buffers to support telnet mode.
But I didn’t move serial buffer’s address and it made this problem.
I’m sorry that you suffer from my fault.
Please download and test the latest firmware, Ver 1.6.4 on [url][Notice]Latest FW and Configuration Tool]
If you have any problem, please leave a message here.
Thank you.
James.
RE: WIZ145SR internal buffer overwrite
by fdkz ·
Hi, no more errors with the new firmware. Thanks : )
RE: WIZ145SR internal buffer overwrite
by jameskim ·
I’m pleased to hear your good result.
Thank you.
James.
RE: WIZ145SR internal buffer overwrite
by fdkz ·
Hi,
Sorry to say but we’ve found some more errors. Right now there seem to be 3 separate problems.
Problem 1 demonstration scripts:
wiz_serial.py
[code]import logging
log = logging.getLogger(name)
logging.basicConfig(level=logging.NOTSET, format=“%(asctime)s: %(message)s”)
import time, serial
count = 0
port = serial.Serial(“/dev/tty.SLAB_USBtoUART”, 115200, timeout=0.01)
while 1:
tx = “%04i_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_%04i\n” % (count, count)
port.write(tx)
[/code]
wiz_tcp.py
[code]import logging
log = logging.getLogger(name)
logging.basicConfig(level=logging.NOTSET, format=“%(asctime)s: %(message)s”)
import time, socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((“192.168.2.46”, 50001))
count = 0
while 1:
#tx = “%04i_ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ_%04i\n” % (count, count)
#s.sendall(tx)
[/code]
Problem 1 log example:
2015-03-25 17:51:19,281: rx: '0231_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0231' 2015-03-25 17:51:19,386: rx: '\n0232_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0232' 2015-03-25 17:51:19,489: rx: '\n0233_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0233\n' 2015-03-25 17:51:19,593: rx: '0234_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0234\n' 2015-03-25 17:51:19,694: rx: '0235_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0235\n' 2015-03-25 17:51:19,795: rx: '0236_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0236\n' 2015-03-25 17:51:19,897: rx: '0237_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0237' 2015-03-25 17:51:20,003: rx: '\n0238_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrsqrstuvwxyz_0232\n0233_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0233\n0234_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0234\n0235_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0235\n0236_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0236\n0237_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0237\n0238_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0238\n' 2015-03-25 17:51:20,108: rx: '0239_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0239'Problem 2 demonstration scripts:
wiz_serial.py
[code]import logging
log = logging.getLogger(name)
logging.basicConfig(level=logging.NOTSET, format=“%(asctime)s: %(message)s”)
import time, serial
count = 0
port = serial.Serial(“/dev/tty.SLAB_USBtoUART”, 115200, timeout=0.01)
port.write(“=”*100000) # send a 100kB burst
while 1:
tx = “%04i_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_%04i\n” % (count, count)
port.write(tx)
[/code]
wiz_tcp.py
[code]import logging
log = logging.getLogger(name)
logging.basicConfig(level=logging.NOTSET, format=“%(asctime)s: %(message)s”)
import time, socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((“192.168.2.46”, 50001))
count = 0
while 1:
rx = s.recv(4096) # blocking read
if rx: log.info(“rx: %s”, repr(rx))
Problem 2 log example: (note that the “\n” comes one second late)
2015-03-25 17:41:18,261: rx: '00' 2015-03-25 17:41:18,274: rx: '09_abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz_0009' 2015-03-25 17:41:19,278: rx: '\n0'RE: WIZ145SR internal buffer overwrite
by jameskim ·
OK. I’ll check it again.
And I’ll wait for your detail captured log.
Thank you.
javakys.
RE: WIZ145SR internal buffer overwrite
by fdkz ·
Hi, at the moment it seems with very high probability that problem 3 is not a fault of wiznet, but my own problem. Problems 1 and 2 remain.
Good luck.