Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Here are some bugfixes, and a few features for serio #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tbird20d
Copy link
Contributor

@tbird20d tbird20d commented Feb 1, 2017

Hey Frank,

Here are a few bugfixes and new features for serio.
The most important of these is f57c90a to read the prompt after each transmitted line.
It works for me here, but I would appreciate it if you could give it a test on your system.
This significantly reduces hangs during putfile on my setup here.

Thanks,
-- Tim

Tim Bird added 5 commits February 1, 2017 13:26
This will set a timeout for read operations on the serial port.
The intention is to prevent serio from hanging in certain situations.

Signed-off-by: Tim Bird <[email protected]>
The data needs to be accumulated in this routine, when used with
the 'count' option.  Without this fix the routine only returns
one byte of data (the last byte read).

Signed-off-by: Tim Bird <[email protected]>
Don't use self.serial (even though it's available), but use
self.fp, as that's consistent with the rest of the code.
The prevents data overruns when doing putfile on
my setup, with io_time=0.

This is faster (and likely more robust) than
using io_time as a delay, but still prevents
overruns on the target, when doing a putfile.

Performance to put a 10000-byte file is:
 -P (io_time 0.1) => 41 seconds
 -t 0.05 (io_time 0.05) => 21 seconds
 waiting for prompt, but using io_time=0 => 7 seconds

With io_time=0 and no wait for the prompt, serio hangs
with the target stuck at the secondary shell prompt
on my setup (beaglebone black, connected via Sony
debug board).  The target misses some of the data,
and since it is in the middle of an echo of quoted
material, the second quote is missed.

Signed-off-by: Tim Bird <[email protected]>
This prints a time-stamped line for most of the interactions
with the target.  This is handy to see what gets sent to the
target, and when it is sent.  It's very verbose, and can only
be turned on by changing the definition of "debug" in the source.

To turn it on, change the line to "debug = 1".

Signed-off-by: Tim Bird <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant