Date: Fri, 28 Nov 2014 16:37:53 -0800 From: Alfred Perlstein <alfred@freebsd.org> To: usb@freebsd.org Cc: Hans Petter Selasky <hselasky@FreeBSD.org> Subject: Question on ue devices autoconfigure versus Linux. Message-ID: <54791561.8080200@freebsd.org>
next in thread | raw e-mail | index | archive | help
Hello, We have a widget here, basically a "beagleclone" that runs Linux. When I plug it into an ubuntu host it shows up as: usb0 Link encap:Ethernet HWaddr 8a:18:9f:c4:a9:02 inet addr:169.254.99.129 Bcast:169.254.99.131 Mask:255.255.255.252 inet6 addr: fe80::8818:9fff:fec4:a902/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:626 (626.0 B) TX bytes:10727 (10.7 KB) Requires no special setup. However on a FreeBSD machine I need to do this: USBDEV=$(shell dmesg | grep '^ugen.*LCD' | sed -E 's/^ugen([0-9]+\.[0-9]+).*/\1/') # target to make the device show up on freebsd. config-freebsd: usbconfig -d $(USBDEV) set_config 1 sleep 5 ifconfig ue0 inet 169.254.99.129/24 up Basically I need to grep dmesg for "ugen" and the string "LCD", then I need to run: usbconfig -d 3.3 set_config 1 # (3.3 comes from dmesg) then.. ifconfig ue0 inet 169.254.99.129/24 up Any idea why Linux can do this all automagically but FreeBSD needs manual help? I even tried putting some stuff into devd.conf, however devd doesn't seem to the right thing if the device is plugged in at boot time. This is because devd only seems to know when a device is plugged in, however it doesn't trigger events when the device has been present since boot. Any tips on this? We can get around this with some custom rc scripts, but I was just wondering if FreeBSD could make it more plug and play. thanks, -Alfred
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54791561.8080200>