Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2009 12:09:24 +0200 (CEST)
From:      Alexander Best <alexbestms@math.uni-muenster.de>
To:        <freebsd-questions@FreeBSD.org>
Subject:   device nodes in usb2 stack
Message-ID:  <permail-20090910100924f7e55a9d0000147f-a_best01@message-id.uni-muenster.de>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?permail-20090910100924f7e55a9d0000147f-a_best01>