You are not logged in.

#1 2011-11-23 16:41:38

sipik
Member
Registered: 2011-05-16
Posts: 23

Huawei E220 modem not recognised after upgrade

I use a Huawei E220 modem, which has been working well until a recent upgrade. However, it is not recognised as a modem anymore. Looking into daemons.log I see:

Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:1
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:1'
Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:2
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:2'
Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:3
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:3'
Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:1
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:1'
Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:2
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:2'
Nov 21 10:07:01 localhost udevd[234]: unknown key 'SYSFS{idProduct}' in /etc/udev/rules.d/50-huawei-e220.rules:3
Nov 21 10:07:01 localhost udevd[234]: invalid rule '/etc/udev/rules.d/50-huawei-e220.rules:3'

The .rules file looks like:

SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/usr/local/bin/huawei-e220"
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/bin/sleep 5"
SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/sbin/modprobe usbserial vendor=0x12d1 product=0x1003"

Google or the forum search didnt help. Any tips are appreciated. Thanks!

Offline

#2 2011-11-23 18:46:43

mcsilva
Member
From: Portugal
Registered: 2009-12-16
Posts: 95

Re: Huawei E220 modem not recognised after upgrade

Maybe you don't have the right packages installed.
(SYSFS= is not any more recognized by Udev.)

From which package belong this files?
Please send the result of:
pacman -Qo /etc/udev/rules.d/50-huawei-e220

Do you have usb_modeswitch installed?
Check with:
pacman -Q usb_modeswitch

Offline

#3 2011-11-23 21:08:34

sipik
Member
Registered: 2011-05-16
Posts: 23

Re: Huawei E220 modem not recognised after upgrade

yes i have usb_modeswitch

pacman -Qo /etc/udev/rules.d/50-huawei-e220
does not return any result. if i remember correctly, there was some package i got from AUR, which prepared all necessary configurations, however i dont remember now which one.

anyways, my setup worked just fine up until the recent update

Offline

#4 2011-11-24 00:09:09

mcsilva
Member
From: Portugal
Registered: 2009-12-16
Posts: 95

Re: Huawei E220 modem not recognised after upgrade

Are you using NetworkManager?
And modemmanager?
If you are using "networkmanager", "modemmanager" and "usb_modeswitch-1.2.0-1", remove the file (/etc/udev/rules.d/50-huawei-e220) and it must work.
If it still does not work, then you could edit /etc/usb_modeswitch.conf , and change EnableLogging=1.
This way you could have a lot of debug information in /var/log/usb_modeswitch_<device> (when you plug the Huawei E220) to help fix the issue.

Last edited by mcsilva (2011-11-24 00:10:56)

Offline

#5 2011-11-24 16:14:11

arunvragh
Member
Registered: 2007-04-17
Posts: 111

Re: Huawei E220 modem not recognised after upgrade

Just create a group called "usb' . Add your user to this group with gpasswd -a 'user' 'group' without the ' as root.

As root go to /lib/udev/rules.d/50-default and change libusb to group = usb

You will have to do it every time there is an upgrade (of whether linux or udev) I don't remember. Had this issue with a ZTE 3G modem.

Hope it helps.

Offline

#6 2011-11-25 09:03:50

sipik
Member
Registered: 2011-05-16
Posts: 23

Re: Huawei E220 modem not recognised after upgrade

Many thanks for the tips!

@mcsilva

I removed the /etc/udev/rules.d/50-huawei-e220.rules file. I checked that all other packages are installed. However my device is still not recognised as a modem. (If I remember correctly, the initial reason for creating the .rules file was because was was not recognised with the default setup, and at the time this change made it work). Will try to debug it over the weekend as you suggested.

@arunvragh

You mean I should edit /lib/udev/rules.d/50-udev-default.rules ? In this file I see:

# 'libusb' device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id"

Can you please tell me exactly how to add it to the usb group? (What is the exact syntax?)

Offline

#7 2011-11-25 10:24:50

arunvragh
Member
Registered: 2007-04-17
Posts: 111

Re: Huawei E220 modem not recognised after upgrade

Yes.

as root groupadd usb
then gpasswd -a 'user' usb without the '

Then edit the file replace MODE with GROUP and 0664 with usb
Restart and you should be on your way.

Rgds

Arun

Offline

#8 2011-12-06 09:33:27

sipik
Member
Registered: 2011-05-16
Posts: 23

Re: Huawei E220 modem not recognised after upgrade

Sorry for the delay in answering this (I have been mostly away).

I tried your advices:

* removed /etc/udev/rules.d/50-huawei-e220.rules
* added the usb group to /lib/udev/rules.d/50-udev-default.rules as instructed

However my problem is only partially solved. When the computer boots with the usb modem connected it is never recognised as a modem. Then I remove it and plug it in several times. Eventually (after 5-10 times) it is recognised as a modem. This process is slow and painful and quite far from the "plug and play" behaviour that I enjoyed before. The output I see in /var/log/usb_modeswitch* is (it looks exactly the same whether the device is or is not recognised as a modem):

USB_ModeSwitch log from Sat Dec 03 01:16:23 CET 2011

Raw args from udev: 1-1.1:1.0/1-1.1:1.0

Using global config file: /etc/usb_modeswitch.conf
Warning: USB attribute "serial" not found.
----------------
USB values from sysfs:
  manufacturer	HUAWEI Technology
  product	HUAWEI Mobile
  serial	
----------------
bNumConfigurations is 1 - don't check for active configuration
SCSI attributes not needed, moving on
checking config: /usr/share/usb_modeswitch/12d1:1003
! matched, now switching
 (running command: /usr/sbin/usb_modeswitch -I -W -D -u -1 -f $configBuffer)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------

Reading long config from command line

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.0 (C) Josua Dietze 2011
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1003
TargetVendor=   not set
TargetProduct=  not set
TargetClass=    0xff
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=1
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent=""
NeedResponse=0
ResponseEndpoint= not set

InquireDevice disabled
Success check enabled, max. wait time 20 seconds
System integration mode enabled


Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 0603:00f2
  searching devices, found USB ID 147e:2016
  searching devices, found USB ID 0a5c:217f
  searching devices, found USB ID 04f2:b221
  searching devices, found USB ID 1d6b:0002
  searching devices, found USB ID 8087:0024
  searching devices, found USB ID 046d:c52b
  searching devices, found USB ID 17ef:1003
 No devices in default mode found. Nothing to do. Bye.

--------------------------------
(end of usb_modeswitch output)

Device directory in sysfs is gone! Something went wrong, aborting

Any more help in debugging this issue is appreciated. Thanks!

Offline

#9 2011-12-06 10:09:08

samuvuo
Member
From: Finland
Registered: 2011-02-20
Posts: 84

Re: Huawei E220 modem not recognised after upgrade

What's in /usr/local/bin/huawei-e220 (included in your old rule)?

I have a Huawei e1552 myself and just need usb_modeswitch installed plus an udev rule file.

Here's the rule with your modem's product ID in place so you can test it:

#
# /etc/udev/rules.d/50-huawei-e220
#
# udev-rule for switching modems from storage to modem
SUBSYSTEM=="usb", RUN+="/lib/udev/usb_modeswitch --vendor 0x12d1 --product 0x1003 --type option-zerocd"

Offline

#10 2011-12-07 11:22:59

arunvragh
Member
Registered: 2007-04-17
Posts: 111

Re: Huawei E220 modem not recognised after upgrade

Sorry. You need to install usb_modeswitch from community. and i hope you have a wvdial.conf installed. give user permissions to /usr/bin/wvdial. Then just open a terminal and type wvdial. If there are errors you may have to tinker with wvdial.conf. By the way have you installed the drivers that came with the Huawei modem from your ISP?

Offline

Board footer

Powered by FluxBB