Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tlug: Re: ISDN problems



Chris wrote:

On 8 Nov 1998, Totoro wrote:

>> You _did_ rebuild the kernel with IDSN support (in the kernel or via a
>> module), didn't you?

>He should only need that if it is an internal unit based on that Siemens
>chip.

>What does the connect script look like?  I'll bet that it's trying to use
>a bad init sequence.

>-- Chris

Right now I'm using netcfg.  No problems using the Sportster with /dev/modem 
linked
to /dev/cua0.  This obviously bypasses the connect script, anyway, because the
connect script you see below (/etc/ppp/connect) has the ISDN connect telephone 
number, and I just connected using the analog number, which ends in 8211.  
So I'm not sure if this script is even getting called.  Are you familiar with 
Red Hat's netcfg?  Or do you see problems with this script?  (I suppose the
modem init string does not apply to the TA, but I've no idea what to replace
it with.)

TIA,

Lance

MODEM_INIT="ATZ&C1&D2"

# The phone number to dial
PHONE_NUMBER="5489-8200"

# The chat sequence to recognize that the remote system
# is asking for your user name.
USER_CHAT_SEQ="ogin:--ogin:--ogin:--ogin:--ogin:--ogin:--ogin:"

# The string to send in response to the request for your user name.
USER_NAME="lance"

# The chat sequence to recongnize that the remote system
# is asking for your password.
PASSWD_CHAT_SEQ="word:"

# The string to send in response to the request for your password.
PASSWORD="deleted"

# The prompt the remote system will give once you are logged in
# If you do not define this then the script will assume that
# there is no command to be issued to start up the remote protocol.
# PROMPT="annex:"
# The command to issue to start up the remote protocol
# PROTOCOL_START="ppp"

# The string to wait for to see that the protocol on the remote
# end started OK. If this is empty then no check will be performed.
# START_ACK="Switching to PPP."

# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t connect "$*"
}

# Initialize the modem. Usually this just resets it.
message "Initializing Modem"
/usr/sbin/chat -v TIMEOUT 5 "" $MODEM_INIT TIMEOUT 45 OK ""
if [ $? != 0 ]; then
    message "Failed to initialize modem"
    exit 1
fi

>/var/log/connect

# Dial the remote system.

message "Dialing $PHONE_NUMBER"
/usr/sbin/chat -v -r /var/log/connect \
        REPORT CONNECT \
        TIMEOUT 45 \
        ABORT "NO CARRIER" \
        ABORT BUSY \
        ABORT "NO DIALTONE" \
        ABORT ERROR \
        "" ATDT$PHONE_NUMBER \
        CONNECT ""
case $? in
   0) message "$(cat /var/log/connect)";;
   1) message "Chat Error"; exit 1;;
   2) message "Chat Script Error"; exit 1;;
   3) message "Chat Timeout"; exit 1;;
   4) message "No Carrier"; exit 1;;
   5) message "Busy"; exit 1;;
   6) message "No DialTone"; exit 1;;
   7) message "Modem Error"; exit 1;;
   *)
esac

# We're connected try to log in.
message "Loggin in"
/usr/sbin/chat -v \
        TIMEOUT 5 \
        $USER_CHAT_SEQ \\q$USER_NAME \
        TIMEOUT 45 \
        $PASSWD_CHAT_SEQ $PASSWORD
if [ $? != 0 ]; then
    message "Failed to log in"
    exit 1
fi


# We logged in, try to start up the protocol (provided that the
# user has specified how to do this)

if [ $PROMPT ]; then
    message "Starting Comm Protocol"
    /usr/sbin/chat -v TIMEOUT 15 $PROMPT $PROTOCOL_START
    if [ $? != 0 ]; then
        message "Prompt not received"
        exit 1
    fi
fi

if [ $START_ACK ]; then
    /usr/sbin/chat -v  TIMEOUT 15 $START_ACK ""
    if [ $? != 0 ]; then
        message "Failed to start Protocol"
        exit 1
    fi
fi

# Success!
message "Protocol started"


----------------------------------------------------------------
Next Nomikai: 20 November, 19:30   Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: 12 December, 12:30 HSBC Securities Office
----------------------------------------------------------------
more info: http://tlug.linux.or.jp Sponsors: PHT, HSBC Securities


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links