Accessing com1: under vpix

Dave Levenson dave at westmark.WESTMARK.COM
Mon Nov 19 04:08:35 AEST 1990


In article <1990Nov14.034526.4488 at darkover.uucp>, colin at darkover.uucp (Colin J. Dykstra) writes:

Mr. Dykstra describes his attempt to use the /dev/tty00 UNIX device
under VP/ix (SimulTask).

>    was somewhat more successful.  This time, at least I was able to 
>    access the port briefly under simultask (tried "echo blah > COM1:"), 
>    however, the dos session hung almost immediately.

The problem is probably related to the modem control signals.  The
echo command was unable to write to the port because the modem on
the port was not asserting carrier detect.

Try running some real MS-DOS communication software, which knows how
to deal with modems, rather than echo.  It should be able to access
the port correctly, once you have killed off the uugetty.

Some years ago, I faced a similar problam, running MS-DOS under UNIX
on a 6300PLUS.  I wrote a C program which is run suid uucp, and
which creates a lock file such as /usr/spool/locks/LCK..tty00
containing its own pid.  It then opens the tty port (remember, it is
running as uucp, so it can do that) and writes one character.  The
modem echos this character, and the uugetty goes to sleep (because
if finds the port locked by a still-active process) leaving the port
along.  The C program then closes the port, allowing it to be opened
by MS-DOS.  The C program invokes MS-DOS and waits until MS-DOS
exits.

At this point, MS-DOS has full access to the com port.  When the
MS-DOS session is terminated, the C program regains control, deletes
the lock file, and exits.  Within 60 seconds, the uugetty will wake
up, notice that the lock file has been removed, and exit.  A second
or so later, init will respawn the uugetty, and the port is back in
business, ready for UNIX activity.

It gives you a single unix command that invokes MS-DOS ready to
communicate, and doesn't require that you edit inittab or anything
else in preparation for this.

-- 
Dave Levenson			Internet: dave at westmark.com
Westmark, Inc.			UUCP: {uunet | rutgers | att}!westmark!dave
Warren, NJ, USA			AT&T Mail: !westmark!dave
[The Man in the Mooney]		Voice: 908 647 0900  Fax: 908 647 6857



More information about the Comp.unix.msdos mailing list