Modem Sharing mini−HOWTO

It is assumed that the server is a Linux system with either: a modem attached to a /dev/ttySx device
• 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 daemon in

/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 daemon 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.
The existence of the modem daemon 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

Get pdf Modem Sharing mini−HOWTO

Related Searches: , , , ,

Comments

Leave a Reply