Community > Technical Forum > Mobile Broadband >

Thread: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick

PermLink - Replies: 13 - Pages: 1     Last Post: 2008-11-10 18:26 by: GeorgeVita »
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-08-04 19:22 Reward: 0 Thread Level: General User
  Click to reply to this thread Reply
Yes, it is very easy to use the E170 on Ubuntu 8.04 OS!

Now E170 is my only connection to the Internet, running on my Toshiba Satellite L30-113 laptop with the new Ubuntu 8.04.1 operating system ("Hardy Heron"), and also note that I am an absolute beginner to Linux environment.

After various searches to Linux Forums I finally used the following parameters which work fine with provider Cosmote here in Greece.

At first you have to edit the wvdial.conf (parameters file for the wvdial dialer program) so from a Terminal window execute the following command:

sudo gedit /etc/wvdial.conf

give your password to "[sudo] password for user:" type it (not displayed and press ENTER)

then you must add the following parameters to the wvdial.conf (configuration file for the dialer program)

[Dialer hspa]
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Baud = 115200
Username = user
Password = pass
Phone = *99#
Stupid Mode =1
Init1 = ATZ
Init2 = AT&F; E1 V1 X1 &D2; &C1; S0=0
Init3 =AT+CGDCONT=1,"IP","internet"

(possibly you have to check the Phone Number if it is different for your provider, and also the Init3 maybe you have to put another string in the place of "internet")

After editing we SAVE the file.

Now insert your modem to the USB port, wait for 5 seconds and from a terminal window execute the command:

sudo wvdial hspa

(also give your password if asking for it)

After some messages including "CONNECT 7200000" comes the final "--> secondary DNS address ..."
and you are connected. Minimize the terminal window and click on the Firefox shortcut, unselect the "work off line" option from "file" menu (if selected) and Browse!

Please note that while we do not have a "real software driver" we cannot see traffic, type of connection or other parameters.

To disconnect, press CTRL-C at the terminal window which you made the connection.

As references you can read the data given via the "man wvdial" and "man wvdial.conf" commands (from a terminal window). Also take a look to that Init String that uses the E170 (or possibly E169 or E220) at the windows connection (at the log file of the modem).

Feel free to ask me test again anything of the above on my laptop.
x00114004
Huawei Staff
Posts: 516
Expert Points: 500
Useable Points: 10500
Registered: Nov 19, 2007
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-08-05 13:42
  Click to reply to this thread Reply
Thanks for your share!  <IMG src="/jive4/scripts/RTFeditor/images/emoticons/happy.gif" border=0>  
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-08-16 20:03
  Click to reply to this thread Reply
I can confirm that E220 works fine (like E170), without any modification to the wvdial.conf file (note: in both modems the SIM-PIN check was disabled).
chefbram
General User
Posts: 2
Expert Points: 0
Useable Points: 10000
Registered: Aug 21, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-08-24 06:39
  Click to reply to this thread Reply
George!!!
I also live in Greece( Rhodos, ) and have Cosmote with the E170.
Thing is, I tried your tutorial.., but the thing is: it won t recognize my USB stick as a modem , i think...
Nothing is working


bram@bram-laptop:~$ sudo wvdial hspa
--> WvDial: Internet dialer version 1.60
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
--> Cannot open /dev/ttyUSB0: No such file or directory
bram@bram-laptop:~$


this is waht i get.. Any help would be appreciated!!! Thanks!@!!!
Mail me at chefbram@hotmail.com please...
P.S. it works in Vista.., but I hate windows....
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-08-25 10:52
  Click to reply to this thread Reply
Hi chefbram,
probably the system did not recognize well (or stable) the modem. Remove it, wait 10 seconds, plug it again, wait 10 seconds, from a terminal window give the command: ls -la /dev/ttyUSB* (which lists all devices connected to your system as ttyUSBx). You have to see at least the ttyUSB0. Then dial again with the command: sudo wvdial hspa (give password if asked). Also check and remove the "work offline" tick on Firefox menu File, Work offline (by pressing ALT-F W).
Bye
George
angel104
General User
Posts: 1
Expert Points: 0
Useable Points: 10000
Registered: Sep 7, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-07 22:25
  Click to reply to this thread Reply
No. The problem is that the OP must blacklist the airprime module in /etc/modprobe.d/blacklist
Use sudo gedit to do so.
Even then in the UK the wvdial.conf file given DOES NOT WORK. Original poster said change string as Internet. But change it into what?
These strange and criptic options like Init1 = ATZ mean nothing intuitive. Need help.
Modem works fine. dials out. But receives a response like a prompt or something and then wvdial fails and loops.
Here is my wvdial.conf file
This is the file as /etc/wvdial.conf
[Dialer hspa]
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Baud = 115200
Phone = *99#
Username = 'David Roderick'
Password = ''
Init = ATZ
Init2 = AT&F; E1 V1 X1 X1 &D2; &C1; S0=0
Init3 = AT+CGDCONT=1, "IP", "internet"

which does the following.

david@david-laptop:/media/SD$ wvdial hspa
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT&F; E1 V1 X1 X1 &D2; &C1; S0=0
AT&F; E1 V1 X1 X1 &D2; &C1; S0=0
OK
--> Sending: AT+CGDCONT=1, "IP", "Internet"
AT+CGDCONT=1, "IP", "Internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT 53600
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Sun Sep 7 15:14:19 2008
--> 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: 6157
--> Using interface ppp0
--> Disconnecting at Sun Sep 7 15:14:20 2008
--> 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: ATZ
ATZ
OK
--> Sending: AT&F; E1 V1 X1 X1 &D2; &C1; S0=0
AT&F; E1 V1 X1 X1 &D2; &C1; S0=0
OK
--> Sending: AT+CGDCONT=1, "IP", "Internet"
AT+CGDCONT=1, "IP", "Internet"
OK
--> Modem initialized.

and does it again after waiting 15 seconds
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-08 04:58
  Click to reply to this thread Reply
Hi,

in your /etc/wvdial.conf file you did not have the following line:
Stupid Mode = 1
which will continue after "Carrier detected" without "Waiting for prompt".
(you can find more info from the prompt command: man wvdial.conf)

The "Init" it works but is better to have it as "Init1". Into Init2 you have twice the X1 command and also is more typical to close quotes or double quotes when supplying data to the modem (Username, Password, etc).

Note: the command AT+CGDCONT sets the APN that is "set & controlled" by the provider (some providers have different for pre-paid internet than for a contract). If you are using windows with the same modem you can search into the log file of the modem where all AT commands are "echoed" and find the appropriate string. Otherwise the provider's customer service knows the specific data.

Regards
George

P.S.: I would like to add the following technical note:
The basic point in my Init2 is the AT&F; which restores all parameters of the modem to the "factory settings". This gives more stability when you are using the modem with other computers or dialling with other programs because a changed & stored profile (ex. from Windows) are ignored.
chefbram
General User
Posts: 2
Expert Points: 0
Useable Points: 10000
Registered: Aug 21, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-08 05:38
  Click to reply to this thread Reply
yes, okay...
It IS really simple: excactly follow these steps..that George suggested
All I need to do is stick in the webstick when i startup the computer( Aspire 7520), otherwise it won recognize it.
in Firefox, itś important to know you have to go off öffline"modus
But it works like a charm!!
Already told the ppl at cosmote too!

George, Thanks!
ggeorgan
General User
Posts: 3
Expert Points: 0
Useable Points: 10000
Registered: Sep 23, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-23 16:51
  Click to reply to this thread Reply
Thanks for a very useful post and thread.
Two points that might help some users :
1. PIN must really be disabled, perhaps on a Windows machine. If PIN has not beeb disables an error occurs. Any ideas on how to do this in Linux without going through Windows ?
2. Network settings must be set to allow the computer to use the IP assigned by the provider. I had static IP's for the computer wired and wireless networks, so ppp connected but could not access any network resources. Setting ppp to dhcp solved that problem.
ggeorgan
General User
Posts: 3
Expert Points: 0
Useable Points: 10000
Registered: Sep 23, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-23 16:57
  Click to reply to this thread Reply
Thanks for a very useful post and thread.
Two points that might help some users :
1. PIN must really be disabled, perhaps on a Windows machine. If PIN has not beeb disables an error occurs. Any ideas on how to do this in Linux without going through Windows ?
2. Network settings must be set to allow the computer to use the IP assigned by the provider. I had static IP's for the computer wired and wireless networks, so ppp connected but could not access any network resources. Setting ppp to dhcp solved that problem.
ggeorgan
General User
Posts: 3
Expert Points: 0
Useable Points: 10000
Registered: Sep 23, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-23 16:58
  Click to reply to this thread Reply
Thanks for a very useful post and thread.
Two points that might help some users :
1. PIN must really be disabled, perhaps on a Windows machine. If PIN has not beeb disables an error occurs. Any ideas on how to do this in Linux without going through Windows ?
2. Network settings must be set to allow the computer to use the IP assigned by the provider. I had static IP's for the computer wired and wireless networks, so ppp connected but could not access any network resources. Setting ppp to dhcp solved that problem.
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-09-24 04:25
  Click to reply to this thread Reply
Additional info to USE the SIM PIN check:

The following wvdial.conf integrates a SIM PIN check function. Some lines moved to "default" session in order to have it more compact (no problem if dialling only with the HSPA modem).

The file /etc/wvdial.conf looks like:

[Dialer Defaults]
New PPPD = yes
Dial Command = ATDT
Dial Attempts = 1
Modem = /dev/ttyUSB0
Modem Type = Analog Modem
ISDN = 0
Baud = 115200
Username = user
Password = pass
Init1 = ATZ
Init2 = AT&F; E1 V1 X1 &D2; &C1; S0=0

[Dialer hspa]
Phone = *99#
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","internet"

[Dialer myPIN]
Init4 = AT+CPIN=1234


IF SIM PIN CHECK WILL BE USED:
--------------------------------------------
After inserting the modem (or after boot) the modem waits for the PIN. You must give it ONCE with the command: sudo wvdial myPIN
After issuing the PIN you must WAIT 10-15 sec because the modem searches for your network provider and then dial with the command: sudo wvdial hspa
If you read a "no carrier" message, the modem is still searching for your network or the PIN was wrong. Be careful NOT to give the wrong PIN for 3 times (the SIM will be locked as in your cell phone).

1. GIVE PIN with the command: sudo wvdial myPIN
2. WAIT for the network (the LED must blink once)
3. DIAL with the command: sudo wvdial hspa
4. DISCONNECT by pressing ctrl-c at the same terminal window


NO SIM PIN CHECK:
-------------------------
DIAL with the command: sudo wvdial hspa
DISCONNECT by pressing ctrl-c at the same terminal window

Notes:
-------
- For the Phone No and the Init3 line (APN="internet") check with your provider.
- Added command "Dial Attempts = 1" to stop the wvdial after the first try (thanks to user nocturna_gr). If it fails you have to check or wait and then wvdial again.
- The PIN (1234 in above example) must be changed to yours.

Regards,
GeorgeVita
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-10-24 18:49
  Click to reply to this thread Reply
Just to be minimalistic, below is the smallest /etc/wvdial.conf that connects perfect with my provider Cosmote Greece (modem E170, wvdial version 1.60, Ubuntu 8.04):

[Dialer Defaults]
Modem = /dev/ttyUSB0
Username = u
Password = p
Init2 = AT&F; &D2; &C1;
Phone = *99#
Stupid Mode = 1

All others are defaults of wvdial, modem and MY provider (&D2; and &C1; remain just to be sure for modems handshake, SIM PIN check disabled). Reference was the terminal command man wvdial
GeorgeVita
General User
Posts: 28
Expert Points: 0
Useable Points: 10000
Registered: Jul 16, 2008
Read Re: E170 : how to setup Ubuntu 8.04 hardy (debian linux os) for E170 usb stick
Posted: 2008-11-10 18:26
  Click to reply to this thread Reply
STOP PRESS!

This is possibly my last post to this thread as 10 minutes before writing this message I ran Ubuntu 8.10 Live CD to my laptop (with the E170 attached), I click on the Network Manager icon, then Mobile Broadband and choose Country=Greece and Provider=Cosmote, finish!
By clicking the Network Manager icon and then Cosmote from the menu I got connected! Firefox starts at once (no offline mode) and ... I am writing this post!

No drivers or custom software. No terminal commands or fixes! I hope this will work with other Huawei modems as E220 and on other PC systems.