Dial-up
5.1
An analog modem on a phone line is slow, but it needs nothing more than
the phone network: a rescue line when the broadband is down, or the
only line in some remote places. SliTaz 5.1 still has what it takes,
pppd and chat from the ppp package, which the desktop ISOs
install (spk-add ppp on SliTaz Base x86_64). This
page only covers hardware modems; for a USB 3G or 4G stick, see
Mobile broadband.
Which modems work
- External serial modems, on a COM port:
/dev/ttyS0to/dev/ttyS3, built into the kernel. Use a USB to serial adapter on a machine without a COM port:/dev/ttyUSB0, with thepl2303orch341driver of the kernel package, orftdi_sioandcp210xinlinux-lts-extra. - USB modems that follow the USB standard for modems (CDC ACM):
/dev/ttyACM0, drivercdc-acm, in the kernel package. - PCI and PCMCIA hardware modems: they show up as one more serial
port. PCMCIA cards need
serial_cs, inlinux-lts-extra. - Software modems ("winmodems": most modems built into laptops,
PCTel, Smartlink, Agere, Conexant HSF...): no driver on SliTaz 5.1.
The
get-softmodem-driverpackage (Conexant, Agere, Smartlink) builds them for the Linux 3.16 kernel of Core Retro only, on i486; it was not checked on 5.1.
Tell the modem the country it is in, as its manual explains: the dial tone and the line current differ from one country to another.
Talk to the modem
Find its port, then type AT commands to it with microcom, from
BusyBox, as root:
$ dmesg | grep -i -E 'tty|acm'
# microcom -s 115200 /dev/ttyS0
AT
OK
OK means the modem answers. Ctrl+X quits microcom. minicom is also
packaged, with menus.
Connect with pppd
Three files, as root. The phone number and the modem commands go in a
chat script, /etc/ppp/isp.chat:
ABORT 'BUSY'
ABORT 'NO CARRIER'
ABORT 'NO DIALTONE'
ABORT 'NO ANSWER'
'' ATZ
OK ATDT0123456789
CONNECT ''
The modem and the connection go in a peer file,
/etc/ppp/peers/isp:
/dev/ttyS0
115200
modem
crtscts
lock
noauth
defaultroute
usepeerdns
user "mylogin"
connect "/usr/sbin/chat -v -f /etc/ppp/isp.chat"
The password goes in /etc/ppp/pap-secrets and
/etc/ppp/chap-secrets (root only), one line each: the login, a
star, the password.
mylogin * mypassword
Connect and hang up:
# pppd call isp
# /etc/ppp/scripts/ppp-off
With usepeerdns, the DNS servers of the provider are written into
/etc/resolv.conf when the link comes up, and the old file is put back
when it goes down. ip addr show ppp0 shows the connection.
Some old providers still show a text login screen before PPP starts:
add ogin: mylogin and assword: mypassword lines after
CONNECT '' in the chat script.
Troubleshooting
pppd and chat write to the system log. Add debug to the peer file for
more details:
$ tail -f /var/log/messages
NO DIALTONE: the cable, or a modem set for another country; on some lines,ATX3beforeATDTdials without waiting for the tone.BUSY,NO ANSWER: the number of the provider.Connect script failedwith no modem answer: the wrong port, or a modem not powered on.- The link comes up but no web page opens: another connection kept the
default route; take it down first,
trame network down eth0.
Links
- Mobile broadband: USB 3G and 4G sticks, with wvdial.
- pppd and chat manual pages, on the PPP project's site.