The OpenNET Project / Index page

[ новости /+++ | форум | wiki | теги | ]

форумы  помощь  поиск  регистрация  майллист  ВХОД  слежка  RSS
"ppp и mgetty"
Вариант для распечатки  
Пред. тема | След. тема 
Форумы OpenNET: Виртуальная конференция (Public)
Изначальное сообщение [Проследить за развитием треда]

"ppp и mgetty"  
Сообщение от SubGun email(??) on 09-Июн-06, 18:12 
FreeBSD 5.4
mgetty+sendfax(autoPPP) 1.1.31 из портов

#############/usr/local/etc/mgetty+sendfax/login.config##############
/AutoPPP/ -     a_ppp   /usr/sbin/pppd auth -chap +pap ms-dns 195.14.56.16 ms-dns 195.14.50.1 login debug
*       -       -       /usr/bin/login @

#############/usr/local/etc/mgetty+sendfax/mgetty.config##############
debug 4
fax-id +7 095 933 0952
speed 38400
direct NO
blocking NO
port-owner uucp
port-group uucp
port-mode 0660
toggle-dtr YES
toggle-dtr-waittime 500
data-only NO
fax-only NO
#modem-type auto
modem-type auto
#init-chat "" ATZ OK AT&H1&I2&R1S7=90 OK
init-chat "" ATZ OK ATS9=015 OK
modem-check-time 3600
rings 1
answer-chat "" ATS115=3A CONNECT \c \r
#answer-chat "" ATS0=1 CONNECT \c
answer-chat-timeout 60
autobauding YES
ringback NO
ringback-time 30
ignore-carrier true
issue-file /etc/issue
prompt-waittime 500
login-time 240
diskspace 1024
notify faxadmin
fax-owner uucp
fax-group uucp
fax-mode 0660


#############/etc/ppp/ppp.conf##############
default:
set log Phase Chat LCP IPCP CCP tun command
ident user-ppp VERSION (built COMPILATIONDATE)
set device /dev/cuaa1
set speed 115200
set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
           \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
set timeout 180                        # 3 minute idle timer (the default)
enable dns                             # request DNS info (for resolv.conf)

papchap:
set phone PHONE_NUM
set authname USERNAME
set authkey PASSWORD

set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR


Факсы принимаются нормально, а при попытке достучаться по dial-up, получаю вот такой мусор в /var/log/mgetty.cuaa0
06/09 17:57:19 aa0  mgetty: experimental test release 1.1.31-Jul24
06/09 17:57:19 aa0  check for lockfiles
06/09 17:57:19 aa0  locking the line
06/09 17:57:19 aa0  lowering DTR to reset Modem
06/09 17:57:20 aa0  send: ATZ[0d]
06/09 17:57:20 aa0  waiting for ``OK'' ** found **
06/09 17:57:20 aa0  send: ATS9=015[0d]
06/09 17:57:20 aa0  waiting for ``OK'' ** found **
06/09 17:57:20 aa0  mdm_send: 'ATI'
06/09 17:57:20 aa0  Generic Rockwell modem (56000)
06/09 17:57:20 aa0  mdm_send: 'ATI3'
06/09 17:57:20 aa0  mdm_send: 'ATI4'
06/09 17:57:20 aa0  additional info: 'a007840284C6002F'
06/09 17:57:20 aa0  modem quirks: 0004
06/09 17:57:20 aa0  mdm_send: 'AT+FCLASS=2' -> OK
06/09 17:57:21 aa0  mdm_send: 'AT+FCLASS=0' -> OK
06/09 17:57:21 aa0  mdm_send: 'AT+FAA=1;+FCR=1' -> OK
06/09 17:57:21 aa0  mdm_send: 'AT+FBOR=0' -> OK
06/09 17:57:21 aa0  mdm_send: 'AT+FLID="+7 095 933 0952"' -> OK
06/09 17:57:21 aa0  mdm_send: 'AT+FDCC=1,5,0,2,0,0,0,0' -> OK
06/09 17:57:21 aa0  waiting...
06/09 18:00:55 aa0  wfr: waiting for ``RING''
06/09 18:00:55 aa0  send: ATS115=3A[0d]
06/09 18:00:55 aa0  waiting for ``CONNECT'' ** found **
06/09 18:01:20 aa0  send:
06/09 18:01:20 aa0  waiting for ``_'' ** found **
06/09 18:01:20 aa0  autobauding: switch to 33600 bps
06/09 18:01:20 aa0  autobauding: cannot parse 'CONNECT 33600/V34/LAPM/V42BIS/33600:TX/33600:RX': No such file or directory
06/09 18:01:20 aa0  warning: carrier signal is ignored
06/09 18:01:22 ##### data dev=cuaa0, pid=72406, caller='none', conn='33600/V34/LAPM/V42BIS/33600:TX/33600:RX', name='', cmd='/usr/sbin/pppd', user='/AutoPPP/'
--
06/09 18:01:22 aa0  mgetty: experimental test release 1.1.31-Jul24
06/09 18:01:22 aa0  check for lockfiles
06/09 18:01:22 aa0  locking the line
06/09 18:01:23 aa0  lowering DTR to reset Modem
06/09 18:01:23 aa0  send: ATZ[0d]
06/09 18:01:23 aa0  waiting for ``OK''
06/09 18:01:24 aa0  found action string: ``NO CARRIER''
06/09 18:01:24 aa0  init chat failed, exiting...: Invalid argument
06/09 18:01:24 ##### failed in mg_init_data, dev=cuaa0, pid=76020

Коннект дохнет. Процесс pppd создается, но не убивается, а в messages я вижу только:
Jun  9 18:10:46 core pppd[71730]: Connect script failed
Jun  9 18:10:46 core pppd[72398]: Connect script failed
Jun  9 18:10:46 core pppd[71845]: Connect script failed


Очень прошу помощи.

Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

 Оглавление

  • ppp и mgetty, Skif, 12:23 , 11-Июн-06, (1)  
    • ppp и mgetty, SubGun, 23:01 , 12-Июн-06, (2)  
      • ppp и mgetty, Skif, 10:13 , 13-Июн-06, (3)  
        • ppp и mgetty, SubGun, 14:52 , 13-Июн-06, (4)  
          • ppp и mgetty, Skif, 16:37 , 13-Июн-06, (5)  
            • ppp и mgetty, SubGun, 17:33 , 15-Июн-06, (6)  

Сообщения по теме [Сортировка по времени, UBB]


1. "ppp и mgetty"  
Сообщение от Skif (??) on 11-Июн-06, 12:23 
используйте mgetty+pppd
Доля этого в /etc/ttys нужно добавить модемы:
[/etc/ttys]
cuad0   "/usr/local/sbin/mgetty"        unknown on insecure
cuad1   "/usr/local/sbin/mgetty"        unknown on insecure
cuad4  "/usr/local/sbin/mgetty"        unknown on insecure
cuad5  "/usr/local/sbin/mgetty"        unknown on insecure

и прописать option файле, что-то типа:
[/etc/ppp/options]
crtscts
modem
auth
noipx
debug
proxyarp
ms-dns 10.0.38.224
require-pap
refuse-chap
asyncmap 0


Особенно если вы вызываете pppd
>#############/usr/local/etc/mgetty+sendfax/login.config##############
>/AutoPPP/ -     a_ppp   /usr/sbin/pppd auth -chap +pap ms-dns 195.14.56.16 ms-dns 195.14.50.1 login debug
>*       -       -       /usr/bin/login @

хотт я и здесь я бы заменил на:

[/usr/local/etc/mgetty+sendfax/login.config]
*       -       a_ppp   /usr/sbin/pppd
либо
/AutoPPP/ -    a_ppp   /usr/sbin/pppd auth -chap +pap login debug

и mgetty.config
[/usr/local/etc/mgetty+sendfax/mgetty.config]
debug 4
direct NO
blocking NO
port-mode 0660
toggle-dtr YES
toggle-dtr-waittime 500
data-only YES
fax-only NO
modem-type auto
modem-check-time 300
rings 1
answer-chat "" ATA CONNECT \c \r
answer-chat-timeout 80
autobauding NO
ringback NO
ringback-time 30
ignore-carrier false
issue-file /etc/issue
prompt-waittime 500
login-prompt login:
login-time 240
diskspace 1024
notify admin
fax-owner uucp
fax-group modem
fax-mode 0660

Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

2. "ppp и mgetty"  
Сообщение от SubGun email(??) on 12-Июн-06, 23:01 
Проблема только в установке связи с модемом, факсы же принимаются нормально, а вот модемом дозваниваюсь и коннект дохнет. В /etc/ttys все модемы присутствуют.
Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

3. "ppp и mgetty"  
Сообщение от Skif (ok) on 13-Июн-06, 10:13 
>Проблема только в установке связи с модемом, факсы же принимаются нормально, а
>вот модемом дозваниваюсь и коннект дохнет. В /etc/ttys все модемы присутствуют.
>


Еще раз внимательно прочитайте что написали вы и что написал я. Вы пытаетесь оконфигурить ppp.conf вызывая при этом pppd. Для него разумнее описать options файл, где передать все параметры. ppp.conf востребован именно для user-ppp
читаем
[man ppp]
FILES
     ppp refers to four files: ppp.conf, ppp.linkup, ppp.linkdown and
     ppp.secret.  These files are placed in the /etc/ppp directory.

     /etc/ppp/ppp.conf
         System default configuration file.

     /etc/ppp/ppp.secret
         An authorisation file for each system.

     /etc/ppp/ppp.linkup
         A file to check when ppp establishes a network level connection.

     /etc/ppp/ppp.linkdown
         A file to check when ppp closes a network level connection.
.....................................................................

и сравниваем


[man pppd]
..............
FILES
       /var/run/pppn.pid (BSD or Linux), /etc/ppp/pppn.pid (others)
              Process-ID for pppd process on ppp interface unit n.

       /etc/ppp/pap-secrets
              Usernames, passwords and IP addresses  for  PAP  authentication.
              This  file  should be owned by root and not readable or writable
              by any other user.  Pppd will log a warning if this is  not  the
              case.

       /etc/ppp/chap-secrets
              Names, secrets and IP addresses for CHAP authentication.  As for
              /etc/ppp/pap-secrets, this file should be owned by root and  not
              readable or writable by any other user.  Pppd will log a warning
              if this is not the case.

       /etc/ppp/options
              System default  options  for  pppd,  read  before  user  default
              options or command-line options.

       ~/.ppprc
              User default options, read before /etc/ppp/options.ttyname.

       /etc/ppp/options.ttyname
              System  default  options  for  the  serial port being used, read
              after ~/.ppprc.  In forming the ttyname part of  this  filename,
              an  initial  /dev/  is stripped from the port name (if present),
              and any slashes in the remaining part are converted to dots.

       /etc/ppp/peers
              A directory containing options files which  may  contain  privi-
              leged  options,  even  if  pppd was invoked by a user other than
              root.  The system administrator can create options files in this
              directory  to  permit  non-privileged  users to dial out without
              requiring the peer to authenticate, but only to certain  trusted
              peers.

       /etc/ppp/ppp.deny
              Lists  users who may not use the system password PAP authentica-
              tion.

       /etc/ppp/ppp.shells
              Lists user shells which are approved  for  system  password  PAP
              authentication logins.

       /usr/share/examples/pppd/
              Sample pppd configuration files.

.....................................................................
Вы где-то в man pppd увидели ppp.conf ? Я нет.

Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

4. "ppp и mgetty"  
Сообщение от SubGun email(??) on 13-Июн-06, 14:52 
Прошу прощения, я действительно загнал. У меня просто есть и то, и другое, поэтому я по ошибке и привел его.
Вот options:

/dev/cuaa1
115200
modem
crtscts
asyncmap 0
defaultroute
noipdefault
persist
holdoff 5
mtu 250
mru 250

Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

5. "ppp и mgetty"  
Сообщение от Skif (ok) on 13-Июн-06, 16:37 
>Прошу прощения, я действительно загнал. У меня просто есть и то, и
>другое, поэтому я по ошибке и привел его.
>Вот options:
>
>/dev/cuaa1
^^^^^^^^^^^^ уберите, это должно быть прописанно в ttys либо в options.ttyname
>115200
Это тоже лишнее
>modem
>crtscts
>asyncmap 0
>defaultroute
>noipdefault
>persist
>holdoff 5
>mtu 250
>mru 250

Внесите изменения в mgetty.config, как я указывал выше.

Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

6. "ppp и mgetty"  
Сообщение от SubGun email(??) on 15-Июн-06, 17:33 
Да, действительно, заработало. Спасибо.
Правка | Высказать мнение | Ответить | Cообщить модератору | Наверх

Архив | Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Оцените тред (1=ужас, 5=супер)? [ 1 | 2 | 3 | 4 | 5 ] [Рекомендовать для помещения в FAQ]




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру