device nodes in usb2 stack

Alexander Best alexbestms at math.uni-muenster.de
Thu Sep 10 10:09:27 UTC 2009


i was wondering why some device nodes appear as regular files under /dev (like
ulpt or da e.g.) and some don't?

if i attach my usb dongle device i get this dmesg output:

ugen1.2: <vendor 0x0a12> at usbus1
ubt0: <vendor 0x0a12 product 0x0001, class 224/1, rev 2.00/15.93, addr 2> on
usbus1

but no device node gets created under /dev. however the following lines i have
in my /etc/devd.conf work just as expected:

# When a USB Bluetooth dongle appears activate it
attach 100 {
        device-name "ubt[0-9]+";
        action "/etc/rc.d/bluetooth quietstart $device-name";
        action "/usr/local/bin/obexapp -r /var/spool/obex -s -C1";
};
detach 100 {
        device-name "ubt[0-9]+";
        action "/etc/rc.d/bluetooth quietstop $device-name";
        action "/usr/bin/killall obexapp";
};

the device works perfectly, but i'm still wondering why no device node gets
created in /dev. i always thought one of the main unix philosophies was:
"everything is a file!".

cheers.
alex


More information about the freebsd-questions mailing list