Date: Sat, 15 Dec 2007 23:55:14 +1100 From: Edwin Groothuis <edwin@mavetju.org> To: freebsd-usb@freebsd.org Subject: Re: Huawei E220 USB modem Message-ID: <20071215125514.GA33989@k7.mavetju> In-Reply-To: <20071214101131.GA80383@k7.mavetju>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 14, 2007 at 09:11:31PM +1100, Edwin Groothuis wrote: > On Fri, Dec 14, 2007 at 03:35:36PM +1100, Edwin Groothuis wrote: > > > > See http://www.mavetju.org/weblog/html/00192.html for a full write-up. > > See http://www.freebsd.org/cgi/query-pr.cgi?pr=118686 for a PR to > get it in the system. Believe it or not, but that "I need to take it out and in again" annoyed the hell out of me. Specially after seeing that this program: http://lists.freebsd.org/pipermail/freebsd-questions/2007-December/164404.html with the parameters: "/dev/usb0 2" caused the modem to be detected without a problem. I admit it still threw an error according to the program, but the logfiles showed that the modem was there. And working. In ubsa.c that must be: --- ubsa.c.orig Sat Dec 15 22:36:22 2007 +++ ubsa.c Sat Dec 15 23:39:07 2007 @@ -383,6 +383,23 @@ printf("%s: Could not find interrupt in\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; + + if (uaa->vendor == USB_VENDOR_HUAWEI && + uaa->product == USB_PRODUCT_HUAWEI_E220) { + + usb_device_request_t req; + usbd_status err; + + req.bmRequestType = UT_WRITE;; + req.bRequest = UR_SET_FEATURE; + USETW(req.wValue, 1); + USETW(req.wIndex, 2); + USETW(req.wLength, 0); + printf("Resetting port\n"); + err = usbd_do_request(dev, &req, 0); + printf("Port resetted\n"); + } + goto error; } I admit that this is not the worlds best option, because it gives this in the kernel: Dec 15 23:41:37 vaio-edwin kernel: ucom2: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2 Dec 15 23:41:37 vaio-edwin kernel: ucom2: Could not find interrupt in Dec 15 23:41:37 vaio-edwin kernel: Resetting port Dec 15 23:41:37 vaio-edwin kernel: Port resetted Dec 15 23:41:37 vaio-edwin kernel: device_attach: ucom2 attach returned 6 Dec 15 23:41:37 vaio-edwin kernel: uhub0: port 1, set config at addr 2 failed Dec 15 23:41:37 vaio-edwin kernel: uhub0: device problem (STALLED), disabling port 1 Dec 15 23:41:39 vaio-edwin kernel: ucom3: HUAWEI Technologies HUAWEI Mobile, rev 1.10/0.00, addr 2 So it detects it as ucomM, resets it and comes back as ucomN. And as a result, /dev/cuaUN also gets created. Not yet sure how to resolve this, but it's a next step again. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071215125514.GA33989>