Page 1 of 1

E1752 - ubuntu 9.10 remix - usb_modeswitch 1.0.2

Posted: 31 Jan 2010, 17:35
by carabao
hello,

I try without success to make recognize automatically my key 3G (huawei e1752) under ubuntu 9.10 remix.

After various readings, I put in

/etc/usb_modeswitch

Code: Select all

########################################################
# Huawei E1752
#
# Contributor: 

DefaultVendor=  0x12d1
DefaultProduct= 0x1446

TargetVendor=    0x12d1
TargetProdct=    0x1001

MessageEndpoint=    0x01

MessageContent=    "55534243000000000000000000000011060000000000000000000000000000"
and in /etc/udev/rules.d/usb_modeswitch.rules

Code: Select all

# Huawei E1752
#
# Contributor:
#
# Vendor:Product id = 0×12d1:0×1446
SUBSYSTEM==”usb”, SYSFS{idVendor}==”12d1″, SYSFS{idProduct}==”1446″, RUN+=”/usr/sbin/usb_modeswitch –default-vendor 0×12d1 –default-product 0×1446 –detach-storage-only ”
I have do one

Code: Select all

- sudo service udev stop
- sudo service udev start
Then I insert my key and lsusb gives me

Code: Select all

Bus 007 Device 005: ID 12d1:1446 Huawei Technologies Co., Ltd.
And more nothing. On the other hand if I make then: sudo usb_modeswitch, I have

Code: Select all

Bus 007 Device 005: ID 12d1:1446 Huawei Technologies Co., Ltd, E620 modem
The modem is recognized and functional.

However line (SUBSYSTEM==” usb”, SYSFS {idVendor} ==” 12d1 ″, SYSFS {idProduct} ==” 1446 ″, RUN+=” /usr/sbin/usb_modeswitch - default-vendor 0×12d1 - default-product 0×1446 - detach-storage-only”) in usb_modeswitch.rules should normally launch usb_modeswitch automatically

Why, manually does that function, but not automatically (with udev)?

What do you think about it? Thank you.

Ubuntu 9.10 & Huawei E1752

Posted: 27 Feb 2010, 16:13
by kif
Hi

I had the same problem, and after a lot of debugging I found some problems resulting in this behavior :
  1. usb_modemmodeswitch already are installed, and tries (unsuccessfully) to switch the modem.
  2. In /etc/udev/rules.d/usb_modeswitch.rules there are several rules resulting in a call to usb_modeswitch.
  3. In /etc/udev/rules.d/usb_modeswitch.rules at least one rule are switching the modem back whenever it has been switched.
  4. For some reason the usb_modeswitch i'm using (1.0.2), do not like some of the parameters in the rules file.
Solutions :
  1. I'm not entirely shure the usb_modemmodeswitch does any damage, but it certainly doesn't help, so I made an empty 61-option-modem-modeswitch.rules file in /etc/udev/rules.d thereby overruling the one in /lib/udev/rules.d. This could have consequences if you are using other usb modems.
  2. I opened /etc/udev/rules.d/usb_modeswitch.rules in my editor and searched for

    Code: Select all

    SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446"
    I placed a # sign before every line I found, thereby making it a comment
  3. I did the same for all lines containing

    Code: Select all

    SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1001"
    this is the id of the switched modem, this line switches back.
  4. Lastly I inserted the following line at the bottom

    Code: Select all

    SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", SYSFS{idProduct}=="1446", RUN+="/usr/sbin/usb_modeswitch"
After executing a

Code: Select all

/etc/init.d/udev reload
(you could also reboot), the modem is correctly detected and the network auto connects (most of the time).

I'm aware that there are a newer version of usb_modeswitch, which I wasn't at the time, I should probably update, but then again it's working ;)

I hope this helps you too.

Kim