Re: Linux e GPRS
Questi sono i file per il collegamento GPRS, li posto a tutta la lista,
se possono essere utili.
Avevo provato a postarli tutti e tre zippati ma non è arrivato niente...
(come mai?)
Ciao
Vincenzo
# File: gprs
#
# Description:
# This file holds the serial cable and IrDA pppd options for GPRS phones
# To give some debug info
debug
# Serial device to which terminal is connected;
# with serial port (COM1 in Windows) use /dev/ttyS0
# and with IrDA use /dev/ircomm0.
/dev/ircomm0 # IrDA
#/dev/ttyS0 # serial cable
# Serial port line speed
115200
# Hardware flow control needs to be used with serial cable.
# With IrDA it should be disabled with nocrtscts option.
#crtscts # serial cable
nocrtscts # IrDA
# To keep pppd on the terminal
nodetach
# Connect script
connect /etc/ppp/gprs-connect-chat
# IP addresses:
# - accept peers idea of our local address and set address peer as 10.0.0.1
# (any address would do, since IPCP gives 0.0.0.0 to it)
# - if you use the 10. network at home or something and pppd rejects it,
# change the address to something else
:10.0.0.1
# pppd must not propose any IP address to the peer!
noipdefault
# Accept peers idea of our local address
ipcp-accept-local
# Ignore carrier detect signal from the modem
local
# No ppp compression
novj
novjccomp
# Disconnect script
disconnect /etc/ppp/gprs-disconnect-chat
# Add default route
defaultroute
#END FILE GPRS
#FILE GPRS-CONNECT-CHAT
#!/bin/sh
#
# File:
# chat-gprs-connect
#
# Description:
# chat script to open Sonera GPRS service with GPRS phones. If ppp
# negotiation stalls, try restarting the phone. To try with other GPRS
# operator setting, change the PDP contex setting. The settings work with
# all Ericsson models, but Nokia 8310 does not suppor QoS parameters with
# AT commands, so just delete those lines and it'll work.
#
# Set PDP context CID=1, protocol=IP, APN=internet:
# AT+CGDCONT=1,"IP","internet","",0,0
#
# Set CID=1 QoS requirements from the network, not supported by 8310:
# AT+CGQREQ=1,0,0,0,0,0
#
# Set CID=1 minimum acceptable QoS parameters, not supported by 8310:
# AT+CGQMIN=1,0,0,0,0,0
#
# 'Call' CID=1 (activate PDP context one, perform GPRS attach):
# ATD*99***1#
# The actual chat script:
exec 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 12 \
SAY "Press CTRL-C to close the connection at any
stage!" \
SAY "\ndefining PDP context...\n" \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","web.omnitel.it";' \
OK AT+CGQREQ=1,2,4,3,6,31 \
OK AT+CGQMIN=1,2,4,3,6,31 \
OK ATD*99# \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"
#END FILE GPRS-CONNECT-CHAT
#FILE GPRS-DISCONNECT-CHAT
#!/bin/sh
#
# File:
# chat-gprs-disconnect
#
# 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"
#END FILE
Reply to: