Skip to content

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 <tim.bird@sony.com>
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 <tim.bird@sony.com>
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 <tim.bird@sony.com>
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 <tim.bird@am.sony.com>
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