Huawei E173 12d1:1446 alias 12d1:1436 alias 12d1:140c

Thomas Schäfer tschaefer at t-online.de
Sun Nov 25 02:23:39 PST 2012


Hi, 

I know the huawei E173 is not the newest modem and it is already supported by 
linux - at least in modem/ppp-mode. Also the E173 seems to have a lot of 
different brandings.I talk here about the O2-Version in Germany (telefonica ).

Here was a discussion about the correct targetID/device-mode:

              http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=657

At this time there was no qmi_wwan module available. 
There were only some contradictions between the recommendation from huawei for 
linux and the practice in the windows-driver.

Now we have qmi_wwan and it works in one point better than the cdc_ether.

While the cdc_ether -mode (with ID 12d1:1436) has a bug with the mac-address, 
the qmi_wwan-interface works as expected.

To remember the steps with cdc_ether:

at^ndisdup=1,1,"apn"
OK
ifconfig wwan0 hw ether 00:01:02:03:04:05  /// workaround for a bug
dhcpcd wwan0

dhcpcd -k wwan0
at^ndisdup=1,0

With qmi I used the old perl testscript qmi-ifupdown.
A test with modemmanager was not successful, because it crashed with segfault. 
The reason for this could be to much wrong interfaces.
For tests I did: 
 echo "12d1 140c" >/sys/bus/usb/drivers/qmi_wwan/new_id

My question is, is it useful to change the general behavior of this device?
ppp still works, but wwan interfaces may be a better choice. And the wwan-
interface with cdc_ether is buggy.

IPv6 did not work. (cdc_ethter nor qmi_wwan)

Now some details:

25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] QMI Device supports 5 services:
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    ctl (1.2)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    wds (1.3)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    dms (1.2)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    nas (1.0)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    cat (0.0)

ati                                                                                                  
Manufacturer: huawei                                                                                 
Model: E173                                                                                          
Revision: 11.126.85.00.209                                                                           
IMEI: XXXXXXXXXXXXXXXX
+GCAP: +CGSM,+DS,+ES 

revision: M6290A-KPRBL-2.2.005037T  1  [Jun 21 2010 20:27:27]


More details/logfiles are attached.

Regards,

Thomas









-------------- next part --------------
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Checking version info (15 retries)...
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 12
<<<<<<   data   = 01:0B:00:00:00:00:00:01:21:00:00:00

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< QMUX:
<<<<<<   length  = 11
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 1
<<<<<<   tlv_length  = 0
<<<<<<   message     = "Get Version Info" (0x0021)

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 48
>>>>>>   data   = 01:2F:00:80:00:00:01:01:21:00:24:00:02:04:00:00:00:00:00:01:1A:00:05:00:01:00:02:00:01:01:00:03:00:02:01:00:02:00:03:01:00:00:00:E0:00:00:00:00

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message (translated)...
>>>>>> QMUX:
>>>>>>   length  = 47
>>>>>>   flags   = 0x80
>>>>>>   service = "ctl"
>>>>>>   client  = 0
>>>>>> QMI:
>>>>>>   flags       = "response"
>>>>>>   transaction = 1
>>>>>>   tlv_length  = 36
>>>>>>   message     = "Get Version Info" (0x0021)
>>>>>> TLV:
>>>>>>   type       = "Result" (0x02)
>>>>>>   length     = 4
>>>>>>   value      = 00:00:00:00
>>>>>>   translated = SUCCESS
>>>>>> TLV:
>>>>>>   type       = "Service list" (0x01)
>>>>>>   length     = 26
>>>>>>   value      = 05:00:01:00:02:00:01:01:00:03:00:02:01:00:02:00:03:01:00:00:00:E0:00:00:00:00
>>>>>>   translated = { [0] = '[ service = 'ctl' major_version = '1' minor_version = '2' ] ' [1] = '[ service = 'wds' major_version = '1' minor_version = '3' ] ' [2] = '[ service = 'dms' major_version = '1' minor_version = '2' ] ' [3] = '[ service = 'nas' major_version = '1' minor_version = '0' ] ' [4] = '[ service = 'cat' major_version = '0' minor_version = '0' ] '}

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] QMI Device supports 5 services:
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    ctl (1.2)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    wds (1.3)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    dms (1.2)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    nas (1.0)
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1]    cat (0.0)
[25 Nov 2012, 09:26:11] [Debug] QMI Device at '/dev/cdc-wdm1' ready
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Allocating new client ID...
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 16
<<<<<<   data   = 01:0F:00:00:00:00:00:02:22:00:04:00:01:01:00:02

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< QMUX:
<<<<<<   length  = 15
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 2
<<<<<<   tlv_length  = 4
<<<<<<   message     = "Allocate CID" (0x0022)
<<<<<< TLV:
<<<<<<   type       = "Service" (0x01)
<<<<<<   length     = 1
<<<<<<   value      = 02
<<<<<<   translated = dms

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 24
>>>>>>   data   = 01:17:00:80:00:00:01:02:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:02:0A

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message (translated)...
>>>>>> QMUX:
>>>>>>   length  = 23
>>>>>>   flags   = 0x80
>>>>>>   service = "ctl"
>>>>>>   client  = 0
>>>>>> QMI:
>>>>>>   flags       = "response"
>>>>>>   transaction = 2
>>>>>>   tlv_length  = 12
>>>>>>   message     = "Allocate CID" (0x0022)
>>>>>> TLV:
>>>>>>   type       = "Result" (0x02)
>>>>>>   length     = 4
>>>>>>   value      = 00:00:00:00
>>>>>>   translated = SUCCESS
>>>>>> TLV:
>>>>>>   type       = "Allocation Info" (0x01)
>>>>>>   length     = 2
>>>>>>   value      = 02:0A
>>>>>>   translated = [ service = 'dms' cid = '10' ]

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Registered 'dms' (version 1.2) client with ID '10'
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Unregistered 'dms' client with ID '10'
[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message...
<<<<<< RAW:
<<<<<<   length = 17
<<<<<<   data   = 01:10:00:00:00:00:00:03:23:00:05:00:01:02:00:02:0A

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Sent message (translated)...
<<<<<< QMUX:
<<<<<<   length  = 16
<<<<<<   flags   = 0x00
<<<<<<   service = "ctl"
<<<<<<   client  = 0
<<<<<< QMI:
<<<<<<   flags       = "none"
<<<<<<   transaction = 3
<<<<<<   tlv_length  = 5
<<<<<<   message     = "Release CID" (0x0023)
<<<<<< TLV:
<<<<<<   type       = "Release Info" (0x01)
<<<<<<   length     = 2
<<<<<<   value      = 02:0A
<<<<<<   translated = [ service = 'dms' cid = '10' ]

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message...
>>>>>> RAW:
>>>>>>   length = 24
>>>>>>   data   = 01:17:00:80:00:00:01:03:23:00:0C:00:02:04:00:00:00:00:00:01:02:00:02:0A

[25 Nov 2012, 09:26:11] [Debug] [/dev/cdc-wdm1] Received message (translated)...
>>>>>> QMUX:
>>>>>>   length  = 23
>>>>>>   flags   = 0x80
>>>>>>   service = "ctl"
>>>>>>   client  = 0
>>>>>> QMI:
>>>>>>   flags       = "response"
>>>>>>   transaction = 3
>>>>>>   tlv_length  = 12
>>>>>>   message     = "Release CID" (0x0023)
>>>>>> TLV:
>>>>>>   type       = "Result" (0x02)
>>>>>>   length     = 4
>>>>>>   value      = 00:00:00:00
>>>>>>   translated = SUCCESS
>>>>>> TLV:
>>>>>>   type       = "Release Info" (0x01)
>>>>>>   length     = 2
>>>>>>   value      = 02:0A
>>>>>>   translated = [ service = 'dms' cid = '10' ]

[25 Nov 2012, 09:26:11] [Debug] Client released
-------------- next part --------------
[  147.908160] usb 1-1: new high-speed USB device number 3 using ehci_hcd
[  148.024670] usb 1-1: New USB device found, idVendor=12d1, idProduct=1446
[  148.024690] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[  148.024702] usb 1-1: Product: HUAWEI Mobile
[  148.024711] usb 1-1: Manufacturer: HUAWEI Technology
[  148.052721] Initializing USB Mass Storage driver...
[  148.053561] scsi4 : usb-storage 1-1:1.0
[  148.055145] scsi5 : usb-storage 1-1:1.1
[  148.055435] usbcore: registered new interface driver usb-storage
[  148.055442] USB Mass Storage support registered.
[  148.817456] usb 1-1: USB disconnect, device number 3
[  152.819184] usb 1-1: new high-speed USB device number 4 using ehci_hcd
[  152.935699] usb 1-1: New USB device found, idVendor=12d1, idProduct=140c
[  152.935713] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[  152.935722] usb 1-1: Product: HUAWEI Mobile
[  152.935730] usb 1-1: Manufacturer: HUAWEI Technology
[  152.942680] scsi10 : usb-storage 1-1:1.4
[  152.944372] scsi11 : usb-storage 1-1:1.5
[  153.951787] scsi 10:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[  153.952546] scsi 11:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
[  153.953406] scsi 10:0:0:0: Attached scsi generic sg1 type 5
[  153.953814] sd 11:0:0:0: Attached scsi generic sg2 type 0
[  153.960168] sd 11:0:0:0: [sdb] Attached SCSI removable disk
[  153.980890] sr0: scsi-1 drive
[  153.980899] cdrom: Uniform CD-ROM driver Revision: 3.20
[  153.982312] sr 10:0:0:0: Attached scsi CD-ROM sr0
[  154.147501] usbcore: registered new interface driver usbserial
[  154.149439] usbcore: registered new interface driver usbserial_generic
[  154.151107] usbserial: USB Serial support registered for generic
[  154.167052] usbcore: registered new interface driver option
[  154.168673] usbserial: USB Serial support registered for GSM modem (1-port)
[  154.168875] option 1-1:1.0: GSM modem (1-port) converter detected
[  154.174995] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[  154.175495] option 1-1:1.1: GSM modem (1-port) converter detected
[  154.192086] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[  154.192202] option 1-1:1.2: GSM modem (1-port) converter detected
[  154.202221] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
[  154.202323] option 1-1:1.3: GSM modem (1-port) converter detected
[  154.207447] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
[  294.597439] usbserial: USB Serial deregistering driver GSM modem (1-port)
[  294.597674] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[  294.597825] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[  294.597976] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[  294.598258] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[  294.598302] usbcore: deregistering interface driver option
[  294.598384] option 1-1:1.3: device disconnected
[  294.598456] option 1-1:1.2: device disconnected
[  294.600045] usb-serial ttyUSB1: option_instat_callback: error -108
[  294.601167] option 1-1:1.1: device disconnected
[  294.603050] usb-serial ttyUSB0: option_instat_callback: error -108
[  294.603310] option 1-1:1.0: device disconnected
[  308.633946] usbcore: registered new interface driver cdc_wdm
[  308.642097] usbcore: registered new interface driver qmi_wwan
[  321.244983] qmi_wwan 1-1:1.0: cdc-wdm0: USB WDM device
[  321.245554] qmi_wwan 1-1:1.0 wwan0: register 'qmi_wwan' at usb-0000:00:1d.7-1, WWAN/QMI device, ce:9c:43:20:53:b3
[  321.246785] qmi_wwan 1-1:1.1: cdc-wdm1: USB WDM device
[  321.247335] qmi_wwan 1-1:1.1 wwan1: register 'qmi_wwan' at usb-0000:00:1d.7-1, WWAN/QMI device, ce:9c:43:20:53:b3
[  321.247449] qmi_wwan: probe of 1-1:1.2 failed with error -1
[  321.247505] qmi_wwan: probe of 1-1:1.3 failed with error -1
-------------- next part --------------
hpmini:~ # /home/thomas/O2-e173/lte-einwahl.sh 
wwan1: will use /dev/cdc-wdm1 for management
>> 01 0f 00 00 00 00 00 01 22 00 04 00 01 01 00 02
<< 01 17 00 80 00 00 01 01 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 0c
>> 01 0c 00 00 02 0c 00 02 00 23 00 00 00
<< 01 49 00 80 02 0c 02 02 00 23 00 3d 00 02 04 00 00 00 00 00 01 33 00 4d 36 32 39 30 41 2d 4b 50 52 42 4c 2d 32 2e 32 2e 30 30 35 30 33 37 54 20 20 31 20 20 5b 4a 75 6e 20 32 31 20 32 30 31 30 20 32 30 3a 32 37 3a 32 37 5d
wwan1: revision: M6290A-KPRBL-2.2.005037T  1  [Jun 21 2010 20:27:27]
wwan1: unable to open /tmp/qmistate.wwan1: Datei oder Verzeichnis nicht gefunden
>> 01 0c 00 00 02 0c 00 03 00 2b 00 00 00
<< 01 1f 00 80 02 0c 02 03 00 2b 00 13 00 02 04 00 00 00 00 00 12 03 00 01 03 0a 11 03 00 03 03 0a
wwan1: PIN1 status: 3, verify_left: 3, unblock_left: 10
>> 01 0f 00 00 00 00 00 04 22 00 04 00 01 01 00 01
<< 01 17 00 80 00 00 01 04 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 01 01
wwan1: connecting...
>> 01 1f 00 00 01 01 00 05 00 20 00 13 00 14 10 00 69 6e 74 65 72 6e 65 74 2e 74 65 6c 65 6b 6f 6d
<< 01 1a 00 80 01 01 02 05 00 20 00 0e 00 02 04 00 00 00 00 00 01 04 00 f8 e7 d3 01
wwan1: got QMI_WDS handle 0x01d3e7f8
wwan1: not releasing QMI_WDS cid=1 while connected
>> 01 10 00 00 00 00 00 06 23 00 05 00 01 02 00 02 0c
<< 01 11 00 80 01 ff 04 00 00 22 00 05 00 01 02 00 02 00
<< 01 17 00 80 00 00 01 06 23 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 0c
wwan1: released sys=2 cid=12 with status=0x0000
hpmini:~ # ifconfig 
eth0      Link encap:Ethernet  Hardware Adresse 3C:D9:2B:1A:C9:9A  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenl?nge:1000 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Lokale Schleife  
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 G?ltigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:59 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenl?nge:0 
          RX bytes:5599 (5.4 Kb)  TX bytes:5599 (5.4 Kb)

wwan1     Link encap:Ethernet  Hardware Adresse CE:9C:43:20:53:B3  
          inet Adresse:10.145.15.153  Bcast:10.145.15.155  Maske:255.255.255.252
          inet6 Adresse: fe80::cc9c:43ff:fe20:53b3/64 G?ltigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenl?nge:1000 
          RX bytes:1046 (1.0 Kb)  TX bytes:11571 (11.2 Kb)

-------------- next part --------------
/home/thomas/O2-e173/lte-einwahl-vodafone-wwan1-neu.sh
wwan1: will use /dev/cdc-wdm1 for management
>> 01 0f 00 00 00 00 00 01 22 00 04 00 01 01 00 02
<< 01 17 00 80 00 00 01 01 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 06
>> 01 0c 00 00 02 06 00 02 00 23 00 00 00
<< 01 49 00 80 02 06 02 02 00 23 00 3d 00 02 04 00 00 00 00 00 01 33 00 4d 36 32 39 30 41 2d 4b 50 52 42 4c 2d 32 2e 32 2e 30 30 35 30 33 37 54 20 20 31 20 20 5b 4a 75 6e 20 32 31 20 32 30 31 30 20 32 30 3a 32 37 3a 32 37 5d
wwan1: revision: M6290A-KPRBL-2.2.005037T  1  [Jun 21 2010 20:27:27]
>> 01 0f 00 00 00 00 00 03 22 00 04 00 01 01 00 01
<< 01 17 00 80 00 00 01 03 22 00 0c 00 02 04 00 00 00 00 00 01 02 00 01 05
>> 01 0c 00 00 01 05 00 04 00 22 00 00 00
<< 01 17 00 80 01 05 02 04 00 22 00 0b 00 02 04 00 00 00 00 00 01 01 00 01
wwan1: QMI_WDS cid=5, wds_handle=0x00000000
>> 01 0c 00 00 02 06 00 05 00 2b 00 00 00
<< 01 1f 00 80 02 06 02 05 00 2b 00 13 00 02 04 00 00 00 00 00 12 03 00 01 03 0a 11 03 00 03 03 0a
wwan1: PIN1 status: 3, verify_left: 3, unblock_left: 10
wwan1: connecting...
>> 01 2c 00 00 01 05 00 06 00 20 00 20 00 19 01 00 06 14 19 00 66 6f 75 72 69 65 72 35 32 2e 74 65 73 74 6e 65 74 7a 2d 76 64 32 2e 64 65
<< 01 13 00 80 01 05 02 06 00 20 00 07 00 02 04 00 01 00 40 00
wwan1: connection failed - status=0x0040
>> 01 10 00 00 00 00 00 07 23 00 05 00 01 02 00 01 05
<< 01 17 00 80 00 00 01 07 23 00 0c 00 02 04 00 00 00 00 00 01 02 00 01 05
wwan1: released sys=1 cid=5 with status=0x0000
>> 01 10 00 00 00 00 00 08 23 00 05 00 01 02 00 02 06
<< 01 17 00 80 00 00 01 08 23 00 0c 00 02 04 00 00 00 00 00 01 02 00 02 06
wwan1: released sys=2 cid=6 with status=0x0000



More information about the libqmi-devel mailing list