Author Message

<  Device Information  ~  Huawei E173s working config

PostPosted: Sun Nov 28, 2010 8:27 pm
Posts: 2Joined: Sun Nov 28, 2010 8:02 pm
Hello, I have a Huawei E173s modem which isn't supported (not to be confused with model E173). Following the documentation's suggestions I finally got it working. I don't know if this is the correct place but since I found no other I'll post the working config here hoping you may add it to a future release of the device database.

Code:
########################################################
# Huawei E173s

DefaultVendor=  0x12d1
DefaultProduct= 0x1c0b

TargetVendor=  0x12d1
TargetProduct= 0x1c05

CheckSuccess=20

MessageEndpoint= 0x0f
MessageContent= "55534243000000000000000000000011060000000100000000000000000000"


Offline Profile
PostPosted: Sun Nov 28, 2010 10:36 pm
Site AdminPosts: 4550Joined: Sat Nov 03, 2007 12:30 am
Thanks! This is indeed the right place for that report!

However, a Huawei engineer approached me and requested to change all Huawei devices to the following MessageContent:
"55534243123456780000000000000011062000000100000000000000000000"

Could you check if that will work too in your config?

And if you want, give me your real name (via PM or mail) and I'll include you in the device reference as contributor.



Offline Profile
PostPosted: Mon Nov 29, 2010 11:15 pm
Posts: 4Joined: Mon Nov 29, 2010 10:37 pm
How can you tell you have a Huawei E173s? I have one that on the rare side says "E173", but it's recognized as:

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

And I do not know how, but playing with usb_modeswitch i saw it switch to these once:

TargetVendor= 0x12d1
TargetProduct= 0x1c05

So, maybe I have a E173s?

I think I got it to switch because after running the comand with your config:

Code:
[pablo:usb_modeswitch.d]$ lsusb | grep Huawei
Bus 001 Device 003: ID 12d1:1c0b Huawei Technologies Co., Ltd.

[pablo:usb_modeswitch.d]$
[pablo:usb_modeswitch.d]$ sudo usb_modeswitch -c 12d1:1c0b

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices in default mode or class (1)
Accessing device 003 on bus 001 ...
Using endpoints 0x0f (out) and 0x8f (in)
Using endpoints 0x0f (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: HUAWEI 
   Model String: Mass Storage   
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 OK, message successfully sent
Resetting response endpoint 0x8f
Resetting message endpoint 0x0f
 Error resetting endpoint: -71
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Original device is gone already, not checking
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Found correct target device

Mode switch succeeded. Bye.

[pablo:usb_modeswitch.d]$ lsusb | grep Huawei
Bus 001 Device 004: ID 12d1:1c05 Huawei Technologies Co., Ltd.


But my Fedora 13 box still does not recognize the modem, I use NetworkManager to control WiFi and Mobile Broadband. Any clue what could be wrong?

If somebody could confirm that the usb modeswitch worked, then this might be a question for another forum. Can someone confirm?

Thanks.


Offline Profile
PostPosted: Mon Nov 29, 2010 11:52 pm
Site AdminPosts: 4550Joined: Sat Nov 03, 2007 12:30 am
You probably switched all right, but the modem driver does not know your device yet.

If you set up a file named "/etc/usb_modeswitch.d/12d1:1c0b" with similar content like in the first post here but with your values inserted, you can automatize your switching and get the driver bound to your device (also automatically).

In addition to the config file, you need to add a line to "/lib/udev/rules.d/40-usb_modeswitch.rules" with the default ID of our device. It's really not hard, have look at the other lines and you'll get the idea.



Offline Profile
PostPosted: Tue Nov 30, 2010 12:07 am
Posts: 4Joined: Mon Nov 29, 2010 10:37 pm
Thanks dude. That did it right away!!!! MAGIC!!!!

1) create file /etc/usb_modeswitch.d/12d1:1c0b:
########################################################
# Huawei E173s

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

TargetVendor= 0x12d1
TargetProduct= 0x1c05

CheckSuccess=20

MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"
--------------------------------------------------------
2) add corresponding lines to /lib/udev/rules.d/40-usb_modeswitch.rules
Huawei E173s
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="usb_modeswitch '%b/%k'"


Offline Profile
PostPosted: Tue Nov 30, 2010 1:07 am
Posts: 2Joined: Sun Nov 28, 2010 8:02 pm
Josh wrote:
However, a Huawei engineer approached me and requested to change all Huawei devices to the following MessageContent:
"55534243123456780000000000000011062000000100000000000000000000"

Could you check if that will work too in your config?

Tested with that ContentMessage and works fine too.

pmg43 wrote:
How can you tell you have a Huawei E173s? I have one that on the rare side says "E173", but it's recognized as:

DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b

Well, actually mine also says E173 on the outside, even though its product id doesn't match other E173. However if you open the lid (where you insert the SIM card) there is some info printed such as serial number, etc, and there model reads E173s, so I guess that's its correct number.


Offline Profile
PostPosted: Tue Nov 30, 2010 3:41 am
Posts: 4Joined: Mon Nov 29, 2010 10:37 pm
You are right, inside it says E173s-6.
Strange, I tested this 2 hours ago and NM detected the device. I had to run so closed the PC on a rush, now that I got back to double check on it, I can no longer see the modem on NM. The Huawei is switched to what I wanted it to be, but nothing:

Code:
[pablo:~]$ lsusb | grep Huawei
Bus 001 Device 010: ID 12d1:1c05 Huawei Technologies Co., Ltd.


If I unplug and plug back, the huawei device appears as 12d1:1c05, and listed as a CD Rom on nautilus.

Do you see the same behaviour? Do you need to umount the CD for it to work? I will continue to investigate this.... it was working a while ago!


Offline Profile
PostPosted: Tue Nov 30, 2010 9:47 am
Site AdminPosts: 4550Joined: Sat Nov 03, 2007 12:30 am
Regarding model names: don't rely on them too much with Huawei devices. The USB ID is what really matters.

Some new models have two target modes actually. With the changed MessageContent, they get the modem interface as well but in addition there is a "cdc_ether" interface which they will probably support with their own Linux driver adapted from the one in the kernel.

I assume this is a preparation for coming 4G standards like LTE where the serial connection will reach its speed limit.

pmg43, you may be running into a problem with Network Manager. To check if usb_modeswitch did its job, run "dmesg" after replugging and waiting for a while (some Huawei devices need up to 15 seconds to come back as modem).
If you see some lines containing "ttyUSB" or "GSM" at the end of the output, your modem is ready to use.



Offline Profile
PostPosted: Tue Nov 30, 2010 9:38 pm
Posts: 4Joined: Mon Nov 29, 2010 10:37 pm
Yes, forget about my last post. I tested this again today and it worked right away. Thanks!


Offline Profile
PostPosted: Wed Feb 16, 2011 11:41 pm
Posts: 1Location: PolandJoined: Wed Feb 16, 2011 11:34 pm
I have a problem switching Huawei E173s-1 with usb_modeswitch 1.1.4 (on tomato router)
I'm using the following command:

Code:
usb_modeswitch -v 0x12d1 -p 0x1c0b -V 0x12d1 -P 0x1c05 -s 20 -m
0x0f -M "55534243123456780000000000000011062000000100000000000000000000"


this is what I get:
Code:
Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found devices in default mode or class (1)
Accessing device 010 on bus 001 ...
Using endpoints 0x0f (out) and 0x8f (in)
Using endpoints 0x0f (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found ("dummy")
 OK, driver "dummy" detached
endpoint f size 31 timeout 0endpoint 8f size 36 timeout 0endpoint 8f size 13 timeout 0
SCSI inquiry data (for identification)
-------------------------
  Vendor String: HUAWEI
   Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
endpoint f size 31 timeout 100 OK, message successfully sent
Resetting response endpoint 0x8f
 Error resetting endpoint: -4
Resetting message endpoint 0x0f
 Error resetting endpoint: -4
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Original device is gone already, not checking
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 Searching for target devices ...
 No new devices in target mode or class found

Mode switch has failed. Bye.


Vendor should switch from 1c0b to 1c05 - but what I get is 1c08 ???
On ubuntu 10.10 it's the same problem - even when I compiled usb_modeswitch version 1.1.6.
Did anyone had some kind of problem? Any suggestions?

regards,

Maciek


Offline Profile
PostPosted: Thu Feb 17, 2011 10:09 pm
Site AdminPosts: 4550Joined: Sat Nov 03, 2007 12:30 am
I think the only quirk is that your hardware/firmware version shows a different target product ID. Switching obviously works fine.

How do you know that it should be "1c05" after switching? Did you try "-P 0x1c08" in your command line?


Offline Profile
PostPosted: Sun Jul 24, 2011 10:42 pm
Posts: 1Joined: Sun Jul 24, 2011 7:44 pm
I spent this day to get this working under Fedora 15. I got model E173s-1 from T-Mobile Hungary.

The usb_modeswitch config above working well, but not from udev. WaitBefore=3 needed from udev, otherwise usb_modeswitch always fails with error -110 (syslog):

Code:
Jul 24 22:04:00 daptop udevd-work[4009]: '/lib/udev/usb_modeswitch' (stderr) 'Error: getting the current configuration failed (error -110). Aborting.'
Jul 24 22:04:00 daptop udevd-work[4009]: 'usb_modeswitch '/1-4:1.0'' returned with exitcode 1


If '/lib/udev/usb_modeswitch' fails due to error -110, the 'option' driver won't be loaded. If the driver not loaded, the udev can't do '--driver-bind' on plug-in, so a manual usb_modeswitch later isn't enough to get this stick working, cause the 'option' driver doesn't know this productID by default.

WaitBefore=2 isn't enough, only causes different error:

Code:
USB_ModeSwitch log from Sun Jul 24 21:58:19 CEST 2011
[...]
----------------
USB values from sysfs:
  manufacturer  HUAWEI
  product       HUAWEI Mobile
  serial       
----------------
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/12d1:1c0b
config: WaitBefore set to 2
! matched, waiting time set to 2 seconds
 waiting is over, switching starts now
 (running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1:1c0b)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are expected in the process)
--------------------------------
[...]
Looking for active driver ...
 OK, driver found ("dummy")
 OK, driver "dummy" detached
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 OK, message successfully sent
Resetting response endpoint 0x8f
Resetting message endpoint 0x0f

Checking for mode switch (max. 20 times, once per second) ...
 Waiting for original device to vanish ...
[...]

 Original device still present after the timeout <<<---- ERROR

Mode switch most likely failed. Bye.

fail:
--------------------------------
(end of usb_modeswitch output)


But WaitBefore=3 is always perfect:

Code:
[...]
config: WaitBefore set to 3
! matched, waiting time set to 3 seconds
 waiting is over, switching starts now
 (running command: /usr/sbin/usb_modeswitch -I -W -c /etc/usb_modeswitch.d/12d1:1c0b)
[...]

Looking for active driver ...
 OK, driver found ("dummy")
 OK, driver "dummy" detached
Setting up communication with interface 0 ...
Using endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 OK, message successfully sent
Resetting response endpoint 0x8f
Resetting message endpoint 0x0f
 Error resetting endpoint: -6
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Searching for target devices ...
  searching devices, found USB ID 1d6b:0002
[...]

Found target device, now opening

Found target device 110 on bus 001

Target device description data
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
 Found correct target device

Mode switch succeeded. Bye.

ok:12d1:1c05
--------------------------------
(end of usb_modeswitch output)


So if E173s-1 doesn't work out-of-box, try:
Code:
echo WaitBefore=3 >>/etc/usb_modeswitch.d/12d1:1c0b


I have full logs too if someone interested in (udev debug output from syslog, usb_modeswitch logs with EnableLogging=1).

Modem response to ATI command:
Manufacturer: huawei
Model: E173
Revision: 21.017.07.00.78
IMEI: xxxxx
+GCAP: +CGSM,+DS,+ES

lsusb -v after successful modeswitch:
Code:
Bus 001 Device 112: ID 12d1:1c05 Huawei Technologies Co., Ltd.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x1c05
  bcdDevice            1.02
  iManufacturer           2 HUAWEI
  iProduct                1 HUAWEI Mobile
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          131
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8f  EP 15 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8e  EP 14 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0f  EP 15 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8d  EP 13 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0e  EP 14 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8c  EP 12 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0d  EP 13 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval              32
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0c  EP 12 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8b  EP 11 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8a  EP 10 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)


Offline Profile
PostPosted: Mon Jul 25, 2011 6:46 pm
Site AdminPosts: 4550Joined: Sat Nov 03, 2007 12:30 am
Good find.

The check for the current device configuration is causing problems in few cases, probably due to hardware peculiarities.

The latest version of usb_modeswitch (1.1.8) will work around this problem and fall back to assume configuration 1 in case of trouble. If you want, you can test it by compiling from source and swapping the resulting binary with "/usr/sbin/usb_modeswitch" (after renaming the original file to something else).



Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
13 posts
Users browsing this forum: nagyt234 and 6 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum