[Bug 198019] [PATCH]: FreeBSD 10.1 fix for comms/telldus-core
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Feb 25 09:03:34 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198019
--- Comment #7 from johan at stromnet.se ---
I'm actually already doing that. The full script looks like this:
attach 10 {
device-name "uftdi[0-9]+";
match "vendor" "0x1781";
match "product" "0x0c30";
# Devd variable $bus and $devaddr ought to be what we want to identify
/dev/ugenN.N.
# Unfortunately devd overwrites $bus:
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198015
#
# Use this workaround instead.. Find device by serial and use that
device name. -B14 should be stable:
#
https://github.com/freebsd/freebsd/blob/master/usr.sbin/usbconfig/dump.c#L395
#
https://github.com/freebsd/freebsd/blob/master/lib/libusb/libusb20_desc.h#L220
#
# $ usbconfig dump_device_desc | grep $sernum -B14|grep ugen
# ugen0.2: <TellStick Telldus> at usbus0, cfg=0 md=HOST spd=FULL
(12Mbps) pwr=ON (90mA)
#
# Old command:
# action "chgrp dialer /dev/ugen$bus.$devaddr; chmod 660
/dev/ugen$bus.$devaddr;
action "dev=`usbconfig dump_device_desc | grep $sernum -B14|grep
ugen|cut -f1 -d':'`; chgrp dialer /dev/$$dev; chmod 660 /dev/$$dev;
/usr/local/sbin/tdadmin --pid $product --vid $vendor --serial
$sernum controller connect";
};
There is no $cdev variable provided. The event processed (same as reported in
ticket 198015):
Processing event '+uftdi0 at bus=0 hubaddr=1 port=3 devaddr=2 interface=0
vendor=0x1781 product=0x0c30 devclass=0x00 devsubclass=0x00 sernum="XXXXXX"
release=0x0600 mode=host intclass=0xff intsubclass=0xff intprotocol=0xff
ttyname=U0 ttyports=1 on uhub1'
Verified with:
action "echo cdev for $sernum is x $cdev x"
Output:
Executing 'echo cdev for XXXX is x x'
cdev for XXXX is x x
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list