Using Minix PPP with a Motorola Timeport GPRS Telephone
In Finland it is really cheap to use portable phone and GPRS functionality to connect to the Internet. I have been studying
this issue because there are areas in Finland where one is not able to get any better line like xDSL. Unfortunately GPRS is
rather slow - like some 33 kbaud modem - but when used for lynxified web browsing or emailing, it is quite OK.
I have tested GPRS connection with Minix 2.0.3 ppp.drv and, as there is no SSH for Minix, also with OpenBSD 3.2 pppd.
The scripts and steps necessary to have a Timeport Telephone working with Minix have been written using examples along the ppp.drv
source and Claudio's comments.
Description
-
GPRS is a way of getting tcp/ip connection to internet using a
portable phone - one must have a suitable phone and gprs service
available from an operator. In finland this is cheap - some twenty
euros/dollars a month.
-
the computer is connected to the gprs phone by point-to-point protocol
and after that the phone is connected to the operator by gprs protocol
-
the phone has some kind of ppp server in it, with limited capabilities
-
physical connection between the computer and the phone may be either
serial cable or infrared ( irda ) connection - but of course here we use cable
-
the tests were succesfully done using the Minix ppp.drv 1.5.2 and openbsd's pppd
-
Minix used was 2.0.3 in a 486slc notebook with 8Mb memory but of course other Minix versions work alike as long as they
are supported by the ppp package of Claudio's
Configuration
To initialize the phone one must use specific gprs-at-commands the form of which depend on the phone and the operator. For the
Motorola timeport you can use the following:
-
file /etc/timeport.scr containing the following line;
'' atz OK at+cgdcont=1,"IP","internet",,0,0 OK atd*99# CONNECT
These commands initialize Timeport to access the operator by GPRS - you will use this file with the chat command to send AT
commands to the phone. Please NOTE that the phrase 'internet' is an APN - a special operator related thing to connect their
service !!
-
Motorola Timeport uses a fixed speed of 57600 baud. Also the internal
ppp server configures always a peer IP to 192.168.100.100.
If you are using other phone you need to check the phone manual to get to know
specific configuration like speed, IP assignment and AT commands. In fact You'll
need documentation from the phone manufacturer that is initially not delivered with the phone.
-
with minix ppp.drv one must NOT set default route to the phone
with Motorola Timeport using the -R switch as the phone gives the same
ip address for both the phone and the ppp.drv -- this will confuse the inet
stack so you need to use a mask of 0.0.0.0 in your configuration
of the interface when you configure an initial IP to the psip device.
-
at least with Motorola Timeport one must set resolv.conf manually
as the phone is unable to give nameserver addresses - i think other
phones work alike.
-
with Motorola Timeport one must use pap authentication but empty
userid and password !!
-
use the following script to start chat and ppp.drv;
#!/usr/bin/ash
#
# this script is for testing gprs connection with Motorola Timeport...
#
n=0
echo `date +%T` - Setting up GPRS functionality and connecting to Timeport...
chat -v -b 57600 -f /etc/timeport.scr < /dev/tty00 > /dev/tty00 2> /tmp/chat.log
echo `date +%T` - Checking log file ...
n=`grep -c ailed /tmp/chat.log`
if [ $n = 0 ]
then
echo `date +%T` - Timeport GPRS configuration succesfull, starting PPP driver...
ppp.drv -v -b 57600 -u '' -p '' /dev/tty00 2> /tmp/ppp.log &
echo `date +%T` - PPP driver is up....
else
echo `date +%T` - Timeport GPRS configuration failed !
fi
# end of script
-
to connect, start the script as root and wait until the driver is up and running
NOTES
-
phone is connected to tty00 (first serial port) in above example.
-
there is no use configuring local IP and mask as ppp.drv will assign the ip that the Timeport returns (192.168.100.100).
After ppp.drv is working, the ifconfig(8) command will return you the configuration status.
-
you need to know the nameserver (DNS) IP and configure it into /etc/resolv.conf if you like to connect to remote nodes using names -
like browsing the web with Claudio's lynx port.
-
looking from outside Your connections appear to come from some randomly named and IP-numbered source as the GPRS connection from the
phone to the operator allways uses some DHCP kind of functionality
Matti Christensen - July 2003