Access USB Serial Device In Jail

Joined
May 2, 2017
Messages
211
So I have USB serial device (Zigbee Controller) that is known to work in Home Assistant. I have this running in a jail, and I need to know how to access it in the jail?

I tried
Code:
ls /dev/ttyUSB*
but I get "No match". I need to know the path to the device to configure it.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
If it is supported by the standard FreeBSD USB serial drivers, it will appear as /dev/cuaU*. Access to that inside a jail might require devfs settings.
 
Joined
May 2, 2017
Messages
211
Can you help out with the devfs settings? Not sure what you're referring to. When I run ls /dev/cuaU* I get the same result. ls: No match.
 
Joined
May 2, 2017
Messages
211
No. Can't figure out the path to the device...
 

droeders

Contributor
Joined
Mar 21, 2016
Messages
179
@Steven Wormuth : I think @wblock was suggesting that you need to enable a few options in your jail to get devices populated under /dev.

Looking at the 11.2 documentation, I think you need the following settings for your jail:
- allow_mount
- allow_mount_devfs
- enforce_statfs - set to 0 or 1
- mount_devfs

If you enable these options, I would expect that /dev would be populated, and hopefully with the /dev/cuaU* devices for your USB to serial converter.

Here's where I found the jail options:

https://www.ixsystems.com/documentation/freenas/11.2/jails.html
 
Joined
May 2, 2017
Messages
211
Put those options into the jail. Still haven't figured out how to access it though. Haven't really had time, so I'll post back once I tinker more. Thanks for the help!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,694
Do you find the device on the host under /dev/cuaU... ?

Perhaps just do ls on /dev/ and see what you can see there.

Then the changes you made to devfs should make whatever the device is available in the jail.
 
Top