LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2004, 08:11 AM   #1
psdan
LQ Newbie
 
Registered: Aug 2004
Distribution: Redhat 8.0
Posts: 6

Rep: Reputation: 0
Question Starting Modem from console


Hi all
I want to be able to start my modem from the console, does Kppp create a script that I can use to do this? If not can someone point me in the right direction.

Thanx
psdan
 
Old 08-18-2004, 09:16 AM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Try
# ifup-ppp0
 
Old 08-20-2004, 06:20 AM   #3
psdan
LQ Newbie
 
Registered: Aug 2004
Distribution: Redhat 8.0
Posts: 6

Original Poster
Rep: Reputation: 0
Hi pingu

That didn't work, I ran the command (from a console within the KDE GUI, does this make a difference??)and this is what I got

[root@LinuxBox root]# ifup -ppp0
/sbin/ifup: configuration for -ppp0 not found
Usage: ifup <device name>

I tried #ifup /dev/modem which is what the modem is identified as under kppp but got the a similar result.

Any other suggestions

Thanks
psdan
 
Old 08-20-2004, 06:36 AM   #4
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Aha, so your connection isn't setup yet.
I don't know how to write the file(s) needed, maybe someone else here knows?

But you should have a tool for this, something like netconfig or use a GUI-tool for internet-connection.
That should create the file ifup-ppp0 (you might have to run it as root)
 
Old 08-20-2004, 10:55 AM   #5
guzzi
Member
 
Registered: Jun 2004
Location: Lawrence, KS
Distribution: Slackware
Posts: 301

Rep: Reputation: 35
command line modem

You may want to look in /etc/sysconfig/network-scripts

while in that directory enter ./ifup ppp0

after a slight pause your dialer should start, if it worked from a GUI in the first place.

To stop the connection and while in the same directory enter ./ifdown ppp0

While doing all this you may get some info on whats happening by opening a terminal and running as root
tail -f /var/log/messages
 
Old 08-21-2004, 08:08 AM   #6
psdan
LQ Newbie
 
Registered: Aug 2004
Distribution: Redhat 8.0
Posts: 6

Original Poster
Rep: Reputation: 0
Guzzi, I did what you suggested and got the following.

[root@LinuxBox network-scripts]# ./ifup ppp0
./ifup: configuration for ppp0 not found.
Usage: ifup <device name>

The modem is a Conexant PCI modem and it does work using the Kppp dialer under KDE, but I want to be able to start the modem from my Windows PC using an SSH client (cos my other half is not very computer literate and does not have the patience to learn how to use Linux), hence the reason for wanting to start the modem from command line.

I got the following from a PC World minibook that came with Redhat 7.1 and it works.

I have put the following in the /etc/ppp/options file

name myusername
-detach
modem
crtscts
noipdefault
defaultroute
asyncmap 0
mtu 1500
mru 1500
netmask 255.255.255.0
_______________________

Created this script file /etc/ppp/dialin

#!/bin/sh
/usr/sbin/chat -v \
TIMEOUT 15 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n' \
'' \rATZ 'OK-+++\c-OK' ATH0 \
TIMEOUT 30 \
OK ATDTmyISPnumber \
CONNECT '' \
TIMEOUT 60
________________________

Created this script file /etc/ppp/cppp

#!/bin/sh
exec /usr/sbin/pppd -d /dev/modem 57600 connect \
/etc/ppp/dialin
________________________

I ran /etc/ppp/cppp & from the console command line, the modem dialed in but kept disconnecting.

I entered my username and password into the /etc/ppp/pap-secrets file (seems like a bit of a security risk but for the moment I just want to get this to work)

Ran /etc/ppp/cppp & again and connected successfully "hooray".

The problem I have now is, I don't know how to get the modem to disconnect!

I am doing a bit of reading from a couple of books on Linux 6.0 but a lot of the files they refer to don't seem to exist on Redhat 8.0

Any ideas???

Thanx for your help
psdan
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting an application on X by console tiagomadeira Programming 1 01-09-2005 08:20 AM
Starting an application on X by console tiagomadeira Linux - Software 4 01-09-2005 07:53 AM
Installing Fujitsu FDX310 modem on Mandrake 10.0, Console newbie Ultwe Linux - Newbie 3 11-18-2004 04:59 PM
Starting a program to a different console b52.net Linux - General 2 04-28-2004 02:28 AM
Starting X from a remote console gbg Linux - General 12 12-03-2003 02:57 AM


All times are GMT -5. The time now is 07:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration