SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Pastimes : Linux OS.: Technical questions

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Charles Hughes who wrote (153)1/14/1999 8:10:00 AM
From: E. Charters   of 484
 
Some useful stuff.

You shouldn't need to set up your modem. Most will recognize the Hayes command set which chat and DIP scripts use. All you need to do is send the appropriate sequences in your modem in the script to set it. If resetting is done in the script then you may have to comment that out. For a USR the command AT&F1 will set it to factory settings. Then the command ATZ0 (0 is #0) will get its attention. Then ATDT followed by the dial up string (phone number and return) is all you need. Take a look a this script. ( If you read a manual or HOWTO and set up your system for loopback (dial up network access) with netconfig by just typing netconfig at the prompt and following directions, everything should work.)

You may want to put the modem init string into this where it says. But if you have a USR 28.8 T&F1 will do it.

The following is a dip script. It is put in /sbin and must be run by root. So if you are under a user login go "su root" before you run it.
then login back to user. the command to run it is "dip -v thefilename" Read it carefully and change what it says to change. In general the log in prompts, phone number, username and modem initialization string is all you need to change. Leave 57,600 as the speed even for a 28.8 modem.. or increase it to 115,600 if you can. Anything with a # is a comment, else it is a command. Read them carefully and ask specific questions. Cut and paste the file, slap it in /sbin and edit it to taste (I use pico)-->

# this file will start a ppp session. DIP should be in /sbin
# go to /sbin and do this: "dip -v thisfile.dip" name your file
# name of your ISP and .dip then come back with the errors and
# go from there. Replace the stuff where it says and leave the
# hash marks in #> stuff needs replacing --> that is your stuff<--
# other things may need modification, to find out your settings
# try running dip -tv with no script, this will give you the
# stuff your ISP sends you, such as login or password. You
# have to put in the modem commands and the other commands by
# hand.
# If you need help with your resolv.conf file and /etc/hosts
# file it is real simple. Linux Secrets is a good book on basics.
#
# ppp.dip Dialup IP connection support program.
# This file (should show) shows how to use the DIP
# scripting commands to establish a link to a
# static or dynamic IP PPP server.
#

main:

# You should set other pppd options in /etc/ppp/options.
# Set the desired serial port and speed.
# Our modem port is /dev/modem.
# "cua2" may need changing depending on which port your modem is
# under

port cua2

#speed 57600
# Go higher if your modem supports it.

speed 57600

# Reset the modem and terminal line.
# This seems to cause trouble for some people! (you may need to #remove it

reset

# This is our local IP address. That should only be used for static
# IP.
# get $local xxx.xxx.xxx.xxx
# That should work on both static and dynamic IP. PPP should know
# how to get the local and remote IP address.

get $local 0.0.0.0

#following XX's should be the actual address of your ISP

get $remote XXX.XXX.XX.XX

# Note! "Standard" pre-defined "errlevel" values:
# 0 - OK
# 1 - CONNECT
# 2 - ERROR
#
# You can change those grep'ping for "addchat()" in *.c...

redial:

# Prepare for dialing.
# Put your own modem initialization string here. (this will do USR)

send ATZ\r
wait OK 1

# puts factory settings on USR

send AT&F1\r
wait OK 1
if $errlvl != 0 goto modem_trouble

# Here is the PPP server dial-up number.

# numbs should be the phone number of your ISP

send ATDT555-5555\r

if $errlvl != 0 goto modem_trouble
wait BUSY 14
if $errlvl == 0 goto redial

wait CONNECT 60
if $errlvl != 0 goto redial

# We are connected. Login to the system.

login:
sleep 2

# Wait for login prompt "sername" and "ogin" could be different.
# some places "login" is "passwd"

wait sername: 20
if $errlvl != 0 goto login_error

# Send the login ID.

send yourname\n

# you do know your username don't you?

# Wait for passwd prompt

wait assword: 20
if $errlvl != 0 goto password_error

# Send the password.
# This is for SecureID.
#securidfixed xxxx
#securid

# your password replaces password here

send password\n
loggedin:

# We are now logged in.
# wait enable 15
# if $errlvl != 0 goto prompt_error
# Say hello and fire up!

#wait annex 15 'any other choices in your usual login?
#send 2\n

done:
print CONNECTED to the remote PPP server
sleep 3
print $remote ----> $local

mode PPP

goto exit
prompt_error:
print TIME-OUT waiting for the PPP server to fire up...
goto error
login_error:
print Trouble waiting for the Login: prompt...
goto error
password_error:
print Trouble waiting for the Password: prompt...
goto error
modem_trouble:
print Trouble ocurred with the modem...
error:
print CONNECT FAILED to the PPP server.
quit
exit:
reset
exit
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext