Date: Fri, 28 Nov 2014 17:05:31 -0800 From: Jesus Monroy <jessemonroy650@yahoo.com> To: usb@freebsd.org, Alfred Perlstein <alfred@freebsd.org> Cc: Hans Petter Selasky <hselasky@FreeBSD.org> Subject: Re: Question on ue devices autoconfigure versus Linux. Message-ID: <1417223131.59789.YahooMailBasic@web140503.mail.bf1.yahoo.com> In-Reply-To: <54791561.8080200@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred, I usually don't get the USB mailing list in my inbox. However, for some reason I fished this out of spam. Indicating to me I should answer this. THE ANSWER: Hot swapping has never been a strong point for BSD. Basically they think, "hot swapping" means, flip a mechanical switch, remove the device. They DON'T think like a USB device; which is "plug in and pull" - at will.=20 In the Linux world, there is an army of people that attack problems like this 'ad hoc'. The BSD community is far too formal to get it done in any reasonable time frame. In the Linux world, there are a host of "post-boot" solutions, such as systemd, busd, etc. They all generally trap an event, be it real (such as an IRQ), network, program, or user. This is usually leverage by /proc, dmesg or similar.=20 Hope this helps. FWIW: I'm living in El Paso Texas for the next 6 months. Best of Luck, Jesse -------------------------------------------- On Fri, 11/28/14, Alfred Perlstein <alfred@freebsd.org> wrote: Subject: Question on ue devices autoconfigure versus Linux. To: usb@freebsd.org Cc: "Hans Petter Selasky" <hselasky@FreeBSD.org> Date: Friday, November 28, 2014, 5:37 PM =20 Hello, =20 We have a widget here, basically a "beagleclone" that runs Linux. =20 When I plug it into an ubuntu host it shows up as: =20 usb0=A0 =A0 =A0 Link encap:Ethernet=A0 HWaddr 8a:18:9f:c4:a9:02 =A0 =A0 =A0 =A0 =A0=A0=A0inet addr:169.254.99.129=A0 Bcast:169.254.99.131=20 Mask:255.255.255.252 =A0 =A0 =A0 =A0 =A0=A0=A0inet6 addr: fe80::8818:9fff:fec4:a902/64 Scope:Link =A0 =A0 =A0 =A0 =A0=A0=A0UP BROADCAST RUNNING MULTICAST=A0 MTU:1500=A0 Metric:1 =A0 =A0 =A0 =A0 =A0=A0=A0RX packets:3 errors:0 dropped:0 overruns:0 frame:0 =A0 =A0 =A0 =A0 =A0=A0=A0TX packets:56 errors:0 dropped:0 overruns:0 carrier:0 =A0 =A0 =A0 =A0 =A0=A0=A0collisions:0 txqueuelen:1000 =A0 =A0 =A0 =A0 =A0=A0=A0RX bytes:626 (626.0 B)=A0 TX bytes:10727 (10.7 KB) =20 Requires no special setup. =20 However on a FreeBSD machine I need to do this: =20 USBDEV=3D$(shell dmesg | grep '^ugen.*LCD' | sed -E=20 's/^ugen([0-9]+\.[0-9]+).*/\1/') # target to make the device show up on freebsd. config-freebsd: =A0 =A0 =A0 =A0=A0=A0usbconfig -d $(USBDEV) set_config 1 =A0 =A0 =A0 =A0=A0=A0sleep 5 =A0 =A0 =A0 =A0=A0=A0ifconfig ue0 inet 169.254.99.129/24=A0 up =20 Basically I need to grep dmesg for "ugen" and the string "LCD", then I=20 need to run: =A0 usbconfig -d 3.3 set_config 1=A0 # (3.3 comes from dmesg) =A0 then.. =A0 ifconfig ue0 inet 169.254.99.129/24=A0 up =20 Any idea why Linux can do this all automagically but FreeBSD needs=20 manual help? =20 =20 I even tried putting some stuff into devd.conf, however devd doesn't=20 seem to the right thing if the device is plugged in at boot time. This=20 is because devd only seems to know when a device is plugged in, however=20 it doesn't trigger events when the device has been present since boot. =20 Any tips on this?=A0 We can get around this with some custom rc scripts,=20 but I was just wondering if FreeBSD could make it more plug and play. =20 thanks, -Alfred _______________________________________________ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1417223131.59789.YahooMailBasic>