From pvickers@broadpark.no Fri Jun 09 11:43:52 2006 Message-id: <24FA8629-6199-4CBB-8A53-C4F3D24F461B@broadpark.no> Date: Fri, 09 Jun 2006 00:43:26 +0200 From: Pete Vickers Subject: GPRS PPP for UNIX Laptops To: randy@psg.com Hi Randy, I recently needed to get OpenBSD's in-kernel pppd working with my 'com1' attached mobile phone 'modem'. It took me a bit of googling & experimentation since the FAQ (http://www.openbsd.org/faq/ faq6.html#PPP) ignores pppd. Prehaps notes are useful to you (or your gprs page) Example senario: - haynes 'AT' compatible modem on 'COM1' (first RS-232 UART) - using OpenBSD inkernel ppp daemon - dial up on boot & automatic redial upon link failure. Configuration: - sample file contents (including extra AT commands to unlock mobile phone PIN etc) show connecting on 'COM1' at 57600baud, adding a system default route via the new ppp link, and automatically redialing immediately after link failure: =========/etc/ppp/peers/ISP==================== /dev/tty00 57600 defaultroute debug #kdebug 7 lock user my_username noauth noccp novj noipdefault persist #demand connect '/usr/sbin/chat -e -v -f /etc/ppp/peers/chat/ISP-gprs' ============================================= script to initialise modem, and dial ISP: =========/etc/ppp/peers/chat/ISP-gprs==================== REPORT "Starting chat script..." ABORT ERROR ABORT BUSY ABORT 'NO CARRIER' ABORT 'NO DIALTONE' '' ATZ OK AT+CFUN=1,1 OK \d\dAT+CPIN=1234 OK AT+CGDCONT=1 OK AT+CGDCONT=1,"IP","my.apn.name",,0,0 OK ATD*99***1# CONNECT ============================================= your ISP username & password (see pap-secrets instead if applicable): =========/etc/ppp/peers/chap-secrets==================== #secrets for authentication using CHAP # client server secret IP addresses my_username * my_password * ============================================= create the i/f at boot time, and initiate connection: =========/etc/hostname.ppp0==================== up !pppd call ISP ============================================= To debug: - $ sudo ifconfig ppp0 create - $ sudo pppd dial ISP - tail /var/log/daemon, /var/log/chat (after syslogd.conf uncomment) and /etc/ppp/connection-errors Hope this is of use. /Pete www.petevickers.com