Subject: Re: Huawei E220 support?
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Marco Trillo <marcotrillo@gmail.com>
List: current-users
Date: 11/17/2007 17:57:05
Hi,

On 11/17/07, Brian Buhrow <buhrow@lothlorien.nfbcal.org> wrote:
>         Hello.  I have a similar device from Novatel which has a modem and a
> sd reader in it.  Right now, it shows up as only an sd reader.  Could you
> describe the work around you  used to get it to show up as a serial port
> and as an sd device, or, failing that, just a serial device?

I just added the Huawei E220 vendor/product pair to the ubsa(4)
recognized-devices list:

$ cat /usr/src/sys/dev/usb/ubsa.c
[...]
Static const struct usb_devno ubsa_devs[] = {
        [...]
	{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },
};

With this, an ubsa(4) instance attaches to device instead of a umass(4).

But the solution is not perfect; like I commented before, you need to
plug the device two times keeping the 'assistant power' link
connected. The first time ubsa(4) will throw an error message.
Apparently the E220 needs a request to switch from mass-storage-mode
to serial-adaptor-mode, but you can use that (unplug and replug) to
workaround it. I don't know about the Novatel though.

I found a Linux program that does the switch:
<http://www.kanoistika.sk/bobovsky/archiv/umts/huaweiAktBbo.c>
Perhaps ubsa(4) can be hacked to issue this request to make it work
the first time... but this is non-critical since you can workaround
it.

Greetings,
Marco.