Lines 1-12
Link Here
|
1 |
--- tdadmin/freebsd-devd-tellstick.conf 2014-04-06 22:40:11.000000000 +0200 |
1 |
--- tdadmin/freebsd-devd-tellstick.conf 2014-04-06 22:40:11.000000000 +0200 |
2 |
+++ tdadmin/freebsd-devd-tellstick.conf 2014-04-06 20:37:50.501751596 +0200 |
2 |
+++ tdadmin/freebsd-devd-tellstick.conf 2014-04-06 20:37:50.501751596 +0200 |
3 |
@@ -0,0 +1,12 @@ |
3 |
@@ -0,0 +1,26 @@ |
4 |
+attach 10 { |
4 |
+attach 10 { |
5 |
+ device-name "uftdi[0-9]+"; |
5 |
+ device-name "uftdi[0-9]+"; |
6 |
+ match "vendor" "0x1781"; |
6 |
+ match "vendor" "0x1781"; |
7 |
+ match "product" "0x0c30"; |
7 |
+ match "product" "0x0c30"; |
8 |
+ |
8 |
+ |
9 |
+ action "chgrp dialer /dev/ugen$port.$devaddr; chmod 660 /dev/ugen$port.$devaddr; |
9 |
+ |
|
|
10 |
+ # Devd variable $bus and $devaddr ought to be what we want to identify /dev/ugenN.N. |
11 |
+ # Unfortunately devd overwrites $bus: |
12 |
+ # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198015 |
13 |
+ # |
14 |
+ # Use this workaround instead.. Find device by serial and use that device name. -B14 should be stable: |
15 |
+ # https://github.com/freebsd/freebsd/blob/master/usr.sbin/usbconfig/dump.c#L395 |
16 |
+ # https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb20_desc.h#L220 |
17 |
+ # |
18 |
+ # $ usbconfig dump_device_desc | grep $sernum -B14|grep ugen |
19 |
+ # ugen0.2: <TellStick Telldus> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) |
20 |
+ # |
21 |
+ # Old command: |
22 |
+ # action "chgrp dialer /dev/ugen$bus.$devaddr; chmod 660 /dev/ugen$bus.$devaddr; |
23 |
+ action "dev=`usbconfig dump_device_desc | grep $sernum -B14|grep ugen|cut -f1 -d':'`; chgrp dialer /dev/$$dev; chmod 660 /dev/$$dev; |
10 |
+ @CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect"; |
24 |
+ @CMAKE_INSTALL_PREFIX@/sbin/tdadmin --pid $product --vid $vendor --serial $sernum controller connect"; |
11 |
+}; |
25 |
+}; |
12 |
+ |
26 |
+ |