Computing.Net > Forums > Linux > Setting up a Virtual modem Linux

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Setting up a Virtual modem Linux

Reply to Message Icon

Name: Marvin Titlow
Date: February 21, 2003 at 15:09:21 Pacific
OS: Linux
CPU/Ram: 2 Ghz/512
Comment:

I'm a newbie and I'm trying to set up modem sharing so I can use virtual
ports on other machines

I have tried to do this by using mini-HOWTO instructions by off the net by
using Perl script
which is as follows: My changes are at the bottom
______________________________________________________________
1. Introduction
This mini-HOWTO describes how to setup a Linux system in order to share a
modem attached to this system with other systems over a TCP/IP network.
2. The Server Side
It is assumed that the server is a Linux system with either:
a) a modem attached to a /dev/ttySx device

b) an 'isdn4linux'-emulated modem mapped to a /dev/ttyIx device

The easiest setup I can think of uses a five lines perl script to implement
a 'modem demon':

$ cat /usr/sbin/modemd

#!/usr/bin/perl
select((select(STDOUT), $| = 1)[$[]);
select((select(STDIN), $| = 1)[$[]);
exec 'cu -s 115200 -l /dev/ttyS1';
die '$0: Cant exec cu: $!\n';

The modem demon is started by the INETD process if a client connects to the
appropriate port as described below. The 'modemd simply connects the socket
handle with STDIN and STDOUT of the 'cu' command and lets 'cu' handle the
actual modem device. In case you don't have 'cu' on your system, please
install the 'UUCP' package, 'cu' is usually part of 'UUCP'.

The existence of the modem demon must be made known to the INETD process by
updating its configuration file, usually /etc/inetd.conf like:

#
# modem daemon
#
modem stream tcp nowait root /usr/sbin/tcpd /usr/sbin/modemd /dev/ttyS1

In order to make this work, an entry to '/etc/services' needs to be added
like:

modem 2006/tcp modemd

This associates a symbolic name with an explicit port, 2006 in the example.
The portnumber could be any number not already assigned to an existing
service. After these changes have been made, a signal must be sent to the
inetd process in order to let inetd re-read and process its configuration fi
le:

$ ps |grep inetd
194 ? S 0:00 /usr/sbin/inetd

kill -HUP 194


Now the server side is ready to accept requests from clients. The correct
function can be verified by:

$ telnet localhost modem

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

You are now connected to the modem. You can now issue 'AT' command in order
to verify the setup:

atz
atz
OK

ati1
ati1
Linux ISDN
OK

^]
telnet>quit
$

____________________________________________________________________________
_____________________________

I have noticed that I don't have inetd.conf, but I have xinetd.conf so I
have edited my file as follows:
#
# modem daemon
#
modem
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/tcpd
server = /usr/sbin/modemd
server = /dev/ttyS1
}

when I type $ ps |grep xinetd nothing happens
so I type $ ps afx |grep xinetd to get
1148 ? S 0:00 /usr/sbin/xinetd
so I type
$ kill -HUP 1148
but when I telnet the port is not open

I have entered everything else as suggested by the article
Any idea?

Thanks
Marvin



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Setting up a Virtual modem Linux

How to set up a site on my RH? www.computing.net/answers/linux/how-to-set-up-a-site-on-my-rh/23939.html

Setting up Linux with a cable modem www.computing.net/answers/linux/setting-up-linux-with-a-cable-modem/1493.html

Setting up a Linux Mail server www.computing.net/answers/linux/setting-up-a-linux-mail-server/14440.html