Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Ubuntu 12.04 & i'd like to know how can i connect my USB modem through terminal . I mean creating connection and calling it, I want to do from terminal .

Thank you .

share|improve this question
    
Take a look at How to Connect Internet –  Mitch Sep 20 '12 at 16:04
    
@Mitch Thank you for the link but its old & not suitable for present modems . –  raaz Sep 20 '12 at 16:25
add comment

2 Answers

up vote 4 down vote accepted
+25

You need to tell us what modem it is (brand, model). Anyway Mitch was right on the link, although today, things are a bit easier.

For telling model of modem, on a console:

sudo lsusb

Method 1

  1. Take a look at the output of lsusb. You should see your modem assigned to ttyUSB* ports:

    sudo ls /dev/ttyUSB*
    

    ttyUSB0 - Should be the modem
    ttyUSB1 - Should be the USB module

  2. Download a dialer

    sudo apt-get install wvdial ppp
    
  3. Configure your connection

    gksudo gedit /etc/wvdial.conf
    

    and use something like the following:

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

    You need to set your Phone number, username and password, these are values given by your operator.

    Also set the connection on Modem (/dev/ttyUSB0)

    The name hsdpa, is generic, you can use whatever name you want.

When dialing your connection, is this name you use.

If using PIN code add this before Init2

    Init1 = AT+CPIN=9999

where 9999 is changed for your PIN-code

  1. Start your connection

    sudo wvdial hsdpa
    

hsdpa is the example name i've used, you have to use the one you choosed in wvdial.conf

Source

share|improve this answer
    
its huawei modem , EG 1732 –  raaz Sep 25 '12 at 12:05
    
Then the method should work. Have you tried it? –  LnxSlck Sep 25 '12 at 13:17
    
yes i have tried but its not worked for me . changes are there –  raaz Sep 25 '12 at 17:09
    
Why doesn't it work? Errors? Outputs? –  LnxSlck Sep 25 '12 at 23:06
    
You talking about mitch link or youR answer ? –  raaz Sep 26 '12 at 3:08
show 10 more comments

you could use sakis3g text mode..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.