LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Starting Modem from console (https://www.linuxquestions.org/questions/linux-newbie-8/starting-modem-from-console-219183/)

psdan 08-18-2004 07:11 AM

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

pingu 08-18-2004 08:16 AM

Try
# ifup-ppp0

psdan 08-20-2004 05:20 AM

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

pingu 08-20-2004 05:36 AM

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)

guzzi 08-20-2004 09:55 AM

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

psdan 08-21-2004 07:08 AM

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


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