All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Rowand <frowand.list@gmail.com>
To: monstr@monstr.eu, "Bird, Timothy" <Tim.Bird@sony.com>,
	"fuego@lists.linuxfoundation.org"
	<fuego@lists.linuxfoundation.org>
Subject: Re: [Fuego] Board setup
Date: Wed, 12 Apr 2017 16:44:02 -0700	[thread overview]
Message-ID: <58EEBBC2.5020403@gmail.com> (raw)
In-Reply-To: <b1efbd1e-abd4-116e-5537-54f3143b8044@monstr.eu>

On 04/12/17 02:22, Michal Simek wrote:
> On 11.4.2017 20:25, Bird, Timothy wrote:
>>> -----Original Message-----
>>> From: Michal Simek on Tuesday, April 11, 2017 2:18 AM

< snip >

>>> Also default docker is not supporting /dev/serial/* which is elegant way
>>> how to handle connecting to multiple boards connected to one PC.
>>>
>>> Because what you need to really do is to connect to board via this link
>>> SERIAL="/dev/serial/by-path/pci-0000:00:1d.0-usb-0:1.7.1.2.4.4:1.0-port0"
>>> instead of just
>>> SERIAL="/dev/ttyUSB10"
>>> which is changing all the time.
>>>
>>> Do you know what to do?
>> We have a separate "docker-create-container" script for handling ports
>> that docker needs permission to, and that can change dynamically
>> on the host at runtime.  It is called
>> docker-create-usb-privileged-container.sh, and it's in the fuego/fuego-host-scripts
>> directory.  It makes certain device nodes on the host available inside the target.
>>
>> I don't have experience with /dev/serial/by-path, but what this script
>> does is volume-mount certain directories from the host into the container filesystem.
>> Maybe it would work to add a line like the following to this script:
>>
>>    -v /dev/serial/by-path:/dev/serial/by-path \
>>
>> and use that script to create the container.
> 
> This is working but the problem is with sercp which reports
> ERROR: Port must be configured before it can be used.
> 
> sersh is fine with this serial setup
> 
> SERIAL="/dev/serial/by-path/pci-0000:00:1d.0-usb-0:1.7.1.2.4.4:1.0-port0"
> 
> Both are pointing to the same file that's why I expect that issue is there.
> 
> In serio.git there is
> 9daaf498e0fc4a086fd50e32c2edd3d7410d47ae
> 
> You have this in commit message.
>     You can _not_ use /dev/ttyACM0 for host1 and host2 because the '/'
>     before a ':' is how scp determines that you are trying to copy
>     a file with a ':' in the name instead of specifying a host name.
> 
> Frank: Can you please comment?

< snip >

The command line syntax of sercp is based on the command line syntax
of scp, so that sercp can (mostly) be a drop in replacement for scp.

From 'man scp':

     File names may contain a user and host specification to indicate that the
     file is to be copied to/from that host.  Local file names can be made
     explicit using absolute or relative pathnames to avoid scp treating file
     names containing ':' as host specifiers.

There is a slight impedence mismatch between scp and sercp since scp
refers to network hosts and sercp refers to serial devices.

Since '/' is not allowed in a sercp host name, sercp expects host to be a
serial device located in /dev/.

sersh also expects host to be a serial device located in /dev/. And
'sersh -h' documents host in this manner.  But the host parsing code
for sersh does not prefix the host name with '/dev/' if there are
any slashes in the host name.  Allowing a slash in a sersh host name
is an artifact that crept into sersh.  slash is not a valid character
in a host name and sersh should be updated to not allow the slash.

-Frank

  parent reply	other threads:[~2017-04-12 23:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11  9:17 [Fuego] Board setup Michal Simek
2017-04-11 18:25 ` Bird, Timothy
2017-04-12  9:22   ` Michal Simek
2017-04-12 18:01     ` Bird, Timothy
2017-04-12 20:42       ` Michal Simek
2017-04-12 23:44     ` Frank Rowand [this message]
2017-04-13  5:05       ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58EEBBC2.5020403@gmail.com \
    --to=frowand.list@gmail.com \
    --cc=Tim.Bird@sony.com \
    --cc=fuego@lists.linuxfoundation.org \
    --cc=monstr@monstr.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.