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:
and make sure the ppp and chat package is installed on that box.
To install ppp on debian, you can use
Here is the contents of /etc/ppp/peers/maxisGPRS
here is the contents of /etc/ppp/pap-secrets
here is the contents of /etc/ppp/chat/maxisGPRS
here is the contents of /etc/ppp/chat/gprs-disconnect
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:
(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!!!
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:
- /etc/ppp/peers/maxisGPRS
- /etc/ppp/pap-secrets
- /etc/ppp/chat/maxisGPRS
- /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 maxis
lcp-echo-interval 0
usepeerdns
maxfail 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!!!
Comments
Are you periodically uploading your rain gauge data via GPRS? Can you start a remote console session on your SBC over GPRS? ... so many questions!
Thanks for this article. I am also using a TS7260 card and I would like to use PPP with a wavecom modem but It still doesn't work even with your scripts. Could you please tell me how your tty is configured in /etc/inittab ?
Thanks,
Daniel
I connect my wavecom modem to /dev/ttyTS0. I didn't set anything to the /etc/inittab
However, check this out if you wanna see my /etc/inittab contents: /etc/inittab
there are three serial ports on the board. One with the male DB9 connector and the other two is labelled as COM2 and COM3 on the board.
the ttyAM0 is the one with DB9 connector. ttyAM1 is COM2 and ttyTS0 is COM3.
if you plug your wavecom modem on ttyAM0, you do have to disable the serial console output on /etc/inittab. I still need the serial console, that's why I use COM3 for the modem.
then comment this line on /etc/inittab :
T0:23:respawn:/sbin/getty -L ttyAM0 115200 vt100
I use the debian that comes on the sd card from TS.
Moreover, do you know some hhtp/ftp sites that works for ARM to add in /etc/apt/sources.list ?
Thanks again for your help.
Daniel
Make sure you have ppp_async on your /etc/modules
I'm using the same sd card image from TS. I just do some update and upgrade by apt-get update and apt-get upgrade.
Currently, my SD card image is debian Etch not Sarge. And install again the etch version of ppp and chat.
Thanks very much for your help, it seems to be working now.
Daniel
I am currently trying to use /dev/ttyTS0 for ppp connexion. I installed tsuart0 and tsuart7260 so that I can use /dev/ttyTS0.
When I try to output some caracters through COM3, it works on my hyperterminal. But when I try the ppp connexion (having modified /etc/ppp/peers/wavecomGPRS to use ttyTS0), it doesn't work. When I try ttyAM0, it works. Do you know if there is a difference that can explain this ??
Thanks for your help,
Daniel
yes, there is differences between ttyAM0 and ttyTS0. check your cable pinout. you can't simply wire the RX, TX and GND to the port because the wavecom modem also check for RTS,CTS and other signals. you have to also loopback the RTS and CTS pin on the wavecom 15 pin connector and also loop the DCD, DTR and DSR pins together.
Thanks for all,
Daniel