Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GPRS + Bluetooth через PPPD (уже exit code=16), LCP timeout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
WebXDev
n00b
n00b


Joined: 15 May 2007
Posts: 54

PostPosted: Thu Jul 17, 2008 3:27 am    Post subject: GPRS + Bluetooth через PPPD (уже exit code=16), LCP timeout Reply with quote

Хочу поднять GPRS+Bluetooth через PPPD. Фигня в том, что PPPD возращает ошибку с кодом 16.

ГПРС в телефоне активирован и работает.
Блютус также

В файл /etc/conf.d/net я добавил это:
Code:
config_ppp0=( "ppp" )
RC_NEED_ppp0="bluetooth"

link_ppp0="/dev/rfcomm0"
username_ppp0="beeline"
password_ppp0="beeline"

pppd_ppp0=(
"maxfail 0" # WARNING: It's not recommended you use change this
# if you don't specify maxfail then we assume 0
"updetach" # If not set, "/etc/init.d/net.ppp0 start" will return
# immediately, without waiting the link to come up
# for the first time.
# Do not use it for dial-on-demand links!
"debug" # Enables syslog debugging
"noauth" # Do not require the peer to authenticate itself
"defaultroute" # Make this PPP interface the default route
"usepeerdns" # Use the DNS settings provided by PPP

# Dead peer detection
"lcp-echo-interval 15" # Send a LCP echo every 15 seconds
"lcp-echo-failure 3" # Make peer dead after 3 consective
# echo-requests
# Dial-up settings
"lock" # Lock serial port
"115200" # Set the serial port baud rate
"modem crtscts" # Enable hardware flow control
"noauth"
"kdebug 7"
"persist"
)

phone_number_ppp0=( "*99***1#" )

chat_ppp0=(
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO ANSWER'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' 'Login incorrect'
'ABORT' 'Username/Password Incorrect'
'TIMEOUT' '5'
'' 'AT+CGDCONT=1,"IP","internet.beeline.ru"'
'OK' 'ATDT\T'
'TIMEOUT' '60'
'CONNECT' ''
'TIMEOUT' '5'
'~--' ''
)


Code:


/etc/wvdial.conf:
[Dialer Defaults]
Modem = /dev/rfcomm0
#Baud = 115200
Baud = 460800
#Init1 = ATZ
#Init2 = AT+CGDCONT=1,"IP","internet.beeline.ru"
Init = AT+CGDCONT=1,"IP","internet.beeline.ru"
Dial Command = ATD
Phone = *99***1#
Username = beeline
Password = beeline
New PPPD = yes


так я запускаю wvdial:
Code:

# wvdial
--> WvDial: Internet dialer version 1.60
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","internet.beeline.ru"
AT+CGDCONT=1,"IP","internet.beeline.ru"
OK
--> Modem initialized.
--> Sending: ATD*99***1#
--> Waiting for carrier.
ATD*99***1#
CONNECT
--> Carrier detected. Waiting for prompt.
--> Don't know what to do! Starting pppd and hoping for the best.
--> Starting pppd at Thu Jul 17 19:04:00 2008
--> Pid of pppd: 6784
--> Using interface ppp0
--> Disconnecting at Thu Jul 17 19:04:30 2008
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> man pppd explains pppd error codes in more detail.
--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.


Code:
# cat /var/log/messages | grep pppd
Jul 17 19:12:57 localhost pppd[7485]: pppd 2.4.4 started by root, uid 0
Jul 17 19:12:57 localhost pppd[7485]: Using interface ppp0
Jul 17 19:12:57 localhost pppd[7485]: Connect: ppp0 <--> /dev/rfcomm0
Jul 17 19:13:27 localhost pppd[7485]: LCP: timeout sending Config-Requests
Jul 17 19:13:27 localhost pppd[7485]: Connection terminated.
Jul 17 19:13:27 localhost pppd[7485]: Modem hangup
Jul 17 19:13:27 localhost pppd[7485]: Exit.
#


В чём фигня может быть?
Может ещё какие конфиги необходимо показать?


Last edited by WebXDev on Thu Jul 17, 2008 3:55 pm; edited 3 times in total
Back to top
View user's profile Send private message
ba
l33t
l33t


Joined: 25 May 2003
Posts: 804

PostPosted: Thu Jul 17, 2008 5:58 am    Post subject: Reply with quote

а что в логах-то?
Code:
grep pppd /var/log/messages
Back to top
View user's profile Send private message
WebXDev
n00b
n00b


Joined: 15 May 2007
Posts: 54

PostPosted: Thu Jul 17, 2008 12:41 pm    Post subject: Reply with quote

ba wrote:
а что в логах-то?
Code:
grep pppd /var/log/messages

проапдейтил первый пост.

Я попытался ещё через KPPP залогиниться, вот что в /var/log/messages получил:
Quote:
Jul 17 19:57:08 localhost pppd[7236]: By default the remote system is required to authenticate itself
Jul 17 19:57:08 localhost pppd[7236]: (because this system has a default route to the internet)
Jul 17 19:57:08 localhost pppd[7236]: but I couldn't find any suitable secret (password) for it to use to do so.
Jul 17 19:57:08 localhost pppd[7236]: (None of the available passwords would let it use an IP address.)

куда ему надо прописать логин и пароль?
Back to top
View user's profile Send private message
ba
l33t
l33t


Joined: 25 May 2003
Posts: 804

PostPosted: Thu Jul 17, 2008 4:19 pm    Post subject: Reply with quote

WebXDev wrote:
куда ему надо прописать логин и пароль?

в /etc/ppp/{pap,chap}-secrets в зависимости от метода аутентификации, у тебя скорее всего pap

в первом посте у тебя есть вариант подъема через /etc/conf.d/net, там у тебя включен дебаг, попробуй поднять его тем способом и скнь логи
Back to top
View user's profile Send private message
ArtSh
Apprentice
Apprentice


Joined: 05 Aug 2006
Posts: 178
Location: Казань, Россия

PostPosted: Thu Jul 17, 2008 4:22 pm    Post subject: Reply with quote

Судя по всему ошибка подключения через Bluetooth. Вот мой конфиг

Code:
# cat /etc/bluetooth/rfcomm.conf
#
# RFCOMM configuration file.
#

rfcomm0 {
        # Automatically bind the device at startup
        bind yes;
        #bind no;

        # Bluetooth address of the device
        #device 11:22:33:44:55:66;
        device хх:хх:хх:хх:хх:хх;

        # RFCOMM channel for the connection
        channel 1;

        # Description of the connection
        comment "Example Bluetooth device";
}

# cat /etc/bluetooth/hcid.conf
#                                           
# HCI daemon configuration file.             
#                                           

# HCId options
options {
        # Automatically initialize new devices
        autoinit yes;

        # Security Manager mode
        #   none - Security manager disabled
        #   auto - Use local PIN for incoming connections
        #   user - Always ask user for a PIN
        #
        security user;

        # Pairing mode
        #   none  - Pairing disabled
        #   multi - Allow pairing with already paired devices
        #   once  - Pair once and deny successive attempts
        pairing multi;

        # Default PIN code for incoming connections
        passkey "pin-код";
}

# Default settings for HCI devices
device {
        # Local device name
        #   %d - device id
        #   %h - host name
        name "BlueZ (%d)";

        # Local device class
        class 0x000100;

        # Default packet type
        #pkt_type DH1,DM1,HV1;

        # Inquiry and Page scan
        iscan enable; pscan enable;

        # Default link mode
        #   none   - no specific policy
        #   accept - always accept incoming connections
        #   master - become master on incoming connections,
        #            deny role switch on outgoing connections
        lm accept;

        # Default link policy
        #   none    - no specific policy
        #   rswitch - allow role switch
        #   hold    - allow hold mode
        #   sniff   - allow sniff mode
        #   park    - allow park mode
        lp rswitch,hold,sniff,park;
}



В dmesg должно быть что-то типа

Code:
Jul 17 15:51:51 P1localhost hcid[7489]: link_key_request (sba=xx:xx:xx:xx:xx:xx, dba=yy:yy:yy:yy:yy:yy)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (BUSY)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (ERROR)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (NO ANSWER)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (NO CARRIER)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (NO DIALTONE)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (Invalid Login)
Jul 17 15:51:52 P1localhost chat[28143]: abort on (Login incorrect)
Jul 17 15:51:52 P1localhost chat[28143]: timeout set to 5 seconds
Jul 17 15:51:52 P1localhost chat[28143]: send (ATZ^M)
Jul 17 15:51:52 P1localhost chat[28143]: expect (OK)
Jul 17 15:51:52 P1localhost chat[28143]: ATZ^M^M
Jul 17 15:51:52 P1localhost chat[28143]: OK
Jul 17 15:51:52 P1localhost chat[28143]:  -- got it
Jul 17 15:51:52 P1localhost chat[28143]: send (AT+CGDCONT=1,"IP","internet.beeline.ru"^M)
Jul 17 15:51:52 P1localhost chat[28143]: timeout set to 60 seconds
Jul 17 15:51:52 P1localhost chat[28143]: expect (OK)
Jul 17 15:51:52 P1localhost chat[28143]: ^M
Jul 17 15:51:52 P1localhost chat[28143]: AT+CGDCONT=1,"IP","internet.beeline.ru"^M^M
Jul 17 15:51:52 P1localhost chat[28143]: OK
Jul 17 15:51:52 P1localhost chat[28143]:  -- got it
Jul 17 15:51:52 P1localhost chat[28143]: send (ATDT*99***1#^M)
Jul 17 15:51:52 P1localhost chat[28143]: expect (CONNECT)
Jul 17 15:51:52 P1localhost chat[28143]: ^M
Jul 17 15:51:54 P1localhost chat[28143]: ATDT*99***1#^M^M
Jul 17 15:51:54 P1localhost chat[28143]: CONNECT
Jul 17 15:51:54 P1localhost chat[28143]:  -- got it
Jul 17 15:51:54 P1localhost chat[28143]: send (^M)
Jul 17 15:51:54 P1localhost chat[28143]: timeout set to 5 seconds
Jul 17 15:51:54 P1localhost chat[28143]: expect (~)
Jul 17 15:51:54 P1localhost chat[28143]: ^M
Jul 17 15:51:54 P1localhost chat[28143]: ~
Jul 17 15:51:54 P1localhost chat[28143]:  -- got it
Jul 17 15:51:54 P1localhost chat[28143]: send (^M)
Jul 17 15:51:54 P1localhost pppd[11584]: Serial connection established.
Jul 17 15:51:54 P1localhost pppd[11584]: Using interface ppp0
Jul 17 15:51:54 P1localhost pppd[11584]: Connect: ppp0 <--> /dev/rfcomm0
Jul 17 15:51:57 P1localhost pppd[11584]: PAP authentication succeeded
Jul 17 15:51:58 P1localhost pppd[11584]: local  IP address 10.210.121.71
Jul 17 15:51:58 P1localhost pppd[11584]: remote IP address 10.6.6.6
Jul 17 15:51:58 P1localhost pppd[11584]: primary   DNS address 217.118.66.243


P.S. Ещё может быть, не те опции pppd. Для отладки, попробуйте убрать все опции pppd и добавляйте их по одной. У меня например так: pppd_ppp0="usepeerdns defaultroute modem crtscts usehostname noipdefault"
Back to top
View user's profile Send private message
WebXDev
n00b
n00b


Joined: 15 May 2007
Posts: 54

PostPosted: Thu Jul 17, 2008 4:33 pm    Post subject: Reply with quote

Заработало!!!!

На этом форуме я нашёл конфиг:
Quote:
$ cat /etc/ppp/options
user beeline

defaultroute # стандартные роутинг
usepeerdns
crtscts # аппаратный контроль передачи данных
lock
noauth # не нужна аутентификация на сервере
local
persist
lcp-echo-failure 4 # таймауты для того чтоб уменьшить потери
lcp-echo-interval 65535 # уменьшаем потери
modem
mru 1500
nopcomp
novjccomp
nobsdcomp
nodeflate
noaccomp
ipcp-accept-local # разрешить серверу выдавать клиенту ip
ipcp-accept-remote # разрешить серверу сообщать свой ip
noipdefault # ip адрес выдаёться сервером

# пассивный режим для того чтобы модем устанавливал соединение до того как
# получит нормальных LCP ответ.
passive
#modem -detach
#nomagic

# отменяем сжатие
novj

#noccp

lcp-max-configure 100
receive-all

и после него всё отлично заработало...

Спасибо всем откликнувшимся!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum