This is a micro-HOWTO, simply documenting how I managed to connect a Linux notebook to the Rogers AT&T GPRS wireless data service, using a Motorola 280 phone over an IRDA link. The same should work with wireless phones connected to the Linux machine's serial port, you just don't need to do any of the stuff I had to do in order to bring the IRDA link to life.

Prerequisites

First, as a matter of course, you need to have the IRDA drivers installed on your system. It may be necessary to recompile the kernel with the appropriate drivers enabled. It is recommended that you compile the drivers as modules.

Second, you need the IRDA utilities (specifically, irattach) from http://irda.sourceforge.net/. Compile and install them.

Third, you need the PPP driver (either as a module or compiled into the kernel.) It should already be present on most Linux installations.

Fourth, you must make note of the IRDA configuration information iny our system BIOS. In my case, IRDA is set up on 0x3e8, IRQ 3; i.e., /dev/ttyS1.

Fifth, you must make sure that you have a character device file named /dev/ircomm0. It is possible that this is created for you automatically if you have a kernel compiled with the /dev filesystem. Otherwise, install the device file with

mknod /dev/ircomm0 c 161 0

Setup

Log on as root.

Place your wireless phone in IRDA data mode, and place it next to the IR port on your computer.

Do the following

irattach /dev/ttyS1

(It may be that you will have to use a device other than /dev/ttyS1, depending on your BIOS settings.)

At this point, you could test if your phone is responding using minicom. Start minicom as root with -s, specify /dev/ircomm0 as the communications port, and see if the phone responds to commands like AT, ATZ, or ATI3. If you can talk to the phone, you are ready to initiate a PPP connection.

PPP Connection

The PPP connection requires three files:

  1. A command script that invokes pppd
  2. A chat script
  3. A "secrets" file

In my case, the command script is /root/dopppd.portage, the chat script is at /root/portage.scr. The secrets file is at a standard location, /etc/ppp/chap-secrets, with /etc/ppp/pap-secrets soft-linked to it.

Here's what these files contain for the Rogers AT&T Portage Plus service:

dopppd.portage


#!/bin/sh
/usr/sbin/pppd -d /dev/ircomm0 38400 connect /root/portage.scr \
defaultroute crtscts modem noipdefault persist lock mru 1500 \
user wapuser1 lcp-echo-interval 0

portage.scr


#!/bin/sh
/usr/sbin/chat -v "" "AT+CGDCONT=2,IP,INTERNET.COM" OK \
"ATD*99***2#" CONNECT

/etc/ppp/chap-secrets


wapuser1	wapuser1	wap

Note that dopppd.portage and portage.scr both must have execute permissions. The fields in chap-secrets are tab-delimited.

(You may wonder where the CHAP username and password, or where the APN used in the +CGDCONT modem string came from. These settings are Rogers-specific; see http://www.vttoth.com/CMS/index.php/technical-notes/85 for more information.)

To initiate the PPP connection, do the following as root:

dopppd.portage

You can monitor its progress through your SYSLOG file. If all goes well, after about 10-15 seconds, you will have established a PPP connection.