Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
molipha
Posts: 4
Joined: 20 Jan 2012, 17:18

Almost there... but not quite HUAWEI E173 Movistar

Post by molipha » 20 Jan 2012, 17:45

Hi,

I have had a taste of success but it doesn't last. Plugging in the modem and running modeswitch results in being asked for my PIN, so something is going on. One time the Movistar connection software started by itself with a connection but it didn't last. I connect with Network Manager but the connection drops immediately. Sakis3g cannot connect - to what, I'm not sure, modem? network? It just says "can't connect".

Here is my setup:
lsusb
-------
lsusb:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 021: ID 058f:6364 Alcor Micro Corp.
Bus 002 Device 003: ID 064e:a216 Suyin Corp.
Bus 001 Device 022: ID 12d1:1c24 Huawei Technologies Co., Ltd.

E173 config file
-------------------
#########

DefaultVendor= 0x12d1
DefaultProduct= 0x1c24

TargetVendor= 0x12d1
TargetProduct= 0x1c12

CheckSuccess=10

MessageEndpoint= 0x0f
MessageContent="55534243123456780000000000000011062000000100000000000000000000"

compu$:~/sudo usb_modeswitch -c /etc/usb_modeswitch.d/E173

Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
Found devices in default mode, class or configuration (1)
Accessing device 022 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using endpoints 0x0f (out) and 0x8f (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("usb-storage")
OK, driver "usb-storage" detached

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
Device is gone, skipping any further commands

Checking for mode switch (max. 10 times, once per second) ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...
Searching for target devices ...

Found target device, now opening
Found correct target device

Mode switch succeeded. Bye.

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 20 Jan 2012, 19:20

One thing to look at: you should make sure there is no interference between any included software on the device and the common Linux network tools. If I were you, I'd leave alone the custom software (and probably de-install it) for now.

Also, there may be a problem with very recent versions of "modem-manager", a helper application for Network Manager. You might have to downgrade if your modem is affected too. See:

http://bugs.launchpad.net/bugs/868034

Before all others though, we need to make sure that you get the serial ports you need; i.e. the driver for modems must be bound to your device.

The IDs of your stick are not in the list of known configurations, but it's really easy to add them. Afterwards, the switching process will work automatically and the ports will be activated as well.

Just put your config file named as "12d1:1c24" in "/etc/usb_modeswitch.d". Then add a line to
"/lib/udev/rules.d/40-usb_modeswitch.rules" with the same values; you can easily copy and adapt any existing rule line in that file.

I suggest to enable logging right away in "/etc/usb_modeswitch.conf" in order to see exactly what happens after plugging in the stick.


molipha
Posts: 4
Joined: 20 Jan 2012, 17:18

Still almost there... but not quite HUAWEI E173 Movistar

Post by molipha » 20 Jan 2012, 20:10

>>>Just put your config file named as "12d1:1c24" in "/etc/usb_modeswitch.d".
Hmmm. I copied /etc/usb_modeswitch.d/E173 to a file named: "12d1:1c24". Is that what you meant?

OK, this is in /lib/udev/rules.d/40-usb_modeswitch.rules
# Huawei E173 (Viettel 3G)
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c24", RUN+="usb_modeswitch '%b/%k'"
look OK?

Finally, I have logging enabled but am not sure where to find the log... /var/log doesn't contain any files starting with "usb".

Many thanks.

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 20 Jan 2012, 20:26

Hmm, can you check if the "tcl" package is installed?

What happens if you enter "tclsh"?
If you see a "%" prompt, enter "exit", you are fine.

You should get a log a moment after you plug in your stick.


molipha
Posts: 4
Joined: 20 Jan 2012, 17:18

Still almost there... but not quite HUAWEI E173 Movistar

Post by molipha » 20 Jan 2012, 21:11

Yup. I get the % prompt but no log.

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 21 Jan 2012, 00:57

Again, if you have installed any software from the stick, the modem may be grabbed by annother tool from Huawei.

To see if udev is doing its job, you can set it to debug mode. It's easy: edit "/etc/udev/udev.conf" and set "udev_log" to "debug". This results in a lot of syslog output which you can search (after plugging in) for "usb_modeswitch".


molipha
Posts: 4
Joined: 20 Jan 2012, 17:18

CONNECTING NOW! Thanks.

Post by molipha » 21 Jan 2012, 00:57

:D

sheena
Posts: 1
Joined: 04 Feb 2012, 00:52

Post by sheena » 04 Feb 2012, 01:03

Hello,
I've been having similar problems.
The modem is E173, I'm running debian squeeze. No network-manager installed. Previously I was using sakis3g for vodafone modem (also huawei) and it worked fine.
In my /etc/usb_modeswitch.conf I have:

DefaultVendor= 0x12d1
DefaultProduct=0x1446

#TargetVendor= 0x12d1
#TargetProduct= 0x140c
#CheckSuccess=5

MessageEndpoint = 0x0f
MessageContent="5553424312345678000000000000001106 0000000000000000000000000000"

in /etc/usb_modeswitch.d/12d1:1446 there is:

DefaultVendor= 0x12d1
DefaultProduct=0x1446

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

CheckSuccess=20
MessageContent="5553424312345678000000000000001106 0000000000000000000000000000"

I've also added a line in /lib/udev/rules.d/40-usb_modeswitch.rules

When I start sakis, I enter apn pp.internet, username and password gprs. If i leave it blank, it fails to connect at once. If I enter them, it fails too, but after second attempt to connect.
On ubuntu I've managed to connect with network-manager once (just by accident I suppose...).
What can be wrong with sakis? Are there any other ways for ppp?
Any help would be appreciated, I run out of ideas and its driving me crazy :(

Josh
Site Admin
Posts: 6593
Joined: 03 Nov 2007, 00:30

Post by Josh » 06 Feb 2012, 19:25

Unfortunately, I can't give support for sakis3g, and I haven't heard from Sakis Dimopoulos for a long time now.

I'm not sure why you modified the device config file, it should work as it is. Also, don't put any device configuration into /etc/usb_modeswitch.conf. It's supposed to hold just global settings.

usb_modeswitch can only switch the mode of a device, it is not able to do anything further. If you don't use Network Manager and sakis3g fails, you might have to try other connection tools like wvdial, umtsmon or comgt.


rlobos
Posts: 2
Joined: 26 Mar 2012, 22:41

Post by rlobos » 26 Mar 2012, 23:04

Hi Josh,

Sorry to bother you, but I have a curious situation here. I was trying to use a Huawei model 173s-6 Movistar, and I have created the device file as /etc/usb_modeswitch.d/12d1:1c24, and configured the /etc/udev/rules.d/40-usb_modeswitch.rules file adding the 1c24 device. The modem switches already, from mass storage to Modem with 4 ttys (ttyUSB0 to ttyUSB3) and a SD card interface, but when I try to do a "pppd call ..." command, any interface responses. I have a lot of modems here, and all of them works fine, except this one. Could you help me please?

rlobos
Posts: 2
Joined: 26 Mar 2012, 22:41

Post by rlobos » 26 Mar 2012, 23:07

By the way, this modem works fine on windows XP, and I'm using an kernel 2.6.30 with an Angstrom filesystem.

Post Reply