Modem hangup
//co oznacza rozłączenie, odłożenie słuchawki (ang. hang up) Odłączenie modemu od linii, technicznie odpowiadające odłożeniu słuchawki na widełki.
Connect time 4.5 minutes. //tutaj czasami 1min a czasami 5min
Posiadam nastepujace pliki:
/etc/peers/gprs
Kod: Zaznacz cały
# Enables connection debugging facilities. Debug info from pppd: Comment this off, if you don't need more info
debug
# Show password in debug messages
# show-password
# Use the modem control lines. Serial device to which the GPRS phone is connected:
# /dev/ttyS0 for serial port (COM1 in Windows),
# /dev/ttyS1
# /dev/ttyS2
# /dev/ircomm0
# /dev/ircomm0 for IrDA,
# /dev/ttyUB0 for Bluetooth (Bluez with rfcomm running) and
# /dev/ttyUSB0 for USB
# /dev/ttyS0 # serial port one
# /dev/ttyS1 # serial port two
# /dev/ircomm0 # IrDA serial port one
# /dev/rfcomm0 # Bluetooth serial port one
# /dev/ttyUSB0 # USB serial device, for example Orange SPV
/dev/modem
# Szybkosc polaczenia. Serial port line speed
115200 # fast enough
# 57600 # perhaps usefull with IrDA
# Use hardware flow control (i.e. RTS/CTS) to control the flow of data on the serial port.
# sprzetowa kontrola RTC/CTS - Hardware flow control: Use hardware flow control with cable, Bluetooth and USB but not with IrDA.
crtscts # serial cable, Bluetooth and USB
# nocrtscts # IrDA
# Ignore carrier detect signal from the modem:
# local
# Specifies that pppd should create a UUCP-style lock file for the serial device to ensure exclusive access to the device.
# ustawia plik lock dla danego portu
# lock
# Disable protocol field compression negotiation in both the receive and the transmit direction.
# nopcomp
# Disable Address/Control compression in both directions (send and receive).
# noaccomp
# Disable magic number negotiation. With this option, pppd cannot detect a looped-back line.
nomagic
# Disable Compression Control Protocol (CCP) negotiation.
# noccp
# Opcja updatach oznacza, ze pppd odlaczy sie od terminala dopiero gdy zostanie nawiazane polaczenie.
updetach
nodeflate
# The phone is not required to authenticate:wylaczenie identyfikacji
noauth
# nazwa uzytkownika przydzielona w umowie
# user idea
# sciezki polacz-rozlacz
connect "/usr/sbin/chat -v -f /etc/ppp/gprs-connect-chat"
disconnect "/usr/sbin/chat -v -f /etc/ppp/gprs-disconnect-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
:192.168.0.10
# Disables the default behaviour when no local IP address is specified,
# which is to determine (if possible) the local IP address from the hostname.
# w przypadku braku lokalnego adresu IP, zostaje on przekazany przez serwer providera
# pppd must not propose any IP address to the peer!
noipdefault
# Accept peers idea of our local address
# ipcp-accept-local
# DNS servers from the phone:
# some phones support this, some don't.
usepeerdns
# Disable Van Jacobson style TCP/IP header compression in both the transmit and the receive direction.
novj
# Disable the connection-ID compression option in Van Jacobson style TCP/IP header compression.
novjccomp
# Don't detach from the controlling terminal.Keep pppd attached to the terminal.Comment this to get daemon mode pppd
nodetach
nobsdcomp
# This option causes pppd to create such a default route when
# IPCP comes up, and delete it when the link is terminated.
# ustawianie routingu
defaultroute
# Asyncmap some phones may require this option.
# asyncmap 0xa0000
# Require PAP authentication some phones may require this option.
# require-pap
# po przerwaniu połączenia, pppd połączy nas ponownie
# persist
# ilosc nieudanych polaczen po ktorych pppd przestanie ponownie sie laczyc ( 0 - brak ograniczen )
# maxfail 0
# kdebug 2
# lcp-echo-interval 4
# lcp-echo-failure 5
# lcp-max-configure 60
# lcp-restart 2
plik /etc/gprs-connect-chat
Kod: Zaznacz cały
TIMEOUT 1000
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'
TIMEOUT 1000
'' '\rAT'
OK 'ATZ'
OK 'AT+CFUN=1,1'
OK 'AT+CPIN="1111"'
OK 'AT&F'
OK 'ATE1\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d'
OK 'ATV1'
OK 'AT+CGMI'
OK '\d\d\d\d\d\d\d\d\d\d\dAT+CGDCONT=1,"IP","www.idea.pl","",0,0'
OK 'ATD*99***1#'
TIMEOUT 1000
SAY "\nwaiting for connect...\n"
CONNECT ""
SAY "\nConnected!"
plik /etc/gprs-disconnect-chat
Kod: Zaznacz cały
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"
plik /etc/resolv.conf
Kod: Zaznacz cały
nameserver 194.9.223.79
nameserver 217.17.34.10
search astro
Połączenie przebiega nastepująco:
Kod: Zaznacz cały
alpha:~ # pppd call gprs
Press CTRL-C to close the connection at any stage!
AT
OK
AT+CFUN=1,1
OK
AT+CPIN="8612"
OK
AT&F
OK
ATE1
*MTSMENU: "SIMteligent", 0, 4
1:"Serwisy"
2:"mBox"
3:"HitCzat"
4:"Lokalizacja"
*MRDY: 3
OK
ATV1
OK
Waiting for logged to gsm network...
defining PDP context...
AT+CGMI
SONY ERICSSON
OK
AT+CGDCONT=1,"IP","www.idea.pl","",0,0
OK
waiting for connect...
ATD*99***1#
CONNECT
Connected.
If the following ppp negotiations fail,
try again. Sometimes the waiting time to logged to gsm network is to short.
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyS2
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xde3fe42a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xde3fe42a> <pcomp> <accomp>]
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xde3fe42a> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xde3fe42a> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x6d <mru 1500> <asyncmap 0x0> <auth pap> <magic 0x496c4> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x6d <auth pap>]
rcvd [LCP ConfReq id=0x6e <mru 1500> <asyncmap 0x0> <magic 0x496c4> <pcomp> <accomp>]
sent [LCP ConfAck id=0x6e <mru 1500> <asyncmap 0x0> <magic 0x496c4> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xde3fe42a]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [LCP EchoRep id=0x0 magic=0xde3fe42a]
appear to have received our own echo-reply!
rcvd [IPCP ConfReq id=0x6d <addr 87.96.35.0> <compress VJ 0f 01>]
sent [IPCP ConfRej id=0x6d <compress VJ 0f 01>]
rcvd [IPCP ConfNak id=0x1 <addr 87.96.35.41> <ms-dns1 194.9.223.79> <ms-dns3 217.17.34.10>]
sent [IPCP ConfReq id=0x2 <addr 87.96.35.41> <ms-dns1 194.9.223.79> <ms-dns3 217.17.34.10>]
rcvd [IPCP ConfReq id=0x6e <addr 87.96.35.0>]
sent [IPCP ConfNak id=0x6e <addr 10.0.0.1>]
rcvd [IPCP ConfAck id=0x2 <addr 87.96.35.41> <ms-dns1 194.9.223.79> <ms-dns3 217.17.34.10>]
rcvd [IPCP ConfReq id=0x6f <addr 10.0.0.1>]
sent [IPCP ConfAck id=0x6f <addr 10.0.0.1>]
local IP address 87.96.35.41
remote IP address 10.0.0.1
primary DNS address 194.9.223.79
secondary DNS address 217.17.34.10
Script /etc/ppp/ip-up started (pid 5020)
Script /etc/ppp/ip-up finished (pid 5020), status = 0x0
appear to have received our own echo-reply!
appear to have received our own echo-reply!
appear to have received our own echo-reply!
appear to have received our own echo-reply!
appear to have received our own echo-reply!
Modem hangup
Connect time 4.5 minutes.
Sent 16311 bytes, received 68613 bytes.
Script /etc/ppp/ip-down started (pid 5189)
Connection terminated.
Script /etc/ppp/ip-down finished (pid 5189), status = 0x0
alpha:~ #
Po upływie 4,5 minuty otrzymuje:
Kod: Zaznacz cały
alpha:~ # ping wp.pl
[...]
64 bytes from www.wp.pl (212.77.100.101): icmp_seq=594 ttl=116 time=2632 ms
64 bytes from www.wp.pl (212.77.100.101): icmp_seq=595 ttl=116 time=1651 ms
64 bytes from www.wp.pl (212.77.100.101): icmp_seq=596 ttl=116 time=3424 ms
64 bytes from www.wp.pl (212.77.100.101): icmp_seq=597 ttl=116 time=3248 ms
64 bytes from www.wp.pl (212.77.100.101): icmp_seq=598 ttl=116 time=2308 ms
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
[...]
W pliku /etc/ppp/options ustawione mam:
Kod: Zaznacz cały
lcp-echo-interval 50000 #potrzebne do wykrywania zerwania połączenia
#lcp-echo-failure 5 #potrzebne do odnowienia połączenia gdyby połączenie się zawiesiło
Niestety nie wiem czy chodzi o lcp-echo-failure czy też zupełnie o coś innego. Bardzo prosze o pomoc oraz jakieś wskazowki.
Wszystkie ustawienia lcp-echo-failure możemy znaleźc poprzez:
Kod: Zaznacz cały
grep -r lcp-echo-failure /etc/ppp
P.S. Pod Windows XP wszystko działa "wyśmienicie".
P.S. Swoje problemy przedstawiłem na stronie http://forum.suse.pl/index.php/topic,91 ... l#msg53890
P.S. Komendy AT znalazłem na stronie http://leksykot.top.hell.pl/varia/pecet/modem/index