The OpenNET Project / Index page

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

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

"Помогите чайнику подключиться к и-нету..."
Сообщение от Евгений emailИскать по авторуВ закладки on 01-Апр-01, 20:13  (MSK)
Короче написал скрипт для подключения вот такой:
ABORT           "ERROR"
ABORT           "NO DIALTONE"
TIMEOUT         5
""              "AT"
"OK"-"+++"-""   "AT"
"OK"            "ATZ"
"OK"            "ATS7=120"
ABORT           "BUSY"
ABORT           "NO ANSWER"
ABORT           "NO CARRIER"
ABORT           "Login incorrect"
"OK"            "ATDP5551234"
TIMEOUT         125
"CONNECT"       "\c"
TIMEOUT         30
"ogin:"         "igor"
"assword:"      "1234567"
"}"              "\c"
Сохранил в /etc/ppp/script
Создал файл /etc/ppp/options
Записал туда: modem
              crtscts
              asyncmap 0
Запускаю:
pppd cuaa0 57600 lock connect 'chat -v -f /etc/ppp/script' defaultroute noipdefault debug nodetach
Пишет connect script failed, а если просто запускать chat -v -f /etc/ppp/script, то
выводит команду AT, ждёт некоторое время и завершается и вообще, я не знаю как модем конфигурировать, какие драйверы нужны, где их взять, т.к. я думаю просто модем в отрубе ?
  Рекомендовать в FAQ | Cообщить модератору | Наверх

 Оглавление

Индекс форумов | Темы | Пред. тема | След. тема
Сообщения по теме

1. "RE: Помогите чайнику подключиться к и-нету..."
Сообщение от martrix emailИскать по авторуВ закладки on 03-Апр-01, 05:46  (MSK)
если у тебя внешний hayes совместимый модем, то тогда никакие драйвера не нужны, только поддержка сети в ядре (TCP/IP,PPP)
а видимо ошибка у тебя в том, что при вызове pppd надо указывать имя устройства (например /dev/ttyS0)
для примера даю свои файлики
----------------------
ppp-on

#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=*****      # The telephone number for the connection
ACCOUNT=*******          # The account name for logon (as in 'George Burns')
PASSWORD=*****              # The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0        # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0       # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0   # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in.  Please use the absolute file name as the $PATH variable is not
# used on the connect option.  (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS0 19200 \
        asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
        noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
----------------------------------------
ppp-on-dialer
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec chat -v                                            \
        TIMEOUT         3                               \
        ABORT           '\nBUSY\r'                      \
        ABORT           '\nNO ANSWER\r'                 \
        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
        ''              \rAT                            \
        'OK-   \c-OK'   ATH0                            \
        TIMEOUT         30                              \
        OK              ATDp$TELEPHONE                  \
        CONNECT         ''                              \
        ogin:           card                            \
        ID:             $ACCOUNT                        \
        ssword:         $PASSWORD
--------------------------------------------------
и еще посмотри есть ли у тебя права на чтение/запись к устройству, на котором висит модем

  Рекомендовать в FAQ | Cообщить модератору | Наверх


Удалить

Индекс форумов | Темы | Пред. тема | След. тема
Пожалуйста, прежде чем написать сообщение, ознакомьтесь с данными рекомендациями.




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

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