"Linux Gazette...making Linux just a little more fun!"


The Answer Guy


By James T. Dennis, answerguy@ssc.com
Starshine Technical Services, http://www.starshine.org/


(?)Multiplexing the Computer -- ISDN Modem Connection

From Todd on 29 Jul 1998

Is it possible to have more than one process accessing a single serial port simultaneously? I have a USR Courier I ISDN, and would like to use the analog B-channel for serving faxes using Mgetty+Sendfax while the data channel is engaged. The problem is that pppd locks the port and Mgetty times out while waiting on it. Is there a way around this?

Cheers,
Todd

(!)The short answer is: you can NOT do what you want from standard Unix/Linux. It would have to be via some special (and probably proprietary) protocols and drivers that would have to be supported by the Courier.
It's certainly possible for multiple Unix/Linux processes to concurrently access a file or device. It's just a bad idea for serial devices. That, indeed, is the reason why we mess with lock files. Without file locking our processes will blithely step all over one another, disrupting communications.
Let's think about this a bit. You have your ISDN device (If I recall correctly the Courier I is a combined NT1 and TA with analog modem/FAX support) connected to your PC via a single serial line.
When that line is carrying data, it's busy. In order for it to carry two distinct streams of data there would have to be some form of multiplexing going on. This multiplexing would have to involve some protocol. The device would have to have a method for encoding and interlacing data from these two sources --- and the system would have to have some way (some DRIVER) for de-multiplexing it (splitting the original two streams back out the single serial string).
I've never heard of a device that does this. Any that did would have to have drivers on the PC side --- a Unix/Linux driver of this sort would undoubtedly make the one serial port appear to be two (or more) tty devices. (That would allow it to work with any standard Unix/Linux utilities).
PPP and SLIP have the effect of multiplexing multiple connections over a serial line. Theoretically a smart enough ISDN device could have its own IP address assigned to it and insert its own TCP/IP packets over your PPP/SLIP link when that was active. I've never heard of such a device.
Bonding the two B channels using the MP (multi-link protocol) simply allows your two channels to act as on highspeed interface. However this requires that both B channels connect from your end to the same point at the other end of the connenction (usually the other B channel on the same physical device -- NT1 or NT2 at your ISP's end).
In addition the top speed of a standard PC serial line is 115200bps. The total bandwidth of your two B channels is 128Kbps. Any multiplexing would involve some overhead on this bandwidth. So the PC serial line becomes a bottleneck even when you're just bonding the two B channels.
Another approach would be to simply have two serial ports on the ISDN TA/NT1. That would allow you to access the analog services via one tty and the digital services
The best resource I know of for info on ISDN would be from Dan Kegel's pages:
http://alumni.caltech.edu/~dank/isdn
That should provide more than you wanted to know.


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 32 September 1998


[ Answer Guy Index ] phreak abandon javaterm BBS flaws doslinux resume
softwindows convert apache emulate database distrib proxy
disable DVI superblock serial permission detach cdr
rs422 modem notfound tuning libc5 startup clock ping
accounts lilo NDS 95slow nonlinux progenv cluster ftpd


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]