hog61 ha scritto:Come ti capisco...sto impazzendo!!!
Hai provato con gli script che mi ha postato Pennega nel mio post?
Saresti così gentile da postarmi la tua configurazione KPPP, comprese le 'impostazioni modem' nella relativa tab?
Non credo che sia problema di tel ma non so più cosa fare...non voglio cancellare tutto e continuare con Win!!!
prova con questi script...
Modello cellulare: Nokia 6100
Collegamento cell --> PC : Cavetto su porta USB
Distro: Slackware 9.0
Kernel: 2.4.20 (penso vada bene anche per gli altri kernel, basta avere le giuste
implementazioni nel kernel)
Abb.GPRS: WIND (APN Internet.wind)
Cominciamo..
Innanzitutto dovete controllare se avete implementato l'USB nel kernel:
root@marcello:~# dmesg|grep usb
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb.c: new USB bus registered, assigned bus number 1
usb.c: USB device 2 (vend/prod 0x67b/0x2303) is not claimed by any active driver.
usb-uhci.c: $Revision: 1.275 $ time 15:38:38 Mar 11 2003
usb-uhci.c: High bandwidth mode enabled
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: registered new driver serial
usbserial.c: USB Serial support registered for Generic
usbserial.c: USB Serial Driver core v1.4
usbserial.c: USB Serial support registered for PL-2303
usbserial.c: PL-2303 converter detected
usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
root@marcello:~#
se l'output e' simile a questo, allora siete ok.
Notate la riga:
usb.c: USB device 2 (vend/prod 0x67b/0x2303) is not claimed by any active driver.
questo vuol dire che l'id corrispondente alla vostra device e' presente ma non e'
utilizzata da nessun driver. Per ovviare a questo problema, basta aprire il link
http://www.linux-usb.org/usb.ids e cercare l'id corrispondente alla vostra device
Una volta trovato, basta che eseguiate il seguente comando:
root@marcello:~# modprobe usbserial vendor=0x067b product=0x2303
root@marcello:~#
Mi sembra superfluo sottolineare che al posto di vendor=0x067b product=0x2303
dovrete mettere i VOSTRI vend/prod ids
Per verificare se tutto e' andato bene, basta controllare il log /var/log/messages
root@marcello:~#cat /var/log/messages|grep usb
Sep 11 16:31:25 marcello kernel: usb.c: registered new driver serial
Sep 11 16:31:25 marcello kernel: usbserial.c: USB Serial support registered for Generic
Sep 11 16:31:25 marcello kernel: usbserial.c: USB Serial Driver core v1.4
Sep 11 16:31:25 marcello kernel: usbserial.c: USB Serial support registered for PL-2303
Sep 11 16:31:25 marcello kernel: usbserial.c: PL-2303 converter detected
Sep 11 16:31:25 marcello kernel: usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
Sep 11 16:31:25 marcello kernel: pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.9
e se l'output e' come questo vuol dire che siete a meta' dell'opera

N.B. la device da utilizzare sara' /dev/ttyUSB0
Ora bastera' metter su degli script per la connessione gprs. Vi lascio qui di
seguito i miei script (i vostri li dovrete creare nella dir '/etc/ppp/peers'
. Nel caso non ci fosse, bastera' crearla con 'mkdir /etc/ppp/peers')
root@marcello:/etc/ppp/peers# vi gprs
#Comment this to get daemon mode pppd
nodetach
# Debug info from pppd:
# Comment this off, if you don't need more info
debug
# Show password in debug messages
show-password
# Connect script:
connect /etc/ppp/peers/gprs-connect-chat
# Disconnect script:
# AT commands used to 'hangup' the GPRS connection.
disconnect /etc/ppp/peers/gprs-disconnect-chat
# USB serial device
/dev/ttyUSB0
# Serial port line speed
115200
# Hardware flow control:
# Use hardware flow control with USB
crtscts
# Ignore carrier detect signal from the modem:
local
# pppd must not propose any IP address to the peer!
noipdefault
# Accept peers idea of our local address
ipcp-accept-local
# Add the ppp interface as default route to the IP routing table
defaultroute
# DNS servers from the phone:
# some phones support this, some don't.
usepeerdns
# ppp compression:
novj
nobsdcomp
novjccomp
nopcomp
noaccomp
# The phone is not required to authenticate:
noauth
#EOF
~
Benissimo. Questo e' il file che il pppd chiamera' per avviare la connessione.
Ora dovremo crearci due script per la connessione: gprs-connect-chat e
gprs-disconnect-chat
root@marcello:/etc/ppp/peers# vi gprs-connect-chat
#!/bin/sh
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 ATH \
OK ATE1 \
OK 'AT+CGDCONT=1,"IP","internet.wind","",0,0' \
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"
#EOF
~
Ok. Il primo e' fatto.
N.B. Questo file e' stato creato per la connessione GPRS tramite WIND.
Quindi, nel caso vi voleste collegare con un qualsiasi altro operatore, bastera'
bastera' modificare l'APN di WIND (internet.wind) nel vostro APN nella riga:
OK 'AT+CGDCONT=1,"IP","internet.wind","",0,0' \
Creiamo ora l'altro script:
#!/bin/sh
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!" \
#EOF
~
Ok. A questo punto sembrerebbe tutto ok ma, se provate ad avviare la connessione succede
qualcosa di strano: la connessione viene creata ma dopo 2.1 min viene killato il link alla
vostra device. Strano eh? Beh, non tanto.
Infatti provate ad aprire il file '/etc/ppp/options' ed andate alle righe:
lcp-echo-interval 30
cp-echo-failure 4
Bene, queste due righe sono il problema da risolvere. La prima riga manda un echo ogni
30secs alla device e la seconda dice di togliere il link con la device dopo il quarto
quarto ping fallito. Bastera' commentare quelle due righe per evitare l'echo e per allungare
la vostra permanenza su internet

Quindi, cambiate le righe in:
#lcp-echo-interval 30
#cp-echo-failure 4
Perfetto! Tutto ora e' settato per benino. Avviate la connessione:
root@marcello:~# pppd call gprs
Press CTRL-C to close the connection at any stage!
defining PDP context...
^@~AT
OK
ATH
OK
ATE1
OK
AT+CGDCONT=1,"IP","internet.wind","",0,0
OK
waiting for connect...
ATD*99##
CONNECT
Connected.
If the following ppp negotiations fail,
try restarting the phone.
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfRej id=0x1 ]
sent [LCP ConfReq id=0x2 ]
rcvd [LCP ConfAck id=0x2 ]
rcvd [LCP ConfReq id=0x0 ]
sent [LCP ConfRej id=0x0 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
sent [CCP ConfReq id=0x1 ]
rcvd [IPCP ConfReq id=0x0 ]
sent [IPCP ConfAck id=0x0 ]
rcvd [LCP ProtRej id=0x0 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
sent [IPCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [IPCP ConfNak id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfAck id=0x2 ]
Cannot determine ethernet address for proxy ARP
local IP address 212.141.245.225
remote IP address 10.6.6.6
primary DNS address 212.245.255.2
secondary DNS address 212.141.84.12
Ok, siete connessi

Come ultima cosa, bastera' inserire i DNS di WIND nel file '/etc/resolv.conf'
root@marcello~#vi /etc/resolv.conf
nameserver 212.245.255.2
nameserver 212.141.84.12
#EOF
~
Ok. Ora e' veramente tutto ok. Enjoy your days
Marcello, Manue|ito@ircnet