devd or devfs for ucom?

Roland Smith rsmith at xs4all.nl
Wed Jun 10 18:58:42 UTC 2009


On Wed, Jun 10, 2009 at 11:47:14AM -0700, Steve Franks wrote:
> On Wed, Jun 10, 2009 at 11:37 AM, Steve Franks<bahamasfranks at gmail.com> wrote:
> > I'm having trouble making my ucom devices public, following the
> > handbook (had it working on 7.0, but had a disk crash).
> >
> > So, should I be using devd.conf or devfs.rules?  They sure seem built
> > to do the same thing to me...
> >
> > Thanks,
> > Steve
> >
> 
> While I wouldn't mind an answer to that question, it's actually
> working; however, my program that uses libftdi & libusb to talk to my
> ugen still needs to run as sudo to see the device - but if I run chmod
> 666 /dev/* (which I'm sure is a bad idea), I don't need sudo; what
> device is required for libusb besides ugen?  The hub?

It will need access to /dev/usb*

My solution was to create a group called 'usb', adding my user-id as a
member, and set that as the group of /dev/usb*, with permissions 0660:

------- /etc/devfs.rules excerpt -------
[myrules=10]
add path 'uscanner*' mode 0660 group usb
add path 'usb*' mode 0660 group usb
add path 'ugen*' mode 0660 group usb
------- /etc/devfs.rules excerpt -------

------- /etc/rc.conf excerpt -------
# Set the default devfs ruleset.
devfs_system_ruleset="myrules"
------- /etc/rc.conf excerpt -------


Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090610/383b4767/attachment.pgp


More information about the freebsd-questions mailing list