Created
March 30, 2019 12:31
-
-
Save sjas/36ef19a5ff31a047ee464dd724c87dd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10:15 <SoulRaven> i have this usb passthru | |
10:15 <SoulRaven> https://pastebin.com/8xrB1BTr | |
lxc.cgroup.devices.allow: c 189:* rwm | |
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file | |
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file10:15 | |
10:16 <SoulRaven> for a serial to usb converor | |
10:16 <SoulRaven> but i can't get it working right | |
10:16 <SoulRaven> when i do on cat: can't open '/dev/ttyUSB0': Operation not permitted | |
10:16 <SoulRaven> and also not working on ser2net | |
10:17 <SoulRaven> or someting similar | |
10:17 <SoulRaven> i have try with alpine and debian | |
10:17 <SoulRaven> and nothing | |
10:17 <SoulRaven> permissions are ok | |
10:17 <SoulRaven> root:dialout | |
10:17 <SoulRaven> 666 on /dev/ttyUSB0 | |
10:17 <SoulRaven> i am missing something? | |
11:35 <@sjas> crw-rw---- 1 root dialout 188, 0 2019-03-17 15:46 /dev/ttyUSB0 | |
11:36 <@sjas> is how the device looks for me | |
11:36 <@sjas> which i can use via | |
11:36 <@sjas> sudo screen /dev/ttyUSB0 9600 | |
11:36 <@sjas> or whatever bitrate | |
11:56 <@sjas> will try this with my own setup, i may need this eventually myself, never did such stuff with LXC | |
13:03 <@sjas> SoulRaven: i might have a solution for your problem | |
13:23 <@sjas> scratch that, i have your solution: | |
13:24 <@sjas> lxc.cgroup.devices.allow = c 188:0 rw | |
13:24 <@sjas> lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file | |
13:26 <@sjas> dont pass the usb device directly like /dev/bus/usb/... , dont chmod around on the host or the vm, absolutely omit the leading slash so the mountpoint in the container is relative (is a must) | |
13:27 <@sjas> lxc.cgroup.devices.allow is for /dev/ttyUSB0, not /dev/bus/usb/.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment