Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
soulskater
Posts: 5
Joined: 06 Jul 2009, 23:31

Huawei E1550(E620) in openSUSE 11.1

Post by soulskater » 07 Jul 2009, 00:01

Hi.

I almost got my E1550 modem working in openSUSE 11.1, the only thing really left is automatic reconfiguration in which i do not get to work.

Tech Info:
Manufacturer: Huawei
Model: E1550(E620)
Provider: Comviq(Sweden)
Additional: Drivers on stick mounts automatically on insert and ask if i want to run software


I have found how to activate it like this.
# /usr/sbin/usb_modeswitch -v 12d1 -p 1446 -d 1

What happens is that the USB mount disconnects right away but it doesn't reconfigure the device to modem mode directly, that takes approx. 40 secs before that happens. At this point it reconnects the USB mount(asks again if to run software) and when that is done it reconfigures for modem mode, and i can use it.

So far so good...

Now to the problem at hand. I added this line to an new udev rule called 15-huawei-1550-modem.rules.

ACTION=="add" SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch -v 12d1 -p 1446 -d 1"

but nothing happens when the modem is inserted, except standard behavior, it mounts the drive unit and asking if i want to run the software.

Am i missing something or is something in the udev line wrong?

A note: It seems that when i run the usb_modeswitch without the -v and -p, it cannot identify the card, don't know if this is correct behavior?

Thanks in advance.

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 09 Jul 2009, 07:53

Please remember to write hexadecimal numbers with a prepended "0x"; this goes for the command line as well.

For hints like this and concerning the command line options and what they do I recommend reading the head of the "usb_modeswitch.config" file for a summary.

Did you try the "-H" option as well?

soulskater
Posts: 5
Joined: 06 Jul 2009, 23:31

Post by soulskater » 11 Jul 2009, 11:18

Hi.

Yes tried the -H option to, it says ok when run but nothing happens.

This is what i added to usb_modeswitch.conf

Code: Select all

########################################################
# Huawei E1550(E620)
#
# Contributor: Marcus Uddenhed

DefaultVendor=  0x12d1
DefaultProduct= 0x1446

# choose one of these:
DetachStorageOnly=1
;HuaweiMode=1
Still no luck in autoconfiguration.

if usb_modeswitch is run without parameters it cannot find the usb-stick.

Will test udev rule again with 0x added and see what happens.

Thanks for your reply. :D

soulskater
Posts: 5
Joined: 06 Jul 2009, 23:31

Post by soulskater » 12 Jul 2009, 20:45

Nope, cannot get the udev part to work.

I tried this for hal instead of udev, with no luck it blocked the device totally.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
<device>
  <match key="usb.vendor_id" int="0x12d1">
    <match key="usb.product_id" int="0x1446">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </match>
</device>
</deviceinfo>
So still manual solution for me, it works at least, thats a relief. :)

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Post by Josh » 13 Jul 2009, 08:06

I know nothing about hal ...

I would try to add the udev rule to an existing rule file like "hotplug.rules" or similar. Also, the timing might be an issue (rule files are read and executed in lexical order as you probably know). Try to put it in after all other USB related rules are through.

If you have set up /etc/usb_modeswitch.conf and calling without parameters does not work, you probably have more than one default device enabled. Try "usb_modeswitch -W" and see if the values are correct.

soulskater
Posts: 5
Joined: 06 Jul 2009, 23:31

Post by soulskater » 18 Jul 2009, 23:15

Hi, thanks for your reply.

I found this thread with working parameters, Link...

I even got it to work with udev.

Code: Select all

ACTION=="add" SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/usr/sbin/usb_modeswitch"
Now i just have some weird behavior between the modem and my usb connected wireless lan and usb drive. the issue is that if i have these units connected when connecting the modem the usb subsystem more or less freeze and i have to reboot to get everything up and running again.

This is how it looks in my /etc/udev/rules.d/ folder.

Code: Select all

10-vboxdrv.rules
15-huawei-1550-modem.rules
40-alsa.rules
40-bluetooth.rules
41-soundfont.rules
50-huawei-modem.rules
51-lirc.rules
51-packagekit-firmware.rules
52-irda.rules
55-hpmud.rules
55-libsane.rules
56-idedma.rules
56-sane-backends-autoconfig.rules
60-pcmcia.rules
65-wacom.rules
70-kpartx.rules
70-persistent-cd.rules
70-persistent-net.rules
71-multipath.rules
77-network.rules
79-yast2-drivers.rules
99-pcsc_lite.rules
My rule is number 15 and the other huawei rule is from the umtsmodem software i tried with. Should i try changing the udev rule to be after 50-huawei-modem.rules or remove the umtsmodem software to just have the usb_modeswitch active?

Thanks by the way for a great piece of software. :D

soulskater
Posts: 5
Joined: 06 Jul 2009, 23:31

Post by soulskater » 19 Jul 2009, 12:14

I finally manage to narrow down the problem. Obviously my wireless usb card and the modem doesn't like each other, when ever i have the wireless plugged in and then plug in the modem, the modem breaks the connection to the wireless in a bad way.

But luckily i can remove it prior to putting in the modem for now so it's not a biggie.

The wireless is a D-Link System DWL-G122 802.11g Adapter [ralink rt73]

Thanks for your help getting me on right track.

Post Reply