Maxis GPRS Connection

I'm putting this here just for my reference. Feel free to ask me on the comment section if you don't understand what I'm talking about... Please note that I'm using TS-7260 SBC from embedded arm which I've installed ts-7000 linux (debian-arm based) on SD card.


I'm using this to have wireless connection fron my Rain Gauge device to the internet. To make internet connection via Maxis GPRS on a Linux computer with ppp dial up connection, we just need some files which is:

1./etc/ppp/peers/maxisGPRS

2./etc/ppp/pap-secrets

3./etc/ppp/chat/maxisGPRS

4./etc/ppp/chat/gprs-disconnect

and make sure the ppp and chat package is installed on that box.

To install ppp on debian, you can use

$ apt-get install ppp


Here is the contents of /etc/ppp/peers/maxisGPRS

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/ppp/chat/maxisGPRS"
disconnect "/usr/sbin/chat -V -s -S -f /etc/ppp/chat/gprs-disconnect"
debug
crtscts
/dev/ttyTS0
9600
defaultroute
noipdefault
user maxislcp-echo-interval 0
usepeerdnsmaxfail 0


here is the contents of /etc/ppp/pap-secrets

maxis            *            wap                *

here is the contents of /etc/ppp/chat/maxisGPRS

ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
'' ATZ
OK AT
OK ATE0V1
OK AT+CGDCONT=1,"IP","net"
OK ATDT*99***1#
CONNECT ''
'' \d\c



here is the contents of /etc/ppp/chat/gprs-disconnect



# This is called at , (termination of pppd)
    ABORT "BUSY"
    ABORT "ERROR"
    ABORT "NO DIALTONE"
    SAY "Sending break to the modem\n""
    " "\K"""
     "\K"""
     "\K"""
     "+++ATH"""
     "+++ATH"""
     "+++ATH"SAY "PDP context detached\n"



I've tested this and verified that it works on ubuntu Gutsy too... just plug in the Wavecom modem and change the /etc/ppp/peers/maxisGPRS file to use /dev/ttyS0 or any serial port where you plug in the GPRS modem.



to dial the gprs connection, use this command:



$ pppd call maxisGPRS debug nodetach

(I'm using debug nodetach to see the output, you can strip out that two option if you wanna call this from cron or your script)



OK, that's all... Enjoy!!!

0 comments: