>> On 20 Aug 2019, at 10:11, Milosz Wasilewski <milosz.wasilewski at linaro.org> wrote:

>>

>> On Tue, 30 Jul 2019 at 14:22, Tim Jaacks <tim.jaacks at garz-fricke.com> wrote:

>>>

>>> Hello everyone,

>>>

>>> I have the following entry in my lxc device dictionary:

>>>

>>> {% set static_info = [

>>>    {'board_id': 'FTXTBHMA'},

>>> ] %}

>>>

>>> This adds my USB-serial converter installed on the worker machine to the LXC. It appears correctly in the LXC:

>>>

>>> root at lxc-generic-remote-5937:~# ls -la /dev/ttyUSB*

>>> crw-r----- 1 root root 188,  0 Jul 30 13:15 /dev/ttyUSB0

>>> crw-r----- 1 root root 188,  1 Jul 30 13:15 /dev/ttyUSB1

>>> crw-r----- 1 root root 188,  2 Jul 30 13:15 /dev/ttyUSB2

>>> crw-r----- 1 root root 188,  3 Jul 30 13:15 /dev/ttyUSB3

>>>

>>> I cannot read from or write to it, though:

>>>

>>> root at lxc-generic-remote-5937:~# cat /dev/ttyUSB0

>>> cat: /dev/ttyUSB0: Operation not permitted

>>>

>>> This does not seem to be a permission issue in the LXC, it fails even if I set all permissions:

>>>

>>> root at lxc-generic-remote-5937:~# chmod a+rwx /dev/ttyUSB0

>>> root at lxc-generic-remote-5937:~# cat /dev/ttyUSB0

>>> cat: /dev/ttyUSB0: Operation not permitted

>>>

>>> Does anybody have an idea what is missing here?

>>

>> @Dave

>> Do we have any special 'passthrough' scripts for lxc? It works in case

>> of hikey-bl and x15-bl so I'm not sure what Tim might be missing.

> 

>I’m making the assumption that this is a permanently connected serial device, hence the ’static_info’ entry in the device dict. I’m also assuming that, before running up the lxc you can cat from the device?

 

Yes, it is a permanently connected serial device. And yes, I can access the device directly from the worker.

 

>If it’s *not* a permanent device you need to set the serial as:

> 

>{% set device_info = [{'board_id': 'FTXTBHMA'}] %}

> 

> 

>So that it is triggered to pass through when it becomes available to LAVA.

> 

>Also, reading it, you say this is set in your lxc device-dict? Is that a misunderstanding on my part? Usually that information goes in the DUT device-dict.

 

Yes, I set this in my LXC device dict, because the serial device is connected to the worker the LXC is running on. Is this wrong? When I add the line to my device DUT, the serial device is not added anywhere.

 

To make it clear: I am using this in a multinode scenario, where I have two devices:

 

1. the DUT

2. an LXC running on the LAVA worker

 

The USB end of the serial device I am trying to use it connected to the LAVA worker, the serial end is connected to the DUT.

With the static_info in the LXC dict, I can see the device nodes in the LXC. But I cannot read from or write to them.

 

>Other than that, if all else fails, I can set the same environment up here and see if I can duplicate it. Might take a while to get to it though.

> 

>Thanks

> 

>Dave

 

Mit freundlichen Grüßen / Best regards

Tim Jaacks
DEVELOPMENT ENGINEER
Garz & Fricke GmbH

Tempowerkring 2
21079 Hamburg

Direct: +49 40 791 899 - 55
Fax: +49 40 791899 - 39
tim.jaacks@garz-fricke.com
www.garz-fricke.com

WE MAKE IT YOURS!

Sitz der Gesellschaft: D-21079 Hamburg
Registergericht: Amtsgericht Hamburg, HRB 60514
Geschäftsführer: Matthias Fricke, Manfred Garz, Marc-Michael Braun