个人工具

UbuntuHelp:DialupModemHowto/SetUpDialer

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月13日 (日) 13:54的版本 (New page: {{From|https://help.ubuntu.com/community/DialupModemHowto/SetUpDialer}} {{Languages|php5}} #pragma keywords smartlink modem winmodem linmodem networking scanmodem sl-modem intel linuxant c...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
  1. pragma keywords smartlink modem winmodem linmodem networking scanmodem sl-modem intel linuxant conexant hsf hcf wvdial ppp


Configuring the dialup connection to your provider

There are different tools, which can help you to configure & establish a dialup connection. Some of them are command line based (pppconfig & pon/poff, wvdialconf & wvdial), while others use a graphical interface (System => Administration => Networking, kppp, gnome-ppp).

With all these tools, to establish a dialup connection, the user has to be member of the "dip" and "dialout" groups, so put all users who are supposed to connect via dialup into these groups:

 $ sudo adduser USERNAME dip
 $ sudo adduser USERNAME dialout

where of course USERNAME has to be substituted.

You will also need to know the device node of your modem. The "Installing the driver"-section of this page should have told you about it. In case you don't know it, assume /dev/modem.

= For Ubuntu, without installing additional software (a.k.a System ==> Administration => Networking)

The Networking section of System => Administration will let you set up the ppp connection in a graphical interface. You have to know your device name, ISP phone number, username and password to set it up. You can also use the Gnome Modem Monitor and Network Monitor panel applets if you want to stop, start and monitor modem connections without opening the Networking GUI every time. Some people have had a problem with the modem dialing during bootup. This may be related to setting the modem as default route to the internet on the Options tab of Interface properties.

Note: It has been reported, that connections started with this interface might be very slow, if they work. You can try it, but if this is the case for you, just try one of the other options.

For Ubuntu, alternative approach (using gnome-ppp)

gnome-ppp is a graphical frontend to wvdial and can be installed by $ sudo apt-get install gnome-ppp. You will find it in the Applications menu and the configuration is probably straightforward.

If wvdial works but you have problems connecting with gnome-ppp, view the wvdial.conf you created earlier in the wvdialconf section above:

gksudo gedit /etc/wvdial.conf

open the wvdial.conf file that gnome-ppp creates (in a different location):

gksudo gedit $HOME/.wvdial.conf

and compare the settings. Change the settings in the gnome-ppp wvdial so they match the settings in the functioning /etc/wvdial.conf. Do not delete lines--if you need to remove a setting, simply delete the text to the right of the == sign, eg. "Init3 == ". Despite the warning at the bottom of the gnome-ppp wvdial.conf file, you can add lines if necessary, eg. "Stupid Mode = on".

For Kubuntu (using kppp)

Kppp can be installed and comes with Kubuntu and is a very nice program with all the features you would like from a dialer. It has a nice window showing that it is connected and gives the duration as well. It can also be configured to calculate your telco connection cost. If it is not installed yet, you can install it with your package manager, e. g. $ sudo apt-get install kppp, and find it in the "Internet" section of the menu.

Every user, who is in the dip/dialout groups, can use kppp to configure, connect and manage a connection to an ISP. If you need help with its interface, go to "Help -- Handbook" or use the online handbook here: [WWW] http://docs.kde.org/stable/en/kdenetwork/kppp/

If you have problems with Authentification, you might want to edit /etc/ppp/peers/kppp-options and activate the line noauth by removing the comment sign.

Alternative Way 1 (using wvdialconf & wvdial)

I prefer wvdial, because it tells you whether your modem is configured or not. Type in a terminal

 $ sudo wvdialconf /etc/wvdial.conf

If it says 'no modem found' or something similar, sorry... the driver for your modem seems not to be installed properly yet. The lack of a /dev/modem is not supposed to break wvdial's configuration. If the modem is found, finish the setup with:

 $ sudo nano /etc/wvdial.conf

After opening the wvdial.conf file, input your ISP information where needed (look inside the file for fields) and add other options that might be needed for your software modem. You will know what these options are if you asked for help from linmodems.org mailing list. Examples options that you can try to add, if dialling does not work:

  • add X3 to Init2 (means dial without waiting)
  • add Carrier Check = no as a new line (useful for Smartlink modems)
  • add Stupid mode = on as a new line (will start pppd immediately--required by some ISPs)

Typing man wvdial.conf in a separate terminal will give details on options.

Once you are ready, save the file (Ctrl-o) and exit (Ctrl-x), and try to dial:

sudo wvdial

will dial and connect. Upon connection, it will spit out some information about your connection (local IP, remote IP, DNS address, etc.). Do not close the terminal where wvdial is running. Leave it alone until you want the connection to be terminated, and hit CTRL+C on that terminal once you want to end the connection.

If you lose the connection a short time after connecting (30 sec - 3 min), you might need to edit options for pppd:

gksudo gedit /etc/ppp/options

Find lcp-echo-interval30 and lcp-echo-failure4. Comment out these options by adding a '#' at the start of these lines, eg. # lcp-echo-interval30 and # lcp-echo-failure4.

If you connect successfully but your Internet applications do not function (eg. web pages do not load in Firefox), you might need to add replacedefaultroute as a new line in the pppd option file.

Alternative Way 2 (using pppconfig & pon/poff)

This is a command line based option to manage dialup connections. This makes it very flexible, but maybe not so straightforward to configure.

Collecting Information

You will need:

  • Your ISP's phone number
  • Your username and password on the ISP
  • The name of the modem device (/dev/...)

Setting up ppp

1. Open a terminal (Applications > System Tools > Terminal) and type
  $ sudo pppconfig
1. You will be on the main menu.  Choose 'Create     Create a connection'.
1. Leave the name as 'provider', hit 'Ok'.
1. Select 'Dynamic  Use dynamic DNS', hit 'Ok'.
1. Select 'PAP      Peer Authentication Protocol', hit 'Ok'.
1. Enter your user name for the ISP, hit 'Ok'.
1. Enter your password for the ISP, hit 'Ok'.
1. Leave the speed at 115200 as recommended, hit 'Ok'.
1. Choose Tone or Pulse dialing, hit 'Ok'.
1. Enter the phone number to your ISP (do not use any dashes), hit 'Ok'.
1. You can try to have your modem detected automatically, but it did not work for me, even on my easily detectable external modem.
1. If the modem wasn't detected, it will ask you for the port your modem is on.  Enter the device name for your modem, hit 'Ok'.
1. A summary screen will appear and give you the opportunity to make changes if needed.
1. Choose 'Finished Write files and return to main menu.'.
1. Choose 'Quit   Exit this utility'.
1. Exit the terminal window, type:
  $ exit

Connecting to the ISP

Log out and back in (for the group setting to take effect). Every "dialout/dip" user will now be able to connect and disconnect with these commands:

 $ pon    # connect to the ISP configured as "provider"
 $ poff   # disconnect the ISP configured as "provider"

You can also check the last messages generated by these commands with:

 $ plog   # shows the (status) messages generated by pon and poff

If you want to configure more ISPs, start pppconfig again, go through the steps, but give it a different name in step 3 (e.g. provider2). You can then (dis)connect by pon provider2 and poff provider2.

Changing speaker volume

To quiet or silence the connection noises (dialing, negotiation, etc.), follow these steps:

1. Open a terminal (Applications > System Tools > Terminal) and type
 $ sudo nano /etc/chatscripts/provider
1. Locate the line marked 'OK-AT-OK'.
1. Change 'ATDT' to 'ATxxDT', where 'xx' is one of the following:
    • M0 Silence the speaker
    • L1 Low volume
    • L2 Medium volume
    • L3 High volume
 For example: ATM0DT. Leave the rest of the line unchanged.
1. Save the file (Ctrl-o) and exit (Ctrl-x).

Using Modem Lights panel-application

While it's good to be able to get online, it'd be nice to have a single way to either connect or disconnect.

The easiest way is by using Modem Lights. Right click on the top panel, select 'Add to panel', and choose 'Modem Lights'. If your modem device is other than ttyS0, you'll have to configure the app. Right-click Modem Lights, choose Preferences -> Advanced, and change the lock file to point to your modem device.

For example, if you have an internal modem on /dev/modem, the Device would be ppp0 and the Lock File /var/lock/LCK..modem

Besides allowing you to connect and disconnect with a single click, Modem Lights also gives you information on how long you've been connected, and a graphical view of your modem's activity.

Go back to the main wiki