Mon, 03 May 2004

GPRS


2. run GC75 - send PIN code
I'm not super extra programmer and I can't write comfortable script to send PIN code to GC75.
If You can - please send this script to me :)
ok - for login into GSM network I do this:
minicom --noinit /dev/modem and in window I type:
AT+CFUN=1,1 # this enable additional AT commands, w/o this next command won't work
answer from GC75 schould be: OK
AT+CPIN=1234 # this is PIN code to Your SIM card
answer from GC75 schould be: OK

IMPORTANT: after AT+CPIN You MUST wait few seconds (about 10s in my network) to SIM card be ready and properly logged into GSM netowork. After this You can run pppd to establish GPRS connection or SMS or data connection

All AT commands recognized by GC75 Card (about 200 pages in pdf) You can find
at http://www.sonyericsson.com/support/
With this command You can also send SMS, read them and many more :)




3. Establish GPRS connection :)

--- /etc/resolv.conf ---
type here DNS servers from Your operator
nameserver 1.2.3.4
nameserver 5.6.7.8


--- /etc/ppp/options ---
debug
/dev/modem
115200
srtscts
nodetach
nodeflate
noauth
connect /etc/ppp/gprs-connect
disconnect /etc/ppp/gprs-disconnect
:10.0.0.1
noipdefault
novj
novjccomp
nobsdcomp
defaultroute


--- /etc/ppp/gprs-connect ---
#!/bin/sh
exec /usr/sbin/chat                          \
    TIMEOUT  5                               \
    ECHO     ON                              \
    ABORT    '\nBUSY\r'                      \
    ABORT    '\nERROR\r'                     \
    ABORT    '\nNO ANSWER\r'                 \
    ABORT    '\nNO CARRIER\r'                \
    ABORT    '\nNO DIALTONE\r'               \
    ABORT    '\nRINGING\r\n\r\nRINGING\r'    \
    ''       '\rAT'                          \
    TIMEOUT  6                               \
    SAY      "Press CTRL-C to close the connection at any stage!" \
    SAY      "\ndefining PDP context...\n"   \
    OK       'ATE1'                          \
    OK       'AT+CGDCONT=1,"IP","www.plusgsm.pl","",0,0'  \
    OK       'ATD*99***1#'                   \
    TIMEOUT  10                              \
    SAY      "\nwaiting for connect...\n"    \
    CONNECT  ""                              \
    SAY      "\nConnected."                  \
    SAY      "\nIf the following ppp negotiations fail,\n" \
    SAY      "try restarting the phone.\n"

Line OK 'AT+CGDCONT=1,"IP","www.plusgsm.pl","",0,0' may be diffrent for Your network

--- /etc/ppp/gprs-connect ---
#!/bin/sh
# send break
exec /usr/sbin/chat -V -s -S   \
    ABORT   "BUSY"          \
    ABORT   "ERROR"         \
    ABORT   "NO DIALTONE"   \
    SAY     "\nSending break to the modem\n"  \
    ""      "\K"            \
    ""      "+++ATH"        \
    SAY     "\nPDP context detached\n"


If You're ready, type as root:
pppd
and have fun with GPRS ;-)

(from http://www.internecik.com/?p1=howto&a1=se_gc75linux)
[/Misc] permanent link
September 2007
Sun Mon Tue Wed Thu Fri Sat