Page 1 of 15 12311 ... LastLast
Results 1 to 10 of 147

Thread: Huawei e220 USB modem for beginners

  1. #1
    Join Date
    Jun 2007
    Location
    The Lost Continent of Mu
    Beans
    129
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Huawei e220 USB modem for beginners

    Welcome to my first HOWTO.

    Before I begin, I would like to point out that I am NOT a computer expert, but after 6 months spent with ubuntu I have come to love computers as I no longer feel restricted or dictated to by my OS, in fact, I feel liberated, and I would like to thank all of the forum members as it is their contribution that makes all of the hurdles of computing shrink to a size that I feel I can approach with confidence.

    As a result, I now feel confident enough to write a HOWTO and believe I actually have one to fill a much needed gap.

    Anyway.....

    Initially when I was trying to set up my e220, it was, quite simply, a headache. There are dozens of threads, within these forums alone, and countless elsewhere, but as these were generally responses to threads along the lines of "HELP!! Modem not working" they're generally asking for that users specific outputs and troubleshooting them, without explaining what was actually going on.

    One HOWTO exists by tazz_tux, and I must acknowledge this as it definitely helped me a gain a better understanding, although for a n00b like myself much of it was over my head.

    So lets get your modem working shall we......

    Firstly, you should make sure you have wvdial installed, it is in the repositories, you can either open synaptic package manager and look for it there.

    Main menu >System >Administration >Synaptic Package Manager


    or open a terminal and type

    Code:
    sudo apt-get install wvdial
    Now, with your modem plugged into an available USB port...
    (note:: this is more reliable connected directly to your computer as opposed to a hub, and also, some users report problems with the longer cable, but I have had no such problems on the 5 I have set up personally.)

    Code:
    sudo wvdialconf
    What this does is reads all of the settings you will need directly from your modem and writes them to a file called wvdial.conf. Without sudo it will read from the modem but cannot write the file.

    IMPORTANT!! You should NOT edit any of the completed lines in wvdial.conf, the settings that the above command wrote to that file are unique to your modem/service provider, so copying anyone elses from a thread will only prevent yours from functioning. However you will need to edit 3 lines of text: Phone, Username and Password.

    Again, in a terminal type...
    Code:
    sudo gedit /etc/wvdial
    This will invoke your text editor (gedit) to open the file at location /etc/wvdial.conf, with administrative privaledges (sudo).

    This will look something like this:

    Code:
    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type = Analog Modem
    Baud = 9600
    New PPPD = yes
    Modem = /dev/ttyUSB0
    ISDN = 0
    ; Phone
    ; Password
    ; Username
    As you can see, Phone, Password and Username are not designated and are also preceded by a ; followed by a space. First of all delete the ;'s and spaces so that P,P and U respectively are the first characters on their lines. now following the same format as the completed fields add ( = )to each line and give them a value, so you should have something that looks like this.
    Code:
    [Dialer Defaults]
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Modem Type = Analog Modem
    Baud = 9600
    New PPPD = yes
    Modem = /dev/ttyUSB0
    ISDN = 0
    Phone = *99#
    Password = Anything
    Username = Anything
    Before you save the file and exit, make a note of the second word in the first line, in the case of my example (Defaults) This is the name of the profile you will need to invoke for a connection.

    How you wish to connect now is a matter of preference, I will now explain your options and try to outline the pro's and cons of each.

    Firstly, If you feel happy having a connection with no GUI, no taskbar applet or any visual feedback on your desktop, then it's very easy.

    Press Alt-F2 and type

    Code:
    wvdial Defaults
    Or replace the word Defaults with whatever was in the first line of your wvdial.conf.

    If you wish for your modem to connect automatically at log on, take your mouse to the the panel menu and navigate >System >Preferences >Sessions and under the "Startup Programs" Tab, click the "Add" button and where it says "Command" Type:

    Code:
    wvdial Defaults
    Be sure also to fill in the "Name" box, but what you type in there is up to you, simply "Modem" or "E220" is ideal for your own future reference.





    Now you may prefer a graphical user interface to get connected, if so you have a few choices.

    If you use gnome then i recommend gnome-ppp

    Code:
    sudo apt-get install gnome-ppp
    for kde, kppp

    Code:
    sudo apt-get install kppp
    Another one some people are using is vodafone-mobile-connect-card-driver-for-linux, (what a mouthful) but you will not find this in the repositories and it is quite a bulky program (like it's name) that requires rather a lot of python dependencies. It does have some extra functions but I am yet to see any of them work, although to be fair I have not tried it with a vodafone sim, but it will still connect you nonetheless.

    Whichever utility you choose the following instructions are the same.

    If you closed your text editor after saving wvdial.conf then type:

    Code:
    gedit /etc/wvdial.conf
    To bring it back up. Notice there was no sudo this time? Don't worry, Admin privaleges aren't necessary as we won't be editing the file, we just need that information at hand.

    All that needs to be done is to complete any fields in your ppp's GUI's settings, using wvdial.conf as reference.

    Some points of possible confusion explained.

    What's an init string??

    see the line in wvdial conf that looks something like ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK, well that's what you need to put in the init string box.

    What's the phone number??

    My connection is with 3uk, so the number I set mine to dial is *99#
    If you have another provider it will no doubt be different, but google should be able to answer that, or contact your provider.

    That's it, click connect you should be up and running. try opening up your browser and searching, if all is well, happy browsing. Perhaps you get a message saying "Offline Mode" This is just Firefox thinking it knows best, simply click on the browsers "File" in the tool bar and de-select "Work offline"

    Still no connection???

    If you're using a GUI to connect, there may be a function called "Stupid Mode" selecting this "apparently" forces your modem to ignore init strings,and will usually sort this problem, but at this point I am unable to explain why and I'm only just scratching at what an init string does myself so I'll avoid any further details here to avoid confusion or giving misleading info. I may edit this at a later date if I consider it appropriate

    If your GUI doesn't have this option, or you have opted for my no-GUI approach, then you can go back to....

    Code:
    sudo gedit /etc/wvdial.conf
    And add the line...

    Code:
    Stupid mode = 1
    Now I hope you are connected.

    As I mentioned at the beginning, I am no expert, I am just relaying my experience of setting up 5 such modems, perhaps this HOWTO doesn't work for you, if so leave a message, I'm quite sure I've read just about everything on the net about setting it up under linux, so if you have a problem, I've probably heard it before, and will probably know where to look.

    One final note, If you have used this HOWTO and are still having problems, please let me know. Maybe you think I could have been clearer about something. In any case all feedback will be welcomed and appreciated. If you have got it working, which I sincerely hope you have, please leave a message saying which type of setup you opted for, which GUI, or no GUI, this could prove helpful to others in the future.

    Just as I hope you have found this helpful.
    If music be the food of love, are you the indigestion?
    Fingers & Thumbs at LastFM

  2. #2
    Join Date
    Sep 2007
    Location
    Nomadic
    Beans
    197
    Distro
    Ubuntu

    Re: Huawei e220 USB modem for beginners

    Using Ubuntu 8.04 I plugged in my Huawei E220 and it worked. Finding software to make it work was a little troublesome. Gnome-ppp worked fine, but the various data card specific apps (vodafone mobile connect for linux / umtsmon) failed.

    I upgraded to NetworkManager 0.7 and it now works flawlessly for me. Well, not quite flawlessly, I have to manually edit my routing table to set the modem as the default route instead of wifi (I have both connected), but it works very well.
    Last edited by chmac; July 3rd, 2008 at 10:54 PM.
    Love & joy - Callum

  3. #3
    Join Date
    Jun 2007
    Location
    The Lost Continent of Mu
    Beans
    129
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Huawei e220 USB modem for beginners

    That's the great thing about ubuntu, huh.
    Just about any piece of hardware can be made to work with it if you have the patience and inclination, and when enough users are using or trying to use a particular piece of kit or type of equipment, a simpler, automatic solution generally finds it's way into the default desktop environment.
    So that's great news that Network Manager 0.7 will be including support for mobile broadband connections, although as it is currently only at the development stage and therefore could potentially leave a user with no connection, and I have mine working without issue, I'll personally be waiting for the official final release.
    Thanks for posting this info chmac, I will definately be following this developement closely.
    If music be the food of love, are you the indigestion?
    Fingers & Thumbs at LastFM

  4. #4
    Join Date
    May 2008
    Beans
    129
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Huawei e220 USB modem for beginners

    You sir, rock. =)

    I finally grew tired of Vodafone's moodiness, and found this HOW-TO. No waiting for ten minutes before Vodafone decides that it doesn't feel like finding my modem, just... immediately, working! =)

  5. #5
    Join Date
    Jul 2008
    Location
    Kerry , Ireland
    Beans
    1
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Huawei e220 USB modem for beginners

    Great job.....
    Thanks very much.......

  6. #6
    Join Date
    Jun 2007
    Location
    The Lost Continent of Mu
    Beans
    129
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Huawei e220 USB modem for beginners

    Thanks for the feedback guys.

    just a quick update, I have got the modem working with Network Manager 0.7, but it has a few ideosynchracies so until I get to the bottom of it I will refrain from adding it to the Howto. It works with very little setting up, and FF3 doesn't go offline, but there are some minor quirks I would like first to understand.
    If music be the food of love, are you the indigestion?
    Fingers & Thumbs at LastFM

  7. #7
    Join Date
    May 2008
    Location
    Birmingham, UK
    Beans
    283
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Huawei e220 USB modem for beginners

    We have ignition! Great stuff! Many thanks.

  8. #8
    Join Date
    Apr 2007
    Location
    Alpha Centauri
    Beans
    134
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Huawei e220 USB modem for beginners

    OK, after reading this thread I decided to go out and buy a 3 pay-as-you-go Huawei E220 on the UK 3 network.

    I am running hardy heron on a Toshiba laptop.

    When I run wvdialconf I get:

    Code:
    john@Gluon:~$ sudo wvdialconf 
    Editing `/etc/wvdial.conf'.
    
    Scanning your serial ports for a modem.
    
    ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
    ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
    ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
    Modem Port Scan<*1>: S1   S2   S3   USB0 
    ttyUSB1<Info>: Exec format error
    Modem Port Scan<*1>: USB1 
    ttyUSB2<Info>: Exec format error
    Modem Port Scan<*1>: USB2 
    
    
    Sorry, no modem was detected!  Is it in use by another program?
    Did you configure it properly with setserial?
    
    Please read the FAQ at http://open.nit.ca/wiki/?WvDial
    
    If you still have problems, send mail to <wvdial-list@lists.nit.ca>.
    I have had a look in my system logs. In messages I see
    Code:
    Jul 28 19:15:46 Gluon kernel: [  390.154199] airprime 2-2:1.0: airprime converter detected
    Jul 28 19:15:46 Gluon kernel: [  390.154325] usb 2-2: airprime converter now attached to ttyUSB0
    Jul 28 19:15:46 Gluon kernel: [  390.154364] usb 2-2: airprime converter now attached to ttyUSB1
    Jul 28 19:15:46 Gluon kernel: [  390.154403] usb 2-2: airprime converter now attached to ttyUSB2
    Jul 28 19:15:46 Gluon kernel: [  390.154411] usbcore: registered new interface driver airprime
    Jul 28 19:15:46 Gluon kernel: [  390.164652] usbcore: registered new interface driver libusual
    and in syslog I see

    Code:
    Jul 28 19:15:55 Gluon kernel: [ 1041.995611] airprime ttyUSB0: airprime_open - failed submitting read urb 0 for port 0, error -2
    Jul 28 19:15:55 Gluon kernel: [ 1041.995720] airprime ttyUSB1: airprime_open - failed submitting read urb 0 for port 1, error -8
    Jul 28 19:15:55 Gluon kernel: [ 1041.995875] airprime ttyUSB2: airprime_open - failed submitting read urb 0 for port 2, error -8
    Can anyone point me in the right direction.

    I have tried this on XP, it works fine, so no modem problem.
    In a world without walls and fences, who needs windows and gates.

  9. #9
    Join Date
    Apr 2007
    Location
    Alpha Centauri
    Beans
    134
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Huawei e220 USB modem for beginners

    Ah ha, only minutes after posting my problem I have solved it. Brilliant!!

    I install Network Manager 0.7 SVN using this thread:
    http://ubuntuforums.org/showthread.p...ht=huawei+e220

    Fantastic, I now have broadband all over the UK and can do it all on ubuntu!!!

    The new nm-applet looks really neat as well, nice
    In a world without walls and fences, who needs windows and gates.

  10. #10
    Join Date
    Jul 2008
    Beans
    4

    Re: Huawei e220 USB modem for beginners

    hi thanx for this guide as im completely new to linux. I have just bought the elonex webbook and the 3uk huawei e220. the webbook runs on harty heron and the help files mention networkmanager 8. I need help finding my way around and feel like im drowning here. my questions are where do i put in the codes? and do I need to install the modem to a windows pc first. thanx again confused newbie.

Page 1 of 15 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •