Can not get USB Modem Huawei E220 to connect to internet.

I can not get NetworkManager to handle my Huawei E220 usb modem. I have searched forums and tried a lot of things. I have just upgraded from openSUSE 11.2 to openSUSE 11.3 using zypper. It seems to work fine except that umtsmon stopped to work, so for now my laptop has no connetion to internet at all. Here are some information about my settings:

I have used usb_modeswitch to make the device a modem. Am I right if I say that usb_modeswitch is a one time command, or does it swap the setting each time it is called? Anyhow lsusb states that the device is a modem. (All the time.)

/home/freefox> lsusb
...
Bus 007 Device 003: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem
...

Here is the log from NetworkManager. I have seen reason 1 and 13 as failures. Where can I get deeper information about the different reasons? Reason 1 appears if I attach the modem after starting the computer. And trying to connect off course.

Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) starting connection 'tre'                                                                                          
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 3 -> 4 (reason 0)                                                                                       
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...                                                                         
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...                                                                           
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.                                                                            
Aug  5 08:22:11 linux-walkabout NetworkManager: <WARN>  stage1_prepare_done(): GSM modem connection failed: (32) Sending command failed: device is not enabled
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 4 -> 9 (reason 1)
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Marking connection 'tre' invalid.
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) failed.
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 9 -> 3 (reason 0)
Aug  5 08:22:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): deactivating device (reason: 0).

Is it the connection between the computer and the modem or between the modem and the RBS?

Reason 13 appears if I have the modem attached when I start the computer.

Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) starting connection 'tre'
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 3 -> 4 (reason 0)
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) scheduled...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) started...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 1 of 5 (Device Prepare) complete.
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 2 of 5 (Device Configure) scheduled...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 2 of 5 (Device Configure) starting...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 4 -> 5 (reason 0)
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 2 of 5 (Device Configure) successful.
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 3 of 5 (IP Configure Start) scheduled.
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 2 of 5 (Device Configure) complete.
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 3 of 5 (IP Configure Start) started...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 5 -> 7 (reason 0)
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Starting pppd connection
Aug  5 09:07:11 linux-walkabout NetworkManager: <debug> [1280992031.818979] nm_ppp_manager_start(): Command line: /usr/sbin/pppd nodetach lock nodefaultroute ttyUSB0 noipdefault noauth nobsdcomp nodeflate usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam /org/freedesktop/NetworkManager/PPP/0 plugin /usr/lib64/pppd/2.4.5/nm-pppd-plugin.so
Aug  5 09:07:11 linux-walkabout NetworkManager: <debug> [1280992031.838330] nm_ppp_manager_start(): ppp started with pid 2587
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 4 of 5 (IP6 Configure Get) scheduled...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 3 of 5 (IP Configure Start) complete.
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 4 of 5 (IP6 Configure Get) started...
Aug  5 09:07:11 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) Stage 4 of 5 (IP6 Configure Get) complete.
Aug  5 09:07:18 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 7 -> 9 (reason 13)
Aug  5 09:07:18 linux-walkabout NetworkManager: <info>  Marking connection 'tre' invalid.
Aug  5 09:07:18 linux-walkabout NetworkManager: <info>  Activation (ttyUSB0) failed.
Aug  5 09:07:18 linux-walkabout NetworkManager: <info>  (ttyUSB0): device state change: 9 -> 3 (reason 0)
Aug  5 09:07:18 linux-walkabout NetworkManager: <info>  (ttyUSB0): deactivating device (reason: 0).
Aug  5 09:07:21 linux-walkabout NetworkManager: <debug> [1280992041.000652] ensure_killed(): waiting for ppp pid 2587 to exit
Aug  5 09:07:21 linux-walkabout NetworkManager: <debug> [1280992041.000878] ensure_killed(): ppp pid 2587 cleaned up

In both cases KNetworkManager applet inactivates ‘tre’ so that it is not possible to try again without a restart. Clicking ‘tre’ again has no effect at all.
Can I restart the applet somehow?

Installed versions:
ModemManager-0.3-4.2
NetworkManager-0.8-7.4
ppp-2.4.5_git200910141435-5.2
kernel 2.6.34-12

Any ideas how to continue?

/freefox

Where can I get deeper information about the different reasons?

If I’m correct it is the NM_DEVICE_STATE_REASON that is shown, from the document NetworkManager D-Bus Interface Specification version 0.7.0.

NM_DEVICE_STATE_REASON_UNKNOWN = 0
    The reason for the device state change is unknown. 
NM_DEVICE_STATE_REASON_NONE = 1
    The state change is normal. 
NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13
    The PPP service disconnected unexpectedly. 

Guess it indicates that something is bad with ppp? How do I verify that ppp is ok?

Br,
freefox

While trying to sort your issue with NM, I would get connectivity via a traditional dialling utility like wvdial (or kppp).

Progress! The APN was plain wrong. I discovered that while setting up kppp. (Thanks for the tip, deano_ferrari!)

New problem: The routing table does not get correctly setup.

/home/freefox # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
loopback        *               255.0.0.0       U     0      0        0 lo
home/freefox # route add default dev ppp0
linux-walkabout:/home/freefox # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.64.64.64     *               255.255.255.255 UH    0      0        0 ppp0
loopback        *               255.0.0.0       U     0      0        0 lo
default         *               0.0.0.0         U     0      0        0 ppp0

The route add … fix the problem for the moment, but how do I solve it permanently?
But that is a new question, in a new thread…

Thanks for stopping by.
freefox

Yes, I think you need to do this manually, or make it part of a connection script. You could use gnome-ppp front end. AFAIU, it will take care of this for you. I just use wvdial for testing.

Edit: Having said all that, it looks like there may be an option to check that in wvdial.conf as detailed here.

It would be great to have wvdial as a second choice, whenever NetworkManager causes trouble.
I remember having a problem with wvdial configuration.
It requires a name and a password, but for the USB modem there are no such things. How do I manage that?

It depends on your broadband provider.

This is a good reference.

For example:

Modem = /dev/ttyACM0
Stupid mode = 1
phone= *99#
Username = *
Password = *

However, you can usually google for the applicable info relevant to your broadband provider.

I had a similar problem with my Huawei E160E. The fix was to upgrade ppp to 2.4.5. See the report at #592444 - network-manager 0.8.1-1 requires ppp 2.4.5 for working mobile broadband support - Debian Bug report logs](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=592444)