From owner-freebsd-usb@FreeBSD.ORG Fri Dec 7 17:43:41 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6770F16A418; Fri, 7 Dec 2007 17:43:41 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id 1367A13C45B; Fri, 7 Dec 2007 17:43:39 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [85.19.218.45] (account mc467741@c2i.net [85.19.218.45] verified) by mailfe01.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 699222083; Fri, 07 Dec 2007 18:43:37 +0100 From: Hans Petter Selasky To: "no@spam@mgedv.net" Date: Fri, 7 Dec 2007 18:44:12 +0100 User-Agent: KMail/1.9.7 References: <006701c8380d$e12ecc50$14b1a8c0@bstandard.lan> <200712062018.50262.hselasky@c2i.net> <001101c838b4$b7153bf0$14b1a8c0@bstandard.lan> In-Reply-To: <001101c838b4$b7153bf0$14b1a8c0@bstandard.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712071844.13529.hselasky@c2i.net> Cc: freebsd-questions@freebsd.org, freebsd-usb@freebsd.org Subject: Re: huawei e220 hsdpa on freebsd 6.3-BETA2 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 17:43:41 -0000 On Friday 07 December 2007, no@spam@mgedv.net wrote: > > Your HSDPA modem presented itself like a mass storage device, probably > > with > > some autorun and virus like drivers intended for the Windows operating > > system :-) > > unfortunately, this is the "intended" behaviour. this device has the > ability to present itself as "mass storage" which will show up as a > cd-rom device where the windows drivers are stored on. > > this is the way it works under windows: > - plug it in first time > - (auto)run the setup on the device for the win-driver > - as soon as the driver is loaded, the cd device disappears and a modem is > detected > > but when loading the ucom/ubsa stuff before umass, the device will > not be recognised as /dev/cdX and show up as a communication device > (ucom). > > of course there must be a way for getting the serial device working, > because this is one of the most sold umts/hsdpa modems across eu and > many people run it under linux as well (there are no drivers from > the vendor provided except windows and mac). > i'm pretty sure there is some "message" or anything else which will > render this device switching to serial mode. > there is some code, which i found (doesn't compile/run under freebsd) > which "puts" this device in pure serial mode. maybe someone out there > is able to tell me, how/if this can be done on freebsd as well? > (btw, i'm not a c-guru) > > do you (or anybody else reading this) have an idea, how to get this > device working and put it in serial mode "completely" ? > Hi, You can try the following test program and see what happens. You need to run it like super-user: #include #include #include #include #include #include #include int main(int argc, char **argv) { struct usb_ctl_request ucr = { /* zero */ }; int f; if (argc < 3) { printf("Usage: %s /dev/usb1 \n", argv[0]); return 1; } f = open(argv[1], O_RDWR); if (f < 0) { return 1; } ucr.ucr_addr = atoi(argv[2]); ucr.ucr_request.bmRequestType = 0; ucr.ucr_request.bRequest = 3; /* SET_FEATURE */ ucr.ucr_request.wValue[0] = 1; if (ioctl(f, USB_REQUEST, &ucr)) { printf("Error!\n"); } close (f); return 0; } Use "usbdevs -v" to get the parameters. Don't forget to load "umodem". If my program doesn't work, I suggest that you contact the manufacturer of your modem, and tell them the truth, that the device is a mass-storage device and that you want the money back! You paid for a modem, but got a mass-storage device. You can tell them that FreeBSD USB experts have looked at your device. There is no doubt about it that you've been fooled :-) --HPS HINT: HINT: Buy a HDSPA modem that comes with a CD-ROM. Then there is a greater chance that they did not put the drivers on the device itself.