From owner-freebsd-usb@FreeBSD.ORG Sat Nov 29 01:05:33 2014 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53C21E93 for ; Sat, 29 Nov 2014 01:05:33 +0000 (UTC) Received: from nm39-vm1.bullet.mail.bf1.yahoo.com (nm39-vm1.bullet.mail.bf1.yahoo.com [72.30.239.145]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A8A4C77 for ; Sat, 29 Nov 2014 01:05:32 +0000 (UTC) Received: from [98.139.212.150] by nm39.bullet.mail.bf1.yahoo.com with NNFMP; 29 Nov 2014 01:05:31 -0000 Received: from [98.139.212.201] by tm7.bullet.mail.bf1.yahoo.com with NNFMP; 29 Nov 2014 01:05:31 -0000 Received: from [127.0.0.1] by omp1010.mail.bf1.yahoo.com with NNFMP; 29 Nov 2014 01:05:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 608807.10588.bm@omp1010.mail.bf1.yahoo.com Received: (qmail 84319 invoked by uid 60001); 29 Nov 2014 01:05:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1417223131; bh=1J8OFvFPD9rmaPVbiK5VKT6fp8BzcVS8rDRrqFHORMQ=; h=Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ewaWemwxEpFOGgjsURifZ42sMXQK1jxSP0zjrK06s3DqPnDhtqj2eJAP5KdXALP3l7yJ3AVMS4/pmQsKPzUm6gsARKJUQMI5JxST69LnpQhVNu7J6yY4hXR8/b2iqixwHA+dk9hukVanSt6hufukJatn22pn8Js+ccKC0uIiits= X-YMail-OSG: vTzeA_0VM1nUcMaaiC5otcOvaeu5fIwzPDzMEfY5VEovfoo E.ZXzoITgewS_EcX9NcDZvqP_RAunm6pqnJ.QGlmsn_Pu5xZ9.D5l7.P3VCg OXdpv5VnCOJUfN1uPoYyEDINCJZ8oR06C0h7cJZVbZuJv10k_wxWNOa5EBdF 2yep9KguR8beIiNfetvQUWV.A.yRJxhHEu9x.Cv2ZwhI3Uphkw1qhsR4Fv4. IIc3tuty1VxTqbk9Yp_vfKqvjXpek4UOuzzDAnhQxSBmXUgKc4rJwik1X.dX k3KwtaAahmMHMTF6VpLq7wzNozY6vBOOBKtBv3Lfw86IbTM.RxzjYf1SX3Dw AxJtS_ak9Ybj9BNFznQuhtPpJGF.V_SlLzPSlMMNFN_1oVmVVozULz0ik13U eNbAHyR8uSvL75amczGvLhTZHYXrEok0RlACxEWEa7LdUcjwto7OVCeRHvzw 42PfxqxrQINDtyDfflHVW18tcyj6jrIL6xpn4P1SlMZy0icE3QWHZEOE34wN GZyzFrEV_32yxRvs2drgSiNohywAycwuQ64AuFxErcW8ex1AaKTsgAjeAen8 zNRqVOAgqRqGpdniaYtkKSYFB_0HpwEUUx3MLoshtRZqNBgDYDhBINmKUS3W HewwZqA-- Received: from [64.134.30.226] by web140503.mail.bf1.yahoo.com via HTTP; Fri, 28 Nov 2014 17:05:31 PST X-Rocket-MIMEInfo: 002.001, QWxmcmVkLA0KSSB1c3VhbGx5IGRvbid0IGdldCB0aGUgVVNCIG1haWxpbmcgbGlzdCBpbiBteSBpbmJveC4gSG93ZXZlciwNCmZvciBzb21lIHJlYXNvbiBJIGZpc2hlZCB0aGlzIG91dCBvZiBzcGFtLiBJbmRpY2F0aW5nIHRvIG1lDQpJIHNob3VsZCBhbnN3ZXIgdGhpcy4NCg0KVEhFIEFOU1dFUjoNCg0KSG90IHN3YXBwaW5nIGhhcyBuZXZlciBiZWVuIGEgc3Ryb25nIHBvaW50IGZvciBCU0QuDQpCYXNpY2FsbHkgdGhleSB0aGluaywgImhvdCBzd2FwcGluZyIgbWVhbnMsIGZsaXAgYQ0KbWVjaGFuaWNhbCABMAEBAQE- X-Mailer: YahooMailClassic/858 YahooMailWebService/0.8.203.740 Message-ID: <1417223131.59789.YahooMailBasic@web140503.mail.bf1.yahoo.com> Date: Fri, 28 Nov 2014 17:05:31 -0800 From: Jesus Monroy Subject: Re: Question on ue devices autoconfigure versus Linux. To: usb@freebsd.org, Alfred Perlstein In-Reply-To: <54791561.8080200@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Hans Petter Selasky X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2014 01:05:33 -0000 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 wrote: Subject: Question on ue devices autoconfigure versus Linux. To: usb@freebsd.org Cc: "Hans Petter Selasky" 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"