Solved USB device inside a linux jail (devfs)

Hi! I'm having troubles trying to communicate to an USB device (usb2serial cable attached to a VantagePro2). It seems I'm not understanding how devfs works. This is the ruleset I created for the jail:

Code:
[devfsrules_jail_allow_usb=10]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path zfs unhide
add path 'ugen*' unhide
add path usb unhide
add path 'usb/*' unhide

The usb2serial cable is attached to the 1.2.0 port. For the communication I'm using a program (vproweather). This is the output I get when I try to connect:

vpro:/# vproweather -r /dev/usb/1.2.0
Code:
vproweather: Problem configuring serial device, check device name.: Inappropriate ioctl for device

I'm guessing I'm having a problem with permissions, but this is the only ruleset I've created that shows up the USB devices inside the jail, so I don't know what else to do.

I hope you guys can give me a hand, thanks in advance.
 
Are you sure /dev/usb/1.2.0 is the correct device? USB serial devices normally appear as e.g. /dev/ttyU0 and the error message indicates that you're using the wrong type of device.

If there is no such device make sure that the correct module for your usb2serial cable is loaded (e.g. uchcom(4) or uftdi(4))
 
I think diario292 is trying to do a "pass-through" and I'm not sure if that's ever going to work. Jails don't have their own kernel, even if it's a Linux jail. All jails run on the host's kernel.
 
I changed the devfs.rules so I can access ttyU0 inside the jail and it worked!
I was accessing the device /dev/usb/1.2.0 because of this dmesg output on the host:

Code:
ugen1.2: <Prolific Technology Inc.> at usbus1
uplcom0: <Prolific Technology Inc. USB-Serial Controller D, class 0/0, rev 1.10/4.00, addr 2> on usbus1

Thank you so much tobik!
 
Back
Top