Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm a newbie and I'm trying to set up modem sharing so I can use virtual
ports on other machinesI 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 deviceb) 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/ttyS1In 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/inetdkill -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
OKati1
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 openI have entered everything else as suggested by the article
Any idea?Thanks
Marvin

![]() |
![]() |
![]() |

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