From owner-freebsd-mobile@FreeBSD.ORG Sun Sep 2 08:10:20 2007 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A7416A417 for ; Sun, 2 Sep 2007 08:10:20 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by mx1.freebsd.org (Postfix) with ESMTP id 7FC0113C45A for ; Sun, 2 Sep 2007 08:10:19 +0000 (UTC) (envelope-from rpaulo@fnop.net) Received: from core.fnop.net (mx.fnop.net [82.102.11.82]) by core.fnop.net (Postfix) with ESMTP id 85CB8691133; Sat, 1 Sep 2007 18:38:18 +0100 (WEST) Received: by core.fnop.net (Postfix, from userid 1015) id 4527969114E; Sat, 1 Sep 2007 18:38:18 +0100 (WEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on core.fnop.net X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from epsilon.local (62.169.117.244.rev.optimus.pt [62.169.117.244]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by core.fnop.net (Postfix) with ESMTP id BEFDD691133; Sat, 1 Sep 2007 18:38:14 +0100 (WEST) Message-ID: <46D9A266.8080508@fnop.net> Date: Sat, 01 Sep 2007 18:33:26 +0100 From: Rui Paulo User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Peter Schuller References: <200708311820.08340.peter.schuller@infidyne.com> <200708312056.12233.peter.schuller@infidyne.com> In-Reply-To: <200708312056.12233.peter.schuller@infidyne.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-mobile@freebsd.org Subject: Re: Option HSDPA USB dongle and mode switching X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2007 08:10:20 -0000 Peter Schuller wrote: >> % gcc -L/usr/local/lib -lusb -lusbpp -I/usr/local/include -o ttt >> icon_switch.c prometheus:/tmp(1) >> >> /var/tmp//ccCnzzjn.o(.text+0x26e): In function `main': >> : undefined reference to `usb_get_driver_np' >> >> /var/tmp//ccCnzzjn.o(.text+0x2a7): In function `main': >> : undefined reference to `usb_detach_kernel_driver_np' >> >> Would anyone know of a way to make such USB dongles work, other than >> properly looking into this stuff and making the necessary code changes? > > Simply eliminating the driver attach/detach attemps makes the tool compile and > run, though it complains that it cannot find the device (even though the > product/vendor matches the config file). I guess it's not visible to the API > when the driver is attached or some such. Yes, unfortunately, libusb in *BSD doesn't work correctly regarding to device matching. Your best try is to mimic the libusb calls in icon_switch.c to change the device and then do the matching on your own. I wrote a similar utility for switching Bluetooth devices. Maybe this helps you: http://fnop.net/~rpaulo/priv/freebsd/ubthidctl.tgz Regards. -- Rui Paulo From owner-freebsd-mobile@FreeBSD.ORG Wed Sep 5 19:37:22 2007 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D340016A46B for ; Wed, 5 Sep 2007 19:37:22 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from proxy1.bredband.net (proxy1.bredband.net [195.54.101.71]) by mx1.freebsd.org (Postfix) with ESMTP id 905B313C47E for ; Wed, 5 Sep 2007 19:37:22 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from prometheus.scode.org (85.229.22.84) by proxy1.bredband.net (7.3.127) id 46DEA0570001F4CF; Wed, 5 Sep 2007 21:37:07 +0200 Received: from localhost (localhost [127.0.0.1]) by prometheus.scode.org (Postfix) with ESMTP id B3E8B1CC7B; Wed, 5 Sep 2007 21:37:32 +0200 (CEST) From: Peter Schuller To: Rui Paulo Date: Wed, 5 Sep 2007 21:37:12 +0200 User-Agent: KMail/1.9.7 References: <200708311820.08340.peter.schuller@infidyne.com> <200708312056.12233.peter.schuller@infidyne.com> <46D9A266.8080508@fnop.net> In-Reply-To: <46D9A266.8080508@fnop.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709052137.12355.peter.schuller@infidyne.com> Cc: freebsd-mobile@freebsd.org Subject: Re: Option HSDPA USB dongle and mode switching X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2007 19:37:22 -0000 > Yes, unfortunately, libusb in *BSD doesn't work correctly regarding to > device matching. > Your best try is to mimic the libusb calls in icon_switch.c to change > the device and then do the matching on your own. > > I wrote a similar utility for switching Bluetooth devices. Maybe this > helps you: > http://fnop.net/~rpaulo/priv/freebsd/ubthidctl.tgz Thanks a lot! ubthidctl should help a lot since I've never written USB related software before. If I get it working I'll post here for the archives. -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org