[Fuego] Board setup
Frank Rowand
frowand.list at gmail.com
Wed Apr 12 23:44:02 UTC 2017
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
More information about the Fuego
mailing list