Setting up a serial modem using Wvdial
From NewbieDOC
- Chris Lale
- chrislale AT users DOT berlios DOT de
Go to NewbieDOC index
Revision History
Revision 1.0 | 5th July 2005 | Revised by Chris Lale | ||||||||||
Initial release. | ||||||||||||
| ||||||||||||
Revision 1.1 | 1st February 2006 | Revised by Chris Lale | ||||||||||
Revised for NewbieDOC wiki by converting source to wikitext. Made a few other minor alterations. | ||||||||||||
| ||||||||||||
Revision 1.2 | 27th November 2007 | Revised by Chris Lale | ||||||||||
Reformatted for newbiedoc package. | ||||||||||||
This article explains how to install and use a serial modem for internet access on a Debian GNU/Linux computer using Wvdial. Wvdial is a command line program. These instructions have been tested in Debian 3.1 (Sarge) with a serial port modem. They have not been tested for a USB modem. If you have an internal modem ('winmodem') go to http://www.linmodems.org/ for advice.
1 Documentation1.1 FAQ1.2 Manual pagesMan pages are available after you have installed the Debian packages.
You can read the man pages using the $ man 1 wvdial $ man 5 wvdial.conf $ man 1 wvdialconf 2 Before you startMake sure that you have
Make sure that your modem is connected to the telephone socket, the serial port socket and the power supply. Remember to switch the modem on. 3 Installing and configuring Wvdial3.1 Installing the Debian packagesInstall the You will be asked if you wish to configure Wvdial automatically. Answer yes by pressing the 'y' key. WVDIAL AUTOCONFIGURATION WvDial includes a program called wvdialconf, which can automatically detect your modem and create a /etc/wvdial.conf file. Autodetection may cause problems on some computers. Do you want to configure wvdial now? [Y/n] y 3.2 Autoconfiguring WvdialIf you entered 'y', Wvdial autoconfiguration begins. You must supply your internet provider's phone number; your internet account login name and your internet account password. Okay. You now need to specify three facts about your internet account: - Your internet provider's phone number; - Your internet account login name; - Your account password. Phone number: 0123456789 Login Name: abcdefgh Password: Re-enter: Phone: "0123456789" -- Login: "abcdefgh" -- Password: Is this correct? [Y/n] y Wvdial will try to detect your modem. The screen output will look something like this: Scanning your serial ports for a modem. ttyS0: ATQ0 V1 E1 -- OK ttyS0: ATQ0 V1 E1 Z -- OK ttyS0: ATQ0 V1 E1 S0=0 -- OK ttyS0: ATQ0 V1 E1 S0=0 &C1 -- OK ttyS0: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyS0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyS0: Modem Identifier: ATI -- 645 ttyS0: Speed 4800: AT -- OK ttyS0: Speed 9600: AT -- OK ttyS0: Speed 19200: AT -- OK ttyS0: Speed 38400: AT -- OK ttyS0: Speed 57600: AT -- OK ttyS0: Speed 115200: AT -- OK ttyS0: Max speed is 115200; that should be safe. ttyS0: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK Port Scan: S2 S3 S4 S5 S6 S7 S8 S9 Port Scan: S10 S11 S12 S13 S14 S15 S16 S17 Port Scan: S18 S19 S20 S21 S22 S23 S24 S25 Port Scan: S26 S27 S28 S29 S30 S31 S32 S33 Port Scan: S34 S35 S36 S37 S38 S39 S40 S41 Port Scan: S42 S43 S44 S45 S46 S47 S48 S49 Port Scan: S50 S51 S52 S53 If all goes well, you will get a summary like this. Found a modem on /dev/ttyS0. Modem configuration written to /etc/wvdial.conf. ttyS0: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" Success! You can run "wvdial" to connect to the internet. (You can also change your configuration by editing /etc/wvdial.conf) If not, you may need to consider using 3.3 Re-running wvdial autoconfigurationIf you ever wish to run the autoconfiguration again, use # dpkg-reconfigure wvdial or use Synaptic in X
4 Connecting to the internet for the first timeAt first, only user root may be able to connect successfully. Enter # wvdial Wvdial initialises the modem and connects to the ISP's sever. --> WvDial: Internet dialer version 1.54.0 --> Initializing modem. --> 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: ATDT0123456789 --> Waiting for carrier. ATDT08451203070 CONNECT 44000 --> Carrier detected. Waiting for prompt. Wvdial authenticates to the ISP's server. Username: --> Looks like a login prompt. --> Sending: abcdefgh abcdefgh Password: --> Looks like a password prompt. --> Sending: (password) Authentication Successful. Entering PPP mode. Async interface address is unnumbered (Loopback0) Your IP address is 255.255.255.255. MTU is 1500 bytes Header compression will match your system. --> Looks like a welcome message Wvdial starts the --> Starting pppd at Mon Jul 4 14:55:52 2005 --> pid of pppd: 5186 --> Using interface ppp0 --> local IP address 255.255.255.255 --> remote IP address 255.255.255.255 --> primary DNS address 255.255.255.255 --> secondary DNS address 255.255.255.255 5 Testing the connectionUse Ping to test the connection by querying the ISP's nameservers with a domain name eg google.co.uk. Open a terminal or terminal window and enter the # ping google.co.uk PING google.co.uk (216.239.57.104) 56(84) bytes of data. 64 bytes from 216.239.57.104: icmp_seq=1 ttl=244 time=159 ms 64 bytes from 216.239.57.104: icmp_seq=2 ttl=244 time=160 ms 64 bytes from 216.239.57.104: icmp_seq=3 ttl=244 time=160 ms 64 bytes from 216.239.57.104: icmp_seq=4 ttl=244 time=160 ms 64 bytes from 216.239.57.104: icmp_seq=5 ttl=244 time=159 ms Stop Ping with ctrl-C (hold down the Control key and press the C key). ^C --- google.co.uk ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4002ms rtt min/avg/max/mdev = 159.865/160.407/160.875/0.603 ms # 5.1 TroubleshootingIf you do not get any replies from
# /etc/init.d/networking stop Hang up, and reconnect. 6 Hanging upHang up with ctrl-C (hold down the Control key and press the C key). ^C Caught signal #2! Attempting to exit gracefully... --> Terminating on signal 15 --> Connect time 0.4 minutes. --> Disconnecting at Mon Jul 4 14:56:18 2005 #
7 Connecting as a non-root userUsers who connect to the internet must be able to start You can check the groups you belong to with the $ groups username dialout cdrom floppy audio video plugdev Add a user to the dip group with the command # adduser username dip If the user has a session running, the user must logout and login again before the new group membership takes effect. User username should now be able to connect to the internet using Wvdial. $ wvdial 8 Appendix A: LicenceCopyright ©2005-2007 Chris Lale, chrislale AT users DOT berlios DOT de.
Go to NewbieDOC index |