[Fuego] Error while running a test on target connected to serial interface

dhinakar k dhinakar.k at gmail.com
Thu Jun 22 14:41:16 UTC 2017


Hi Tim,

I have changed both Fuego and Fuego-core next branch.
When I tried serlogin inside container, I get the below error (the board
has been powered on and kept).
'device reports readiness to read but returned no data (device disconnected)

If I connect to the board via minicom and manually login, close the
terminal and the run a test e.g. hello_test it works fine.
So it seems serlogin is not able to login automatically to the connected
board.

Regards,
Dhinakar

On Jun 14, 2017 9:52 AM, "dhinakar k" <dhinakar.k at gmail.com> wrote:

Hi Tim,

Thanks for your response.
Please see my comments inline.

Regards,
Dhinakar


On Jun 14, 2017 5:59 AM, "Bird, Timothy" <Tim.Bird at sony.com> wrote:



> -----Original Message-----
> From: dhinakar k on Monday, June 12, 2017 1:14 PM
> Update:
>
> I downloaded serlogin from https://GitHub.com/tbird20d/
> and copied it to the /usr/local/bin folder inside the container.

Very good!  Sorry you had to figure this out on your own.
It's in the Dockerfile in the next branch.  I'm guessing
you are still running with an older docker container (based
on v1.1).  We really should write a script to move test results
data from an old docker container to the next one, to avoid
people being reluctant to upgrade their containers.  Sorry
for the extra pain this has caused you.


#### No problems. Infact I moved 'fuego' also to 'next' branch but somehow
it is stuck at the last stage where it has to start the Jenkins ci server,
threw some error, I will reproduce and let you know the error in another
thread. So I couldn't try it out.


>
> But now I get 'could not open port ttyUSB0: [Error2]  No such file or
> directory:'ttyUSB0' even though it was available (I manually checked it)

It probably needs /dev/ttyUSB0, or there is a permission problem.
Did you build the docker container with 'docker-create-usb-privileged-
container.sh'?
Are you using
  SERIAL=ttyUSB0
or
  SERIAL=/dev/ttyUSB0
in your board file?

I think serlogin requires the latter format.  This needs to be documented.


###
Is using SERIAL=/dev/ttyUSB0
Permissions have been given to /dev/ttyUSB0 , so I think no issue there.

> At the prompt inside container I tried 'serlogin -d /dev/ttyUSB0 root'
but got
> 'warning: could not verify shell status' error. I manually checked on the
board
> via minicom, the shell was pointing to 'bash' shell.

To verify that we are sitting at a shell prompt, serlogin does the following
command:
ls /  | grep ^sb.*n

This does a directory listing of the root directory, then pipes the results
to grep, looking for the pattern '^sb.*n'.  If we're at a shell prompt and
we have a normal root filesystem that has /sbin as a directory, then
this should output '/sbin'.



#### ls /  | grep ^sb.*n on target board returns 'sbin'
I thought serlogin will login to target by itself? Should I keep my target
logged in? I think I have tried that as well...



So either 1) we're not really at a shell prompt where we can execute
commands
or 2) /sbin is missing, or 3) there is some permission problem doing 'ls
/', or
4) something is eating input so that serlogin is not seeing 'sbin' in the
response.

Can you execute the above command manually at your shell prompt, and see
if you see 'sbin' among the strings in the listing?  Also, make sure that
you do
not have a terminal on the serial port at the same time that fuego  (and
serlogin)
are trying to use the serial port to talk to the target board.

Let me know what you find out.

Thanks,
 -- Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/fuego/attachments/20170622/2167c87d/attachment.html>


More information about the Fuego mailing list