Solved

Modem initilization!

Posted on 1998-08-28
6
339 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 

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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

690 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