scientificlinuxforum.org QR code
Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> Getting E173 to work on SL 6.2
Aquazone
 Posted: Jun 24 2012, 07:32 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1641
Joined: 24-June 12









Hello everybody,

I am having an installation issue getting my Huawei E173 mobile broadband device to work on SL 6.2, running kernel 2.6.32-220.23.1.el6.x86_64. When I plug in the device, it is recognised but strangely not as 3G modem.

When I plug in the device, I get the following from lsusb:
QUOTE
Bus 002 Device 011: ID 12d1:1c0b Huawei Technologies Co., Ltd.


When I run dmesg, I get these lines:
QUOTE
scsi 28:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
scsi 27:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2


So I am assuming the device is recognized as storage device, which may be due to the connection software saved on it for use on Windows- or OS X-based systems. After some browsing the web I came along the software "usb_modeset" which is supposed to address this very problem and meant to switch the device from storage mode to modem mode - or something like that.

However, the device still does not work. I followed the more in-depth instructions on Fedora Forum (Link) and when running the command
CODE
# usb_modeswitch -Hc "/etc/usb_modeswitch.d/12d1:1c0b"
it detaches the storage device and provides the following output in dmesg, but still the modem is not available for the network manager:

QUOTE
usb 2-1: usbfs: process 6076 (usb_modeswitch) did not claim interface 0 before use
usb 2-1: USB disconnect, address 13
usb 2-1: new high speed USB device using ehci_hcd and address 14
usb 2-1: New USB device found, idVendor=12d1, idProduct=1c05
usb 2-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1: Product: HUAWEI Mobile
usb 2-1: Manufacturer: HUAWEI
usb 2-1: configuration #1 chosen from 1 choice
scsi33 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 14
usb-storage: waiting for device to settle before scanning
scsi34 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 14
usb-storage: waiting for device to settle before scanning
usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 128 rq 6 len 255 ret -110
usb 2-1: usbfs: USBDEVFS_CONTROL failed cmd usb_modeswitch rqt 128 rq 6 len 255 ret -110


The system is a clean kickstart install with the usual office/productivity software installed.
An older, different 3G device (Huawei E160E) works out of the box so I think it's a hardware-related problem. However, I would prefer to use the E173 for it supports higher connection speeds.

Any ideas how to fix the problem?
PM
^
kocka
 Posted: Jul 27 2012, 06:47 PM
Quote Post


SLF Newbie


Group: Members
Posts: 5
Member No.: 1748
Joined: 27-July 12









Here is the trick:
As root load the usbserial kernel module with the required options:
CODE

# modprobe usbserial vendor=0x12d1 product=0x1c05


after that plug in the device, then switch the usb mode:
CODE

# usb_modeswitch -c /etc/usb_modeswitch.d/12d1\:1c0b


Regards,
kocka
PM
^
Aquazone
 Posted: Aug 6 2012, 04:32 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1641
Joined: 24-June 12









Thanks a lot, it finally works!!! http://dl.dropbox.com/u/2835777/egyptian.gif
Tested and certified for both Scientific Linux 6.2 and CentOS 6.3. http://th166.photobucket.com/albums/u117/rdshear/Smiley%20Faces/th_smiley-face-thumbs-up.gif

So as a summary for anyone who experiences the same problem and came here by browsing:

STEP 1
Login as root and install usb_modeswitch package.

CODE
# yum -y install usb_modeswitch


STEP 2
Open vi, paste the following code and save the file as /etc/usb_modeswitch.d/12d1:1c0b

CODE
########################################################
# Huawei E173s

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

TargetVendor= 0x12d1
TargetProduct= 0x1c05

CheckSuccess=20

MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"


STEP 3
Open /lib/udev/rules.d/40-usb_modeswitch.rules with vi and insert the following lines (I chose the part where lots of Huawei devices are listed):

CODE
Huawei E173s
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="usb_modeswitch '%b/%k'"


HINT: Steps 1-3 are to be done only once.

STEP 4
As root load the usbserial kernel module with the required options:

CODE
# modprobe usbserial vendor=0x12d1 product=0x1c05


STEP 5
Plug in the device. Switch the usb mode:

CODE
# usb_modeswitch -c /etc/usb_modeswitch.d/12d1\:1c0b


This is manual mode.

UNTIL HERE IT HAS BEEN TESTED AND WORKS

However, one question left:

It should be possible to load the module automatically on booting by creating an executable file e173.modules in /etc/sysconfig/modules with the following content:

CODE
#!/bin/sh
modprobe usbserial vendor=0x12d1 product=0x1c05


This should load the module persistent (not tested yet!).
However, how can I make the modeswitch run automatically as well when I plug in the device?
It would be sweet to have a real "plug & play" device instead of needing to log in as root, do the modeswitch, log off and then being capable to use the device.
PM
^
tux99
 Posted: Aug 6 2012, 04:52 PM
Quote Post


SLF Guru
********

Group: Members
Posts: 1120
Member No.: 224
Joined: 28-May 11









Maybe a script in /etc/udev/rules.d/ ?

I'm not sure as I have never fiddled with udev, but this is what I would be looking into if I was in your position.


--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
PM
^
kocka
 Posted: Aug 7 2012, 09:30 AM
Quote Post


SLF Newbie


Group: Members
Posts: 5
Member No.: 1748
Joined: 27-July 12









QUOTE (Aquazone @ Aug 6 2012, 04:32 PM)
Thanks a lot, it finally works!!!  http://dl.dropbox.com/u/2835777/egyptian.gif

STEP 1
Login as root and install usb_modeswitch package.


You're welcome smile.gif

Just one question, which repository contains this package?
I can't see it ot SL 6.2, epel is enabled.
(so I installed it from source).

QUOTE

However, how can I make the modeswitch run automatically as well when I plug in the device?


Just install the tcl package wink.gif
I've tried it and working with usb_modeswitch 1.1.9

As I can see it is depending on the usb_modeswitch version. Maybe from 1.2.0 the dispatcher script does not depend on tcl.
PM
^
kocka
 Posted: Aug 7 2012, 09:59 AM
Quote Post


SLF Newbie


Group: Members
Posts: 5
Member No.: 1748
Joined: 27-July 12









QUOTE (Aquazone @ Aug 6 2012, 04:32 PM)

However, one question left:

It should be possible to load the module automatically on booting by creating an executable file e173.modules in /etc/sysconfig/modules with the following content:

CODE
#!/bin/sh
modprobe usbserial vendor=0x12d1 product=0x1c05


This should load the module persistent (not tested yet!).


I've tested it and working.

Now I have a real "plug & play" device smile.gif
PM
^
realtimerajesh
 Posted: Dec 11 2012, 03:47 PM
Quote Post


SLF Newbie


Group: Members
Posts: 2
Member No.: 2128
Joined: 11-December 12









Hi Friends,

i am stuck up in same issue but couldnt move out.

a) lsusb output

Bus 002 Device 005: ID 12d1:14fe Huawei Technologies Co., Ltd

cool.gif dmesg output

usb 2-1.2: New USB device found, idVendor=12d1, idProduct=14fe
usb 2-1.2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 2-1.2: Product: HUAWEI Mobile
usb 2-1.2: Manufacturer: HUAWEI
usb 2-1.2: configuration #1 chosen from 1 choice
scsi10 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi11 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 10:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
usb-storage: device scan complete
scsi 11:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sr1: scsi-1 drive


c) [root@localhost pyhumod-0.01]# cat /etc/usb_modeswitch.d/12d1\:14fe
# T-Mobile NL (Huawei E352)

#TargetVendor= 0x12d1
#TargetProduct= 0x1506

#MessageContent="55534243123456780000000000000011062000000100000000000000000000"

Huawei E1731

DefaultVendor= 0x12d1
DefaultProduct= 0x14fe

TargetVendor= 0x12d1
TargetProduct= 0x14fe

CheckSuccess=20

MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"

[root@localhost pyhumod-0.01]#


when i go to step 5..
[root@localhost pyhumod-0.01]# usb_modeswitch -c /etc/usb_modeswitch.d/12d1\:14fe

Looking for target devices ...
found matching product ID
adding device
Found devices in target mode or class (1)
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 005 on bus 002 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x0f (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached
Could not send INQUIRY message (error -2)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Looking for active driver ...
No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
Sending the message returned error -2. Trying to continue
Resetting response endpoint 0x81
Resetting message endpoint 0x0f
Could not reset endpoint (probably harmless): -2

Checking for mode switch (max. 20 times, once per second) ...
Searching for target devices ...
found matching product ID
adding device
Searching for target devices ...
found matching product ID
adding device
.....................(till 20 times)

No new devices in target mode or class found

Mode switch has failed. Bye.

[root@localhost pyhumod-0.01]#

I tried all options not sure what should i do .. i am using my mobile to connect to my system now..




PMEmail Poster
^
Aquazone
 Posted: Dec 11 2012, 06:45 PM
Quote Post


SLF Newbie


Group: Members
Posts: 4
Member No.: 1641
Joined: 24-June 12









What device are you talking about? I suppose it's not the E173 that this topic was all about?

Did you just skip the other steps, especially 2-4? Did you try to adapt the modifications from this thread to your device? Of course you will have to use the different IDs you got from lsusb output instead of those of E173.
PM
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll