Huawei E220 maybe connected?

musicones

New Member
Joined
Mar 21, 2007
Messages
5
Reaction score
0
Hi,

I try to get an connection with my Huawei E220 UMTS USB Modem
on Ubuntu 6.10 Edgy Eft. While searching for an working method I found different possibilities.

Some Infos:
  • Under Windows all works fine and I can connect and browse through web. Modem is OK.
  • I use the cable with the two use connectors.
  • I noticed me all Information from Windows connection, that is the reason for example why I use *99# as phone number etc.



My Connection script:

Code:
#/bin/sh
echo "\nGet off USB-Device as Drive..."
sleep 5
sudo rmmod usb-storage

echo "\nGet USB-Device as Modem..."
sleep 5
sudo modprobe usbserial vendor=0x12d1 product=0x1003

echo "\nLoad driver..."
sleep 15
sudo /home/musicones/Downloads/huaweiAktBbo-i386.out

echo "\nConnect..."
sleep 10
sudo wvdial huawei_e220 && pin && sleep 5 && eplus


My wvdial.conf

Code:
# wvdial for Huawei_e220 UMTS Connection

[Dialer Defaults]
#tuxx: Phone = *99***1# 
Phone = *99#
Username = eplus
Password = gprs
Stupid Mode = 1
Dial Command = ATDT

[Dialer pin]

Init1 = AT+CPIN=0000 

[Dialer huawei_e220]
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem

[Dialer eplus]

Init5 = AT+CGDCONT=1,"IP","internet.eplus.de"

line: Init1 = AT+CPIN=0000 -> my pin is entered instead ;)

My Progress:

Code:
sudo conUMTS

Get off USB-Device as Drive...
^[[A
musicones@musicones-laptop:/usr/bin$ sudo gedit conUMTS
musicones@musicones-laptop:/usr/bin$ sudo conUMTS

USB-Device als Laufwerk entfernen...
ERROR: Module usb_storage does not exist in /proc/modules

Get USB-Device as Modem...

Load driver...
Hladam HUAWEI E220 a prepnem na modem - bbo 06
4 set feature request returned 0
Prepnute-OK, Mas ttyUSB0 ttyUSB1 (cez usbserial vendor=0x12d1 product=0x1003)
pozri /proc/bus/usb/devices

Connect...
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Mar 21 11:17:59 2007
--> Pid of pppd: 8338
--> Using interface ppp0
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> pppd: Č©
--> [06][08]
--> [06][08]
--> local  IP address 10.161.130.193
--> pppd: Č©
--> [06][08]
--> [06][08]
--> remote IP address 10.64.64.64
--> pppd: Č©
--> [06][08]
--> [06][08]
--> primary   DNS address 212.23.97.2
--> pppd: Č©
--> [06][08]
--> [06][08]
--> secondary DNS address 212.23.97.3
--> pppd: Č©
--> [06][08]
--> [06][08]

It stops there until I brake it with STRG+C.

I was surprised to get that far and tried connection by trying to browse google but no result. My Network Connection on my desktop shows me ppp0 with 7 pakets sent and 7 pakets received. I've got an IP-Address and all seems fine, but where is the problem then?

thanks and regards
musicones
 
Might be your DNS servers not setup... in my case I've had to manually put the DNS server ip's in /etc/resolv.conf ... I don't know why.. it should figure them out automatically and put them there.. but well... for me it's never done that..

Check /etc/resolv.conf after you've connected... if it's empty just add those DNS ip's in.. like this:
Code:
nameserver 212.23.97.2
nameserver 212.23.97.3

Hope this helps.. :)
 
Thanks,
but as you can see in the progress code i have posted,
I get an IP-Address and both Nameserver that are found correct automatically.

Code:
...
--> local  IP address 10.161.130.193
--> pppd: Č©
--> [06][08]
--> [06][08]
--> remote IP address 10.64.64.64
--> pppd: Č©
--> [06][08]
--> [06][08]
--> primary   DNS address 212.23.97.2
--> pppd: Č©
--> [06][08]
--> [06][08]
--> secondary DNS address 212.23.97.3
...
 
Uhm... yes.. I know.. I get those too...

The point is that, the fact that wvdial has found them is not enough.. they must be put into /etc/resolv.conf otherwise it will not work..

My dialup looks exactly like that.. wvdial correctly determines the DNS address.. but on my system for some reason it does not put it into /etc/resolv.conf

Trust me on this.. :) have a look in /etc/resolv.conf ... if they are there .. well then this is not your problem..
 
Hi again,

I'm writing you while I'm connected through UMTS under my Ubuntu installation :D
That's the good news.

The bad news, I don't know how and why, :confused:

Before I wrote you under Ubuntu through from my work through lan/internet connection, that works wonderful. To test my connection for umts, I disconnected the lan-cable and tried my scripts I posted before.

Now I'am at home and I only have my UMTS modem. I tried it again.

My steps:

1. Start Ubuntu
2. USB-Device is found, I open an terminal
3. I run my conUMTS script. Error: usb-storage is under use , huh?
4. sudo rmmod usb-storage manually, now it works
5. I try my script again
6. wvdial breaks up with error: PIN requested see here:

Code:
 wvdial huawei_e220 && pin $$ sleep 5 && eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.

7. Changed the init1 with pin into [dialer defaults] to force pin statement.
8. Tried to run script again:
Code:
 wvdial && sleep 5 huawei_e220 && eplus
--> WvDial: Internet dialer version 1.56
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
musicones@musicones-laptop:/usr/bin$ wvdial huawei_e220 eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.eplus.de"
AT+CGDCONT=1,"IP","internet.eplus.de"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Mar 21 18:38:44 2007
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 6089
--> Using interface ppp0
--> Disconnecting at Wed Mar 21 18:39:21 2007
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0192
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0192
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Disconnecting at Wed Mar 21 18:39:27 2007

9. Tried: wvdial huawei_e220 pin eplus:
Code:
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
....repeats the same some times

10. I try it again without the pin:
Code:
sudo wvdial huawei_e220 eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.eplus.de"
AT+CGDCONT=1,"IP","internet.eplus.de"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Mar 21 18:42:02 2007
--> Pid of pppd: 6204
--> Using interface ppp0
--> local  IP address 10.161.1.231
--> remote IP address 10.64.64.64
--> primary   DNS address 212.23.97.3
--> secondary DNS address 212.23.97.2

So what the.... is going on?

P.S. Nameserver are written in /etc/resolv.conf but not from me...

I will disconnect now, restart my Notebook, and if I write you again this evening, than it works...

musicones
 
Hi again,

I'm writing you while I'm connected through UMTS under my Ubuntu installation :D
That's the good news.

The bad news, I don't know how and why, :confused:

Before I wrote you under Ubuntu through from my work through lan/internet connection, that works wonderful. To test my connection for umts, I disconnected the lan-cable and tried my scripts I posted before.
That was probably your problem.. You most likely had a default route set.. which means that it would try to connect through your LAN (even though the cable was disconnected)..
In that case when unplugging from the LAN you should try running: "route del default" from the command line before connecting with the E220..

Now I'am at home and I only have my UMTS modem. I tried it again.

My steps:

1. Start Ubuntu
2. USB-Device is found, I open an terminal
3. I run my conUMTS script. Error: usb-storage is under use , huh?
4. sudo rmmod usb-storage manually, now it works
5. I try my script again
6. wvdial breaks up with error: PIN requested see here:

Code:
 wvdial huawei_e220 && pin $$ sleep 5 && eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
+CME ERROR: SIM PIN required
--> Bad init string.

7. Changed the init1 with pin into [dialer defaults] to force pin statement.
8. Tried to run script again:
Code:
 wvdial && sleep 5 huawei_e220 && eplus
--> WvDial: Internet dialer version 1.56
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
--> Cannot open /dev/modem: No such file or directory
musicones@musicones-laptop:/usr/bin$ wvdial huawei_e220 eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.eplus.de"
AT+CGDCONT=1,"IP","internet.eplus.de"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Mar 21 18:38:44 2007
--> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
--> --> PAP (Password Authentication Protocol) may be flaky.
--> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied
--> --> CHAP (Challenge Handshake) may be flaky.
--> Pid of pppd: 6089
--> Using interface ppp0
--> Disconnecting at Wed Mar 21 18:39:21 2007
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0192
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0192
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Disconnecting at Wed Mar 21 18:39:27 2007

9. Tried: wvdial huawei_e220 pin eplus:
Code:
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0000
AT+CPIN=0000
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
....repeats the same some times

10. I try it again without the pin:
Code:
sudo wvdial huawei_e220 eplus
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.eplus.de"
AT+CGDCONT=1,"IP","internet.eplus.de"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Wed Mar 21 18:42:02 2007
--> Pid of pppd: 6204
--> Using interface ppp0
--> local  IP address 10.161.1.231
--> remote IP address 10.64.64.64
--> primary   DNS address 212.23.97.3
--> secondary DNS address 212.23.97.2

So what the.... is going on?
Argghh!! :eek: :eek: It's the "&& sleep " gremlin again! :eek:

Do not put the "&& sleep &&" bit in the command.. your output clearly shows that this doesn't work..

Best idea seems to be to just disable the pin on the simcard.. easy and hassle free. :)

P.S. Nameserver are written in /etc/resolv.conf but not from me...
Yep... that's what it's meant to do.. Still wonder why mine doesn't... :confused:
 
Hi again,

ok I'm here, seems I've got it :D. Not perfect, but I've got it.
@redarrow: You are right && sleep && doesn't work.

Next to do is to optimize the call, that I don't need to run wvdial twice.
To unset the pin is no option, because of safety.

Current Situation:

I need to call wvdial twice.

First: wvdial huawei_e220 pin eplus
= the pin goes through, but I get error messages, see following codes

Seconde: wvdial huawei_e220 eplus
= as the pin is sent by the first call, I do a recall without the pin. I don't know why but then I get a connection.

AIM: I want only one call of wvdial that should result in an connection.

Output of first call:
Code:
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=0192
AT+CPIN=0192
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.eplus.de"
AT+CGDCONT=1,"IP","internet.eplus.de"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Thu Mar 22 11:42:28 2007
--> Pid of pppd: 10194
--> Using interface ppp0
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> pppd: �9���[0b][06][08]@[0c][06][08]
--> Disconnecting at Thu Mar 22 11:43:05 2007
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.

I have taken a look in to /var/log/messages:

Code:
pppd 2.4.4 started by root, uid 0
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Warning - secret file /etc/ppp/chap-secrets has world and/or group access
CHAP authentication succeeded
CHAP authentication succeeded
[17192199.148000] PPP BSD Compression module registered
[17192199.192000] PPP Deflate Compression module registered
IPCP: timeout sending Config-Requests 
Connection terminated.
Modem hangup
Exit.

So why this timeout and why this hanging up.
This all hapens on the first call of wvdial (that one with pin)

musicones
 
Last edited:
I'm getting the same result with my e220. The first time with the pin:
Code:
root@sky-desktop:~# wvdial pin2 huewai_e220 vdata
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","vdata"
AT+CGDCONT=1,"IP","vdata"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Thu Mar 22 20:01:27 2007
--> Pid of pppd: 5904
--> Using interface ppp0
--> Disconnecting at Thu Mar 22 20:02:03 2007
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.
--> Auto Reconnect will be attempted in 5 seconds
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: AT+CPIN=7092
AT+CPIN=7092
+CME ERROR: operation not allowed
--> Bad init string.
--> Disconnecting at Thu Mar 22 20:02:09 2007

And the second time without the pin:
Code:
root@sky-desktop:~# wvdial huewai_e220 vdata
--> WvDial: Internet dialer version 1.55
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","vdata"
AT+CGDCONT=1,"IP","vdata"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Thu Mar 22 20:02:16 2007
--> Pid of pppd: 5935
--> Using interface ppp0
--> local  IP address 10.142.95.178
--> remote IP address 10.142.0.1
--> primary   DNS address 196.38.218.6
--> secondary DNS address 168.210.2.2
--> Connect time 0.1 minutes.
--> local  IP address 10.142.95.178
--> remote IP address 10.142.0.1
--> primary   DNS address 196.38.218.6
--> secondary DNS address 168.210.2.2

I've also noticed that when I try it with pin de-activated it doesn't pick up a network - the two quick green flashes on the e220. But it worked with pin de-activated a few days ago :confused:
 
Sending PIN

RE: The PIN issue.. There are two possible solutions that I can think of..

First off you could try manually sending the PIN before running wvdial with a simple command like:
Code:
echo "AT+CPIN=1232" > /dev/ttyUSB0
You could simply create a dialup script that first calls this and then runs wvdial... over here you could validly put in a delay if needed.. i.e:
Code:
#!/bin/sh
echo "AT+CPIN=1232" > /dev/ttyUSB0
sleep 5
wvdial <list of params>
That should perform "dialup" with one simple script..


The second idea I have is if the "echo xxx > /dev/ttyUSB0" command doesn't work .. on my Novatel U740 it did nothing ... it works fine on my E220 though...

Basically it requires editing the wvdial.conf a bit:

You need to create a new section and call it something like "user" then you need to remove the username, password and number from the "defaults" section and put it here..
Like this:
Code:
[Dialer Defaults]
Stupid Mode = 1
Dial Command = ATDT

[Dialer user]
Phone = *99***1#
Username = username
Password = password
Now you call wvdial twice like this:
Code:
wvdial huawei_e220 pin
wvdial huawei_e220 user internet
On the first call wvdial will initialise the card and send it the PIN, but it will then terminate with the error "no valid username or password specified" .. on the second run you include the "user" section which will specifies the username, password and dialup number.. so it'll connect..
As I understand it once the PIN only needs to be sent to the device once each time it gets started up.. (i.e., plugged in)

You still need to call wvdial twice with this method, but its more convienient as you can also put it in a script which runs both commands..

Hope this is of some use... :)
 
Hi again,

i tried

echo "AT+CPIN=0000" > /dev/ttyUSB0

I got connected with an IP-Address but the returned DNS IPs were wrong.

DNS should be
nameserver 212.23.97.2
nameserver 212.23.97.3

I got some else and had no possibility to browse.

But an other question:

How can I disconnect? Usually I make an STRG+C but that doesn' t always work.

regards
musicones
 
How can I disconnect? Usually I make an STRG+C but that doesn' t always work.
You just need to "kill" wvdial or pppd ...

I have a script which just executes:
Code:
ps -e | grep wvdial | `awk '{ system ( "kill "$1 ) }'`
That has always worked for me... :)

You could simply replace "wdial" with pppd to kill pppd directly as well... problem with doing that though is that I find that wvdial simply just reconnects..

That command may be overkill though... I believe there is an easier command for killing a process but I forget what it is.. :o
 
Top
Sign up to the MyBroadband newsletter
X