In order to get online using GPRS you would need:
- A device capable of handling GPRS; usually a cell phone or a GPRS modem. I’ve used a Nokia 3110c with some success. This particular cellphone model offers a USB port using which it may be connected to a host computer with a compatible USB cable.
- A subscription to GPRS service. Contact your cell service provider on the way to enable this on your cell phone. The examples below describe the configuration needed for using AirTel’s GPRS service.
- The appropriate configuration for your OS. This post describes how to use GPRS using FreeBSD and NetBSD.
Ensure that the relevant drivers are present in the kernel. The Nokia 3110c is supported by the stock umodem(4) driver. Use
kldload(8)to load this into your kernel if it is not already present:
# kldload umodem
On connecting the cellphone to the computer, you should see a message similar to the following on the console (or in
... kernel: ucom0: Nokia Nokia 3110c, rev x.yy/a.bb, addr 2, iclass 2/2 ... kernel: ucom0: data interface 2, has CM over data, has break ... kernel: ucom0: status change notification available
If all goes well, a new device entry such as
/dev/cuaU0should be present under
Add the following to
/etc/ppp/ppp.conf(note the leading whitespace on most lines):
airtel: set device /dev/cuaU0 enable dns set phone "*99***1#" set authname "airtel" set authkey "airtel" set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \ \"\" AT OK-AT-OK ATQ0V1E1S0=0&C1&D2+FCLASS=0 OK \ AT+CGDCONT=1,\\\"IP\\\",\\\"airtelgprs.com\\\" OK \\dATDT\\T \ TIMEOUT 40 CONNECT" add default HISADDR set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
For the curious, the
ppp(8)manual page fully describes the syntax and semantics of the configuration commands above.
Note that the contents of the
authkeyconfiguration items do not seem to matter. You could put the name of your pet dog there if you wish.
ppp(8)daemon in the usual way:
% ppp airtel ppp> dial ... the prompt changes as PPP setup progresses PPP>
And you should be done.
In NetBSD® as in FreeBSD™, this particular cellphone
model is supported by the
umodem(4) driver. Once recognized,
the modem will be accessible using a path name such as
The following recipe uses the
pppd(8) daemon. This recipe
requires the NetBSD kernel to have been compiled with in-kernel
Create a file
/etc/ppp/peers/airtelwith the following contents:
ttyU0 115200 connect '/usr/sbin/chat -v -f /etc/ppp/chat-airtel -T "*99***1#"' defaultroute usepeerdns ipcp-accept-local ipcp-accept-remote user "airtel" password "airtel"
Create a file
/etc/ppp/chat-airtelwith the following contents:
ABORT "BUSY" ABORT "NO CARRIER" ABORT "ERROR" ABORT "NO ANSWER" "" "AT" OK "ATQ0V1E1S0=0&C1&D2+FCLASS=0" OK AT+CGDCONT=1,\"IP\",\"airtelgprs.com\" OK \dATDT\T TIMEOUT 40 CONNECT
Start ppp using:
# pppd call airtel
/var/log/messagesfor error messages.
Once the connection is setup, IP addresses for the ISP’s DNS servers would be placed in
/etc/ppp/resolv.conf. Add these to
In my experience, connection speeds vary widely from a few bytes/second to a peak of a few KB/sec. Connection latencies also tend to be variable, ranging from a few hundred milliseconds upwards. There are frequent long pauses, a minute or more in duration, during which no traffic flows (though the connection remains up).
Thus GPRS based connectivity is best used for batch tasks such as downloading and sending email.