Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

vodafone usb 3g with fedora

  • 30-05-2007 12:34pm
    #1
    Registered Users, Registered Users 2 Posts: 190 ✭✭


    Hi all,
    Sorry to admit it but i am new to linux - i recently got a new laptop and was disgusted with the pre-installed Vista, it crashed on me 3 times the first evening i got it, and it's huge. I use linux all day at work (red hat enterprise) and so i am trying my best to learn the nuts and bolts of setting up linux.

    Ok here goes - i downloaded the latest Fedora core:


    uname -a
    Linux localhost.localdomain 2.6.20-2925.9.fc7xen #1 SMP Tue May 22 09:29:36 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

    it's the 64-bit version, is this stable?

    The install went ok, i had to lower the amount of colours it's displays to thousands instead of millions - i assume because of some problem with my video card (radion mobility x1400) but it boots fine (dual boot with vista for the wife!)

    The problem is that i can't get a network connection setup properly. I have the vodafone 3g broadband modem (huawei e220). I have done a lot of reading up and setup my vwdial.conf file to look like this


    [Dialer Defaults]
    Phone = *99***16#
    Stupid Mode = 1
    Username = username
    Password = password
    Dial Command = ATDT
    [Dialer huawei_e220]
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init2 = ATZ
    Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    ISDN = 0
    Modem Type = modem

    running this with seems to connect fine - i get the following:



    [root@localhost kwvdial-0.10]# e220 ***(note: here i run the vwdial script)***
    --> WvDial: Internet dialer version 1.54.0
    --> 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***16#
    --> Waiting for carrier.
    ATDT*99***16#
    CONNECT
    --> Carrier detected. Starting PPP immediately.
    --> Starting pppd at Wed May 30 12:33:14 2007
    --> pid of pppd: 4447
    --> Using interface ppp0
    --> pppd: �*
    --> pppd: �*
    --> pppd: �*
    --> pppd: �*
    --> pppd: �*
    --> local IP address 89.19.89.87
    --> pppd: �*
    --> remote IP address 10.64.64.64
    --> pppd: �*
    --> primary DNS address 213.233.128.1
    --> pppd: �*
    --> secondary DNS address 213.233.128.19
    --> pppd: �*

    I thought at this point i should just be able to access the internet by opening up firefox and off i got but no pages can be accessed, and nowhere does fedora recognise and active network connection - any comments appreciated, even if it's advice on where to look.

    Cheers,

    Sean


Comments

  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    I'd guess either your default route is not being set to use the new ppp connection, or your /etc/resolv.conf is not being populated with the nameserver details, both of which should be easy to sort out.

    What is the output of the following commands both before and after the connection is established?
    /sbin/route
    
    cat /etc/resolv.conf
    


  • Registered Users, Registered Users 2 Posts: 190 ✭✭limerick_woody


    Thanks for the response Snowbat, i am trying to read my way through the fedora bible book to get a better insight into just what is going on. I was a little unsure of the 64-bit version of fedora that i originally installed, so i installed instead a 32-bit version of fedora 6. I still get the same problem as in the original post though, and use the same wvdial script to start pppd.

    The files you asked for:


    /sbin/route

    Before the wvdial connection (an empty file)

    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface

    After the wvdial connection
    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
    default * 0.0.0.0 U 0 0 0 ppp0


    cat /etc/resolv.conf returned nothing both before and after connection

    The contents of /var/log/messages might help? (well some of it), i highlighted a potential problem?

    May 31 11:44:36 localhost pppd[3941]: Using interface ppp0
    May 31 11:44:36 localhost pppd[3941]: Connect: ppp0 <--> /dev/ttyUSB0
    May 31 11:44:36 localhost pppd[3941]: CHAP authentication succeeded
    May 31 11:44:36 localhost pppd[3941]: CHAP authentication succeeded
    May 31 11:44:36 localhost kernel: PPP Deflate Compression module registered
    May 31 11:44:40 localhost pppd[3941]: Could not determine remote IP address: defaulting to 10.64.64.64
    May 31 11:44:40 localhost pppd[3941]: local IP address 89.19.93.85
    May 31 11:44:40 localhost pppd[3941]: remote IP address 10.64.64.64
    May 31 11:44:40 localhost pppd[3941]: primary DNS address 213.233.128.1
    May 31 11:44:40 localhost pppd[3941]: secondary DNS address 213.233.128.19


    Here also is the contents of dmesg in case it might help

    usbcore: registered new driver usbserial
    drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
    usbserial_generic 3-2:1.0: generic converter detected
    usb 3-2: generic converter now attached to ttyUSB0
    usbserial_generic 3-2:1.1: generic converter detected
    usb 3-2: generic converter now attached to ttyUSB1
    usbserial_generic 3-2:1.2: generic converter detected
    usb 3-2: generic converter now attached to ttyUSB2
    usbcore: registered new driver usbserial_generic
    drivers/usb/serial/usb-serial.c: USB Serial Driver core
    CSLIP: code copyright 1989 Regents of the University of California
    PPP generic driver version 2.4.2
    PPP Deflate Compression module registered



    Hope you can help.


  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    Default route looks good but /etc/resolv.conf is not being populated with nameserver details. To check if that is the problem, start the connection and see if you can browse sites by IP address:
    http://89.234.66.107/ - Boards
    http://64.233.169.99/ - Google

    Add the following line to /etc/ppp/options and restart the connection to see if it solves the problem:
    usepeerdns


  • Registered Users, Registered Users 2 Posts: 190 ✭✭limerick_woody


    Great Stuff! It seems i am having problems with access to the name server. Both of the ip addresses you provided worked, but making the change to /etc/ppp/options had no effect though, it now contains 2 lines

    lock
    usepeerdns

    i restarted the wvdial, and also rebooted and started again but still the same problems

    when i look at /etc/ppp/resolv.conf it now contains the 2 dns addresses shown when i run the wvdial scripts. (shown in one of the above). This seems weird to me, i will try and read up on dns servers to see what they are all about, but again thanks for your time and your expertise (and feel free to keep it coming)

    Sean


  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    To hopefully get you up and running for now, drop the following in /etc/resolv.conf and see if it works:
    nameserver 213.233.128.1
    nameserver 213.233.128.19
    


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,065 ✭✭✭Snowbat


    Hardcoding ISP nameservers in /etc/resolv.conf is a bit of a kludge though - better if we can get wvdial/ppp to pick up the nameserver details from the ppp handshake. Google brings up a suggestion to add a usepeerdns line in /etc/ppp/peers/wvdial - does that work for you?.

    Also watch out for GUI-based configuration programs overwriting your /etc/resolv.conf and /etc/ppp/options - I'm not sure if this is a problem in Fedora but I've heard of it happening in some distros.


  • Registered Users, Registered Users 2 Posts: 190 ✭✭limerick_woody


    That did it, i have full access now - i will read up on the subject to see if i can see what is causing the wrong file to be updated (which i assume is happening as part of the handshake), thanks for you time with this, yours is the only reply from a few different forums.

    Cheers,

    Sean


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Glad to hear you got connected.
    Hope it stays working for you!
    The Vodafone 3G nameservers are pretty unreliable,
    and sometimes just don't seem to work at all.
    The suggestion of testing IP address connections is a good one.

    Your init string leaves you open to one problem though.
    It is dialling a profile on the modem blindly.
    The profile is probably just fine, but it wouldn't for example allow
    you change from APN hs.vodafone.ie to isp.vodafone.ie or office.vodafone.ie.
    Before people say that you should only use hs.vodafone.ie because it's the only one that supports 1.8M speeds, consider that one of the older APNs
    delivering 384k is a lot faster than the high speed one when it has too many users and isn't working at all.

    Here's my wvdial.conf that has evolved over the last six months or so:

    # wvdial for Vodafone Data.
    # Version 1.1 Created by Tazz_tux for Vodafone SA
    # This version adapted for Vodafone Ireland by niallb
    [Dialer Defaults]
    Modem = /dev/ttyUSB0
    Phone = *99***1#
    Username = vodafone
    Password = vodafone
    Baud = 460800
    Init1 = ATZ
    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init3 = AT+CSQ
    #Init4 = AT+COPS=0,0,"vodafone IE",2
    Init4 = AT+CGDCONT=1,"IP","office.vodafone.ie"
    ISDN = 0
    Modem Type = Analog Modem
    Stupid Mode = 1
    Dial Command = ATDT

    ### Put your PIN here if you still have one - 'wvdial pin' will then sort it out
    [Dialer pin]
    Init1 = AT+CPIN=1234

    ### The three APNs from Vodafone Ireland - worth changing if problems arise. ###
    [Dialer hs]
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init4 = AT+CGDCONT=1,"IP","hs.vodafone.ie"

    [Dialer office]
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init4 = AT+CGDCONT=1,"IP","office.vodafone.ie"

    [Dialer isp]
    Modem = /dev/ttyUSB0
    Baud = 460800
    Init4 = AT+CGDCONT=1,"IP","isp.vodafone.ie"

    ### ######################################################################## ###

    ### init strings and device names for Nokia 6680 over bluetooth
    [Dialer n6680]
    Modem = /dev/ttyACM0
    Baud = 460800
    Init1 = ATZ
    Init2 = AT+CSQ
    Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    Init4 = AT+CGDCONT=1,"IP","office.vodafone.ie"
    ISDN = 0
    Modem Type = Analog Modem

    #### Other settings available in the windows software ###
    #### (and one or two that aren't ###

    [Dialer 2gonly]
    Init4 = AT+COPS=0,0,"vodafone IE",0

    [Dialer 3gonly]
    Init4 = AT+COPS=0,0,"vodafone IE",2

    [Dialer 64k]
    Init6 = AT+CGEQMIN=1,4,64,64,64,64
    Init7 = AT+CGEQREQ=1,4,64,64,64,64

    [Dialer 144k]
    Init6 = AT+CGEQMIN=1,4,64,144,64,144
    Init7 = AT+CGEQREQ=1,4,64,144,64,144

    [Dialer 384k]
    Init6 = AT+CGEQMIN=1,4,64,384,64,384
    Init7 = AT+CGEQREQ=1,4,64,384,64,384

    You can use more than one item at the comand line.
    For example
    wvdial hs will use all the defaults, but replace Init4 with the line from the [dialer hs] section.
    wvdial 3gonly 144k might help if your link keeps dropping.

    Let us know how you get on, glad to hear somebody else using Voda 3G here.
    I don't use the USB modem anymore myself, as I traded it in for a card with an external antenna.

    Best performance improvement I found was installing a DNS caching server.
    DNS lookups took ages over 3G, so I installed pdnsd which can even cache lookups between boots if you need it to.

    NiallB


  • Registered Users, Registered Users 2 Posts: 190 ✭✭limerick_woody


    Thanks for your post Niall, i have been running the 3g modem for the last day and a bit without any hassle at all on fedora. It doesn't appear any slower than previously with xp. I will use your script tomorrow and let you know how i get on.

    i don't follow this:
    Best performance improvement I found was installing a DNS caching server.
    DNS lookups took ages over 3G, so I installed pdnsd which can even cache lookups between boots if you need it to.


    could you elaborate a little?

    Thanks and forgive my ignorance!

    Sean


  • Registered Users, Registered Users 2 Posts: 190 ✭✭limerick_woody


    Hi Niall,
    It works fine - it's a much better script than my own, thanks for that, i was wondering how to change the different settings. Did you get an improved connection with the antenna and datacard setup? I was led to believe that one 3g bar was as good as 5, you have it or don't, kind of like digital tv. Were you able to just swap the sim card from your usb modem to the datacard. And if you have a moment could you point me to some place where i can read up on how you might learn how that script was put together, it's not entirely intuitive!

    Again, the help is greatly appreciated.

    Sean


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    A lot of truth in the "1 bar as good as 5".
    I've a very weak link, but a solid net connection.
    The antenna does make a huge difference to me for this reason:
    Without it, the modem gives up on the weaker 3G signal and locks
    onto a much closer mast with a strong but 2G only signal.
    I have both the E630 (3G and high speed UMTS), and the
    older Option card (max speed 384k). The older card gives a much better signal, and is what I use all the time now.
    I've also had success with putting a satellite dish behind the USB
    modem aimed at the 3G mast. It helps it lock on, and after that the dish
    can even be removed once the flame turns blue.

    The script is put together from months of discussion over the net.
    Most of it grew from a linux thread in a Vodafone South Africa discussion.
    One of the vodafone employees here was very helpful.

    Tazz_tux on the same site is another name worth looking out for.

    He gathered a lot of the init strings in that script.

    Pharscape in general had good stuff, and the comgt tool mentioned here is useful.
    I also used some online documents about GSM/GPRS specifications to
    find what strings the modems should support, and checked which worked
    on what devices - this was most helpful with the Nokia 6680.

    The SIM card works in any device that's unlocked or locked to Vodafone.

    A lot of this is also discussed in posts here on boards.ie from January or so.
    Might be worth checking back on some of it, but ask away here too!


  • Closed Accounts Posts: 1 svenkatesan


    Hi All
    I am from singapore,I was referred to this from one of the fedoraforum user.
    I am using Fedora 7 and would like to use my 3G modem {huawei E220}.
    I tracked this forum and able to ping google site and Boards.Strangely boards site can allow me to go further pages but google not.
    It ends up with "server not found" messege.
    I made all the modifications told here.
    Can somebody guide me ?
    The same modem just works fine in Ubuntu after some wvdial.conf modification.
    Thanks in advance.


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Hi Svenkatesan,
    this sounds like your problem is not specifically the E220 modem.
    The modem is a little tricky anyway, and I had a similar problem
    to yours a long time back.

    It seems you have a problem with your DNS servers timing out.
    Take a look in the file /etc/resolv.conf during a connection in Ubuntu,
    and then compare it to the same file when connected in Fedora.
    I suspect you'll see a difference.

    In google, try to look at the "cached" copies of pages.
    I think your problem is that a new page needs a new DNS lookup
    which is timing out, but in boards, most of the links are to
    other pages on boards, so no lookup is needed.

    Hope that helps, let us know if there's a difference in the resolv.conf file.
    Good luck,
    NiallB


  • Closed Accounts Posts: 2 boards.phjr


    I tried your way, but without success:

    wvdial
    --> WvDial: Internet dialer version 1.54.0
    --> Cannot get information for serial port.
    --> Initializing modem.
    --> Sending: ATZ
    --> Sending: ATQ0
    --> Re-Sending: ATZ
    --> Modem not responding.

    Initialisation string for huawai e220 in Austria
    "at+cgdcont=1,"ip", "a1.net"

    dmesg after having plugged in my huawai e220 USB-Modem says:
    (see details of dmesg further on in this Message)=
    "usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0"




    Why --> Modem not responding. when
    dmesg shows GSM modem ??

    Thanks for tips

    Philipp






    ============my /etc/wvdial.conf===========
    [Dialer Defaults]
    Modem=/dev/ttyUSB0
    Phone=*99#
    Username=zugeteilter Username
    pwd=zugeteiltes Passwort
    #Login prompt
    #ask Password
    Baud=460800
    init1=ATZ
    init2=ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
    init3=AT+CSG
    init4=AT+CGDCONT=1,"ip","a1.net"

    ISDN=0
    Modem type=digital modem
    Stupid Mode=1
    Dial Command=ATDT
    [Dialer huawei_e220]

    [Dialer Pin]
    Init1=AT+CPIN=9999


    ==========dmesg with plugged in USB-Modem==============
    FAT: Directory bread(block 530) failed
    usb 3-1: new full speed USB device using ohci_hcd and address 2
    usb 3-1: configuration #1 chosen from 1 choice
    usb-storage: device ignored
    usbcore: registered new interface driver usbserial
    drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
    usbcore: registered new interface driver usbserial_generic
    drivers/usb/serial/usb-serial.c: USB Serial Driver core
    drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
    option 3-1:1.0: GSM modem (1-port) converter detected
    usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0
    usbcore: registered new interface driver option
    drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1
    usb 3-1: USB disconnect, address 2
    option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
    option 3-1:1.0: device disconnected
    usb 3-1: new full speed USB device using ohci_hcd and address 3
    usb 3-1: configuration #1 chosen from 1 choice
    usb-storage: device ignored
    option 3-1:1.0: GSM modem (1-port) converter detected
    usb 3-1: GSM modem (1-port) converter now attached to ttyUSB0


  • Closed Accounts Posts: 2 boards.phjr


    I found a link in german, which sounds pritty helpfully

    http://www.fedorawiki.de/index.php/Huawei_E220_GPRS_/_UMTS_/_HSDPA_USB_Modem


Advertisement