Using serial modem
This material is work-in-progress ... Do not follow instructions here until this notice is removed. |
Requirements
Install alpine-2.1.3 or newer (see these notes if you are unsure how to do it).
Hardware
Start by deciding which serial port to use and plug you modem there.
In below examples replace ttyS0 with the ttyS? that applies for your needs.
(/dev/ttyS0 is same as COM1 - ttyS1=COM2, ttyS2=COM3, ttyS3=COM4, ...)
Install packages
Install required packages
apk add ppp
Modules
Load some needed modules and make sure they get automatically loaded at next reboot
modprobe ppp echo "ppp" >> /etc/modules
Configure
Create configfiles
/etc/ppp/peers/serialmodem
debug /dev/ttyS0 115200 modem crtscts asyncmap 0 defaultroute noipdefault lock noauth connect '/usr/sbin/chat -v -f /etc/ppp/chat-serialmodem'
/etc/ppp/chat-serialmodem
ABORT 'BUSY' ABORT 'ERROR' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT 'NO DIALTONE' ABORT 'Invalid Login' ABORT 'Login incorrect' REPORT 'CONNECT' TIMEOUT '60' '' 'ATZ' OK 'ATDT{phonenumber}' CONNECT '' ogin: '{login_id}' sword: '{your_password}'
See this link for more details.
Start/Stop
Start connection
pon serialmodem
Stop connection
poff serialmodem
If something goes wrong...
Check if process is running
pidof pppd
Logfile would also give you information on what happened
grep pppd /var/log/messages
Check nic information
ifconfig ppp0
pppd seems to have some pppstats function
pppstats