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@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@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@lxc-generic-remote-5937:~# chmod a+rwx /dev/ttyUSB0 root@lxc-generic-remote-5937:~# cat /dev/ttyUSB0 cat: /dev/ttyUSB0: Operation not permitted
Does anybody have an idea what is missing here?
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
No ideas on this one?
-----Ursprüngliche Nachricht----- Von: Lava-users lava-users-bounces@lists.lavasoftware.org Im Auftrag von Tim Jaacks Gesendet: Dienstag, 30. Juli 2019 15:22 An: 'lava-users@lists.lavasoftware.org' lava-users@lists.lavasoftware.org Betreff: [Lava-users] Accessing physical worker devices from LXC
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@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@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@lxc-generic-remote-5937:~# chmod a+rwx /dev/ttyUSB0 root@lxc-generic-remote-5937:~# cat /dev/ttyUSB0 cat: /dev/ttyUSB0: Operation not permitted
Does anybody have an idea what is missing here?
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
_______________________________________________ Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
On Tue, 30 Jul 2019 at 14:22, Tim Jaacks tim.jaacks@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@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@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@lxc-generic-remote-5937:~# chmod a+rwx /dev/ttyUSB0 root@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.
milosz
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
Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
On 20 Aug 2019, at 10:11, Milosz Wasilewski milosz.wasilewski@linaro.org wrote:
On Tue, 30 Jul 2019 at 14:22, Tim Jaacks tim.jaacks@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@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@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@lxc-generic-remote-5937:~# chmod a+rwx /dev/ttyUSB0 root@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?
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.
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
milosz
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
Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
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.comhttp://www.garz-fricke.com/ WE MAKE IT YOURS! [cid:image001.jpg@01D55C14.40316D20] Sitz der Gesellschaft: D-21079 Hamburg Registergericht: Amtsgericht Hamburg, HRB 60514 Geschäftsführer: Matthias Fricke, Manfred Garz, Marc-Michael Braun
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:
- the DUT
- 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.
OK, I found out that this is only true if I am connected to the LXC via SSH (using a hacking session). When I connect to the LXC from the worker via lxc-attach, then reading and writing works correctly. Why is this a difference? In both cases, the login prompt looks like this:
root@lxc-generic-remote-6967:/#
And “whoami” returns “root”. So why is reading and writing not permitted when I am connected via SSH?
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
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.comhttp://www.garz-fricke.com/ WE MAKE IT YOURS! [cid:image001.jpg@01D55C28.57F0BE20] Sitz der Gesellschaft: D-21079 Hamburg Registergericht: Amtsgericht Hamburg, HRB 60514 Geschäftsführer: Matthias Fricke, Manfred Garz, Marc-Michael Braun
lava-users@lists.lavasoftware.org