Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
Husio
Posts: 4
Joined: Thu May 12, 2011 9:11 am

[SOLVED] Huawei e173 configuraiton

Post by Husio » Thu May 12, 2011 9:25 am

Hi,
after few days of working, I can no longer connect using my Huawei e173 modem. The first installation was on windows and after that, modem has worked on my linux machine with no issues, until now. Now, wvdial refuses to connect:

Code: Select all

$ wvdial
--> WvDial: Internet dialer version 1.61
--> Cannot open /dev/ttyUSB0: Device or resource busy
--> Cannot open /dev/ttyUSB0: Device or resource busy
--> Cannot open /dev/ttyUSB0: Device or resource busy

$ ls /dev/ttyUSB*
/dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2
AFAIK, after switch from 1446, it should change into 140c, but it's changing into 1436 instead:

Code: Select all

$ lsusb | grep Huawei
Bus 001 Device 026: ID 12d1:1436 Huawei Technologies Co., Ltd. 
usb_modeswitch is being runned with default, 12d1:1446 configuration:

Code: Select all

DefaultVendor= 0x12d1
DefaultProduct=0x1446

TargetVendor=  0x12d1
TargetProductList="1001,1406,140b,140c,1412,141b,1433,14ac"

CheckSuccess=20

MessageContent="55534243123456780000000000000011062000000100000000000000000000"

Code: Select all

May 12 09:24:38 archbook kernel: [ 7280.806101] usb 1-1: new high speed USB device using ehci_hcd and address 27
May 12 09:24:39 archbook kernel: [ 7280.934118] scsi62 : usb-storage 1-1:1.0
May 12 09:24:39 archbook kernel: [ 7280.934918] scsi63 : usb-storage 1-1:1.1
May 12 09:24:39 archbook usb_modeswitch: switching 12d1:1446 (HUAWEI Technology: HUAWEI Mobile)
May 12 09:24:39 archbook kernel: [ 7281.578139] usb 1-1: USB disconnect, address 27
May 12 09:24:43 archbook kernel: [ 7285.709372] usb 1-1: new high speed USB device using ehci_hcd and address 28
May 12 09:24:43 archbook kernel: [ 7285.838403] option 1-1:1.0: GSM modem (1-port) converter detected
May 12 09:24:43 archbook kernel: [ 7285.838669] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
May 12 09:24:43 archbook kernel: [ 7285.841424] cdc_ether 1-1:1.1: wwan0: register 'cdc_ether' at usb-0000:00:1d.7-1, Mobile Broadband Network Device, 02:50:f3:00:00:00
May 12 09:24:43 archbook kernel: [ 7285.841917] option 1-1:1.3: GSM modem (1-port) converter detected
May 12 09:24:43 archbook kernel: [ 7285.842126] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
May 12 09:24:43 archbook kernel: [ 7285.842449] option 1-1:1.4: GSM modem (1-port) converter detected
May 12 09:24:43 archbook kernel: [ 7285.842675] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
May 12 09:24:43 archbook kernel: [ 7285.843285] scsi67 : usb-storage 1-1:1.5
May 12 09:24:43 archbook kernel: [ 7285.844155] scsi68 : usb-storage 1-1:1.6
May 12 09:24:44 archbook modem-manager[3734]: <info>  (ttyUSB0) opening serial port...
May 12 09:24:44 archbook kernel: [ 7286.844556] scsi 68:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
May 12 09:24:44 archbook kernel: [ 7286.845155] sd 68:0:0:0: Attached scsi generic sg1 type 0
May 12 09:24:44 archbook kernel: [ 7286.845427] scsi 67:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
May 12 09:24:44 archbook kernel: [ 7286.849419] sr0: scsi-1 drive
May 12 09:24:44 archbook kernel: [ 7286.849954] sr 67:0:0:0: Attached scsi generic sg2 type 5
May 12 09:24:44 archbook kernel: [ 7286.851019] sd 68:0:0:0: [sdb] Attached SCSI removable disk

I've found similar issue on this forum, but it does not solve any problem: http://www.draisberghof.de/usb_modeswit ... .php?t=561
Last edited by Husio on Thu May 12, 2011 6:10 pm, edited 1 time in total.

Josh
Site Admin
Posts: 6549
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu May 12, 2011 12:24 pm

You need to add "1436" to the TargetProductList in any case.

There are several cases of Huawei devices which have two different target IDs. They expose a different one when switched with the message provided by Huawei engineers (the one containing "11062") as opposed to the original sniffed one:
"55534243000000000000000000000011060000000000000000000000000000"

If you want, you can try the latter and see if you get the other target ID.


Husio
Posts: 4
Joined: Thu May 12, 2011 9:11 am

Post by Husio » Thu May 12, 2011 12:38 pm

Josh wrote:You need to add "1436" to the TargetProductList in any case.
Done.
Josh wrote: There are several cases of Huawei devices which have two different target IDs. They expose a different one when switched with the message provided by Huawei engineers (the one containing "11062") as opposed to the original sniffed one:
"55534243000000000000000000000011060000000000000000000000000000"

If you want, you can try the latter and see if you get the other target ID.
Changing to that MessageContent cause modem to change into Bus 001 Device 037: ID 12d1:140c Huawei Technologies Co., Ltd. but also hangs the system for few seconds.

In both cases, modem is not operational and wvdial is not connecting.

Josh
Site Admin
Posts: 6549
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu May 12, 2011 4:02 pm

Hmm, I have no idea why wvdial is failing for you. The switching seems to work and the "option" driver is active for the device.

Can you access it with a terminal program like minicom?


Husio
Posts: 4
Joined: Thu May 12, 2011 9:11 am

Post by Husio » Thu May 12, 2011 4:27 pm

minicom -D /dev/ttyUSB0 works fine with modem switched to 1436 mode. Response is

Code: Select all

AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0                                                                                       
OK 
Maybe my wvdial configuration is not correct? This is typical configuration for that modem and provider:

Code: Select all

[Dialer Defaults]
Modem = /dev/ttyUSB0
Baud = 57600
Init1 = ATH
Init2 = ATE1
Init3 = AT+CGDCONT=1, "IP", "internet"
Dial Command = ATD
Phone = *99#
Stupid mode = yes
Username = "blank"
Password = "blank"

Josh
Site Admin
Posts: 6549
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu May 12, 2011 4:40 pm

On a first glance I would skip the "Baud" entry which is useless for USB.

Also, I'd rather remove the spaces from the "AT+CGDCONT" parameters.

Apart from that, maybe you can find a working configuration by googling for your provider and "wvdial".

Husio
Posts: 4
Joined: Thu May 12, 2011 9:11 am

Post by Husio » Thu May 12, 2011 6:10 pm

Solved!

It was wvdial issue and I've solved it with mkdir /var/lock command.

https://bbs.archlinux.org/viewtopic.php ... 45#p570145

Post Reply