Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

usb hsdpa modem only detected after using it on windows

71 views
Skip to first unread message

Umarzuki Mochlis

unread,
Aug 16, 2009, 12:20:07 AM8/16/09
to
the modem is Huawei E1762 which is provided by local ISP when registering for their wireless broadband service.

this modem, weirdly, can only be detected when i used it recently from windows xp, while the device still connected into the usb port, reboot into debian, then it will be detected and can be used with Vodafone Mobile Connect Card driver for Linux

detected as usb storage
Bus 005 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd.

detected as modem
Bus 005 Device 003: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

i tried
# rmmod usb-storage
# modprobe usbserial vendor=0x12d1 product=0x1446

but to no avail. Perhaps there's a step that i missed. Please point me to the correct direction.

--
Regards,

Umarzuki Mochlis
http://gameornot.net

John Haggerty

unread,
Aug 16, 2009, 12:30:11 AM8/16/09
to
I hate to be "negative" but this sounds like a problem I had with a SCSI tray loaded cdrom driev back several years ago now. I even escalated the issue to the kernel developers list. No dice. You'll probably have to switch to something that specifically is supported otherwise the other path leads to madness.

Cameron Hutchison

unread,
Aug 16, 2009, 12:50:08 AM8/16/09
to
Umarzuki Mochlis <umar...@gmail.com> writes:

>the modem is Huawei E1762 which is provided by local ISP when registering
>for their wireless broadband service.

>this modem, weirdly, can only be detected when i used it recently from
>windows xp, while the device still connected into the usb port, reboot into
>debian, then it will be detected and can be used with Vodafone Mobile
>Connect Card driver for Linux

Look into a utility called usb-modeswitch.

Some Huawei HSPA modems (maybe all) initially show up as a USB storage
device, containing drivers for Windows and maybe Mac. Once the drivers
are installed, they switch the mode of the modem to serial mode so the
modem can be used.

It sounds like this is what is happening with your modem.

usb-modeswitch is a userland tool that switches the mode from storage to
serial. On later kernels where the device is known, this utility is not
needed as the kernel driver will switch the mode automatically. For
instance, I have a E169 which uses the "option" driver
(CONFIG_USB_SERIAL_OPTION). This driver knows about the E169 mode and
switches it automatically for me.

Debian unstable has the package usb-modeswitch, but this is not in lenny
(stable).

The home page for usb-modeswitch is:
http://www.draisberghof.de/usb_modeswitch/

--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Raja R Harinath

unread,
Aug 16, 2009, 2:00:23 AM8/16/09
to
Hi,

Umarzuki Mochlis <umar...@gmail.com> writes:

> the modem is Huawei E1762 which is provided by local ISP when registering for their wireless broadband service.
>
> this modem, weirdly, can only be detected when i used it recently from windows xp, while the device still connected into the usb port, reboot into debian, then it will be
> detected and can be used with Vodafone Mobile Connect Card driver for Linux
>
> detected as usb storage
> Bus 005 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd.
>
> detected as modem
> Bus 005 Device 003: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

This looks like an USB device that carries its Windows drivers on it.
When you first plug it in, it appears as a USB storage device with the
driver in it. After the Windows driver is installed, it pokes the
device to make the modem interface appear.

Now, on Linux, the modem interface, 0x1003, is supported by the option.c
driver. So, the trick is to add a quirk to the USB storage driver to
handle the poking. It appears there already are similar devices, and
there already is code in the kernel to handle the poking of the device,
etc.

You'll probably need to patch the drivers/usb/storage/unusual_devs.h
file in the kernel to add a para that looks like:

UNUSUAL_DEV( 0x12d1, 0x1446, 0x0000, 0x0000,
"HUAWEI MOBILE",
"Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
0),

and recompile. Unfortunately, the usbstorage 'quirk=...' option doesn't
appear to be able to handle this kind of quirk.

- Hari

Umarzuki Mochlis

unread,
Aug 17, 2009, 10:10:14 AM8/17/09
to
i could not find any option.c or unusual_devs.h on my machine, what
sould i do next?

2009/8/16, Raja R Harinath <hari...@hurrynot.org>:


--
Regards,

Umarzuki Mochlis
http://gameornot.net


Raja R Harinath

unread,
Aug 17, 2009, 11:40:08 AM8/17/09
to
Hi,

To clarify this point -- once the interface is visible to Linux, the
device works with the existing drivers you already have.

>> You'll probably need to patch the drivers/usb/storage/unusual_devs.h
>> file in the kernel to add a para that looks like:
>>
>> UNUSUAL_DEV( 0x12d1, 0x1446, 0x0000, 0x0000,
>> "HUAWEI MOBILE",
>> "Mass Storage",
>> US_SC_DEVICE, US_PR_DEVICE, usb_stor_huawei_e220_init,
>> 0),
>>
>> and recompile. Unfortunately, the usbstorage 'quirk=...' option doesn't
>> appear to be able to handle this kind of quirk.
>

> i could not find any option.c

It doesn't matter :-) You probably have the option.ko kernel module.

> or unusual_devs.h on my machine, what sould i do next?

I wasn't too clear above. You need to get a copy of the kernel source,
patch it, compile it, and install it.

However, it might be much much easier to follow the suggestion
elsethread: install the 'usb-modeswitch' package, and add a line:

SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446", RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1446 --target-vender 0x12d1 --target-product 0x1003 --huawei-mode --detach-storage-only "

to /etc/udev/rules.d/usb_modeswitch.rules

Umarzuki Mochlis

unread,
Aug 18, 2009, 10:00:24 AM8/18/09
to
2009/8/17 Raja R Harinath <hari...@hurrynot.org>:
[snipped]

>
> I wasn't too clear above.  You need to get a copy of the kernel source,
> patch it, compile it, and install it.
>
> However, it might be much much easier to follow the suggestion
> elsethread: install the 'usb-modeswitch' package, and add a line:
>
>  SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446", RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1446 --target-vender 0x12d1 --target-product 0x1003 --huawei-mode --detach-storage-only "
>
> to /etc/udev/rules.d/usb_modeswitch.rules
>
I had created /etc/udev/rules.d/usb_modeswitch.rules with

SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446",
RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1
--default-product 0x1446 --target-vender 0x12d1 --target-product
0x1003 --huawei-mode --detach-storage-only "

in it. But it is still detected as usb cdrom storage. Maybe i need to
start learning compiling and patching kernel to make this modem
recognized upon bootup.


--
Regards,

Umarzuki Mochlis
http://gameornot.net


Raja R Harinath

unread,
Aug 19, 2009, 12:40:05 AM8/19/09
to
Hi,

Umarzuki Mochlis <umar...@gmail.com> writes:

> 2009/8/17 Raja R Harinath <hari...@hurrynot.org>:
> [snipped]
>>
>> I wasn't too clear above.  You need to get a copy of the kernel source,
>> patch it, compile it, and install it.
>>
>> However, it might be much much easier to follow the suggestion
>> elsethread: install the 'usb-modeswitch' package, and add a line:
>>
>>  SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446", RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1446 --target-vender 0x12d1 --target-product 0x1003 --huawei-mode --detach-storage-only "
>>
>> to /etc/udev/rules.d/usb_modeswitch.rules
>>
> I had created /etc/udev/rules.d/usb_modeswitch.rules

Hmm, does that means you didn't install the 'usb-modeswitch' package?

> with
> SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446",
> RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1
> --default-product 0x1446 --target-vender 0x12d1 --target-product
> 0x1003 --huawei-mode --detach-storage-only "
>
> in it. But it is still detected as usb cdrom storage. Maybe i need to
> start learning compiling and patching kernel to make this modem
> recognized upon bootup.

You may want to try again after installing the 'usb-modeswitch' package
from the 'testing' distribution:

http://packages.debian.org/usb-modeswitch

- Hari

Umarzuki Mochlis

unread,
Aug 19, 2009, 9:10:12 AM8/19/09
to
2009/8/19 Raja R Harinath <hari...@hurrynot.org>:
[snipped]

>> I had created /etc/udev/rules.d/usb_modeswitch.rules
>
> Hmm, does that means you didn't install the 'usb-modeswitch' package?

ctrl:~# aptitude search usb-modeswitch
i usb-modeswitch - Generic USB device switch tool

>
>> with
>> SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446",
>> RUN+="/usr/sbin/usb_modeswitch --default-vendor 0x12d1
>> --default-product 0x1446 --target-vender 0x12d1 --target-product
>> 0x1003 --huawei-mode --detach-storage-only "
>>
>> in it. But it is still detected as usb cdrom storage. Maybe i need to
>> start learning compiling and patching kernel to make this modem
>> recognized upon bootup.
>
> You may want to try again after installing the 'usb-modeswitch' package
> from the 'testing' distribution:
>
>  http://packages.debian.org/usb-modeswitch
>
> - Hari
>
>
> --
> To UNSUBSCRIBE, email to debian-us...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
>
>

--
Regards,

Umarzuki Mochlis
http://gameornot.net


0 new messages