Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ttyUSB dialup devices in the toolbox #97

Closed
mildred opened this issue Mar 31, 2019 · 5 comments
Closed

Add ttyUSB dialup devices in the toolbox #97

mildred opened this issue Mar 31, 2019 · 5 comments

Comments

@mildred
Copy link

mildred commented Mar 31, 2019

Sometimes, in the toolbox, you need to access external hardware, either to communicate with an external device or flash a chip. Inside the toolbox, /dev/ttyUSB* is empty.
It would be nice if those devices were available. Possibly those devices can only appear after the toolbox has been entered. Perhaps sharing the entire /dev tree would not be that bad.

@debarshiray
Copy link
Member

I don't have any /dev/ttyUSB* on my host currently. I suppose those are just files under /dev, and not sub-directories, right?

I think we should look at bind mounting the entire /dev. @rhatdan warned me that PTYs could cause problems, and I haven't looked into that.

@mildred
Copy link
Author

mildred commented Apr 27, 2019

I don't have any /dev/ttyUSB* on my host currently. I suppose those are just files under /dev, and not sub-directories, right?

Yes, directly under /dev, and they appear dynamically (when you plug an USB serial device). I was convinced for no good reason that it was impossible to share /dev inside the toolbox, but if you do this at the toolbox creation, it works

@mildred
Copy link
Author

mildred commented Apr 27, 2019

With PR #119, if I manually chown the device to my user/group on the host, I can access it from within the toolbox.

However, if I make myself part of the dialup group (the ttyUSB0 device is owned by root:dialup), the device appears as nobody:nobody in the toolbox and is inaccessible although it's accessible on the host.

@thawkins
Copy link

You should also support /dev/ttyACMx style devices too, they are often used for arduino, cnc, laser engraver and 3d Printer connections.

@debarshiray
Copy link
Member

Now that PR #119 has been merged, this issue can be closed.

You should also support /dev/ttyACMx style devices too, they are often
used for arduino, cnc, laser engraver and 3d Printer connections.

New toolbox containers will have the entire /dev bind mounted from the host. So barring permission problems arising out of the files not being world accessible, things should be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants