[Tech] pppd e script per connessione.

Lorenzo Cocchi lorenzo.cocchi@libero.it
Dom 11 Nov 2001 19:48:45 CET


Vorrei connettermi con il mio modem ext analogico usando "pppd" e "chat"
Ho modificato il file /etc/ppp/options inserendo le seguenti righe:
#/etc/ppp/options
lock
defaultroute
noipdefault
modem
/dev/ttyS0
115200
crtscts
passive
asyncmap 0
-------------------------------------------------
Poi ho creato lo script /etc/ppp/pppscript inserendo le seguenti righe:
#/etc/ppp/pppscript
TIMEOUT 60
ABORT ERROR
ABORT BUSY
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
"" AT&FH0"
OK "atdt0553801010"
TIMEOUT 75
CONNECT
-------------------------------------------------
Dopo ho modificato /etc/ppp/pap-secrets
"mionomelogin"	*	"miapassword"
-------------------------------------------------
Come "root": 
/usr/sbin/pppd -detach connect "/usr/sbin/chat -v -f /etc/ppp/pppscript"
Riporto il log della connessione:
Nov 11 19:40:00 jacq pppd[1252]: pppd 2.4.0 started by lorenzo, uid 0
Nov 11 19:40:01 jacq chat[1253]: timeout set to 60 seconds
Nov 11 19:40:01 jacq chat[1253]: abort on (ERROR)
Nov 11 19:40:01 jacq chat[1253]: abort on (BUSY)
Nov 11 19:40:01 jacq chat[1253]: abort on (NO CARRIER)
Nov 11 19:40:01 jacq chat[1253]: abort on (NO DIALTONE)
Nov 11 19:40:01 jacq chat[1253]: send (AT&FH0^M)
Nov 11 19:40:01 jacq chat[1253]: expect (OK)
Nov 11 19:40:01 jacq chat[1253]: AT&FH0^M^M
Nov 11 19:40:01 jacq chat[1253]: OK
Nov 11 19:40:01 jacq chat[1253]:  -- got it 
Nov 11 19:40:01 jacq chat[1253]: send (atdt0553801010^M)
Nov 11 19:40:01 jacq chat[1253]: timeout set to 75 seconds
Nov 11 19:40:01 jacq chat[1253]: expect (CONNECT)
Nov 11 19:40:01 jacq chat[1253]: ^M
Nov 11 19:40:28 jacq chat[1253]: atdt0553801010^M^M
Nov 11 19:40:28 jacq chat[1253]: CONNECT
Nov 11 19:40:28 jacq chat[1253]:  -- got it 
Nov 11 19:40:28 jacq pppd[1252]: Serial connection established.
Nov 11 19:40:28 jacq pppd[1252]: Using interface ppp0
Nov 11 19:40:28 jacq pppd[1252]: Connect: ppp0 <--> /dev/ttyS0
Nov 11 19:40:59 jacq pppd[1252]: LCP: timeout sending Config-Requests 
Nov 11 19:42:07 jacq pppd[1252]: Modem hangup
-------------------------------------------------
Dove ho sbagliato? 
Chiedo scusa per l'eccessiva lunghezza del messaggio.
Grazie da Lorenzo Cocchi.	




Maggiori informazioni sulla lista flug-tech