Solved

Modem initilization!

Posted on 1998-08-28
6
333 Views
Last Modified: 2013-12-05

 where is the modem initilization file in RedHat and Slackware? I have a 56k Flex modem on ttyS1 and I need to give him a initilization string before it dials the Internet ...
 
0
Comment
Question by:elvaaa
6 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1637898
Modem intialization is done by the dialing program.
Which one are you using?
0
 

Expert Comment

by:jokan
ID: 1637899
In Redhat try

/etc/sysconfig/network-scripts/ifcfg-ppp0
0
 
LVL 1

Expert Comment

by:pestilence
ID: 1637900
If you use minicom (just type minicom as root), in the main screen type your initialitazion strings and then fire up a connection.

0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Expert Comment

by:graham_leach
ID: 1637901
This depends upon how you are dialing the internet.

Using MINICOM:  Type AT XX XX XX

Where XX is valid at commands.  See www.modem.com for a complete list of AT command switches and syntax.

Using PPP:

This is a little more complicated.  Most people use a program called CHAT to actually get the interface (MODEM) working before pppd is invoked.  CHAT uses a dialog (prompt/response) model to control the flow of execution.  Here is a sample CHAT script that programs the modem and then dials an ISP.  Note that the CHAT script is invoked from the call to pppd on the command line or (more usually) from a file in /usr/sbin called ppp-on or ppp-up

NOTE:  The line which has AT is where you would place your own initialization strings.  Remember to place all extended characters (%,$) in a line that has quotes (') around it.

CHAT:

#!/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                      ATDT$TELEPHONE                    \
        CONNECT         ''                                                    \
        ogin:--ogin:         $ACCOUNT                                   \
        assword:            $PASSWORD

0
 

Author Comment

by:elvaaa
ID: 1637902

pestilence,

I do not have minicom installed. I want my init string to go in modem before the ppp-on* script in Slackware dials internet ...
 
 
0
 
LVL 1

Accepted Solution

by:
fmismetti earned 20 total points
ID: 1637903
Usually, the ppp-on script calls a script named
/etc/ppp-on-dialer. Slackware does this way, at least (look in the contents of your ppp-on script to be sure)

In ppp-on-dialer you will see:
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              ATDT$TELEPHONE                  \
        CONNECT         ''                              \
        ogin:--ogin:    $ACCOUNT                        \
        assword:        $PASSWORD

Change the line:

        ''              \rAT                            \

To

        ''              '\rAT XX XX XX XX XX'           \

Where XX are your modem commands. Then run ppp-on. You can execute "tail -f /var/adm/messages" to see the dialing process.

Hope it helps you.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now