[comp.unix.msdos] Accessing com1: under vpix

colin@darkover.uucp (Colin J. Dykstra) (11/14/90)

Question for the net:

I'm trying to setup vp/ix (well really AT&T's simultask) to access
an asynch port (/dev/tty00) as COM1: so that I can use a modem whilst 
in simultask.  I have /dev/tty00 administered as a uucp device and can't 
seem to be able to share it with simultask. 

Here is what I have tried so far:

   from /usr/vpix/defaults/vpix.cnf:
   COM1			/dev/tty00

   The above results in a dos error message, while starting simultask,
   something to the effect:

     "can't open /dev/tty00"

   Next I tried disabling the port under unix (commented out the 
   appropriate entry in /etc/inittab and killed the uugetty).  This 
   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.

I am out of ideas, and any suggestions anybody may have would be very
much appreciated.

Regards,

Colin Dykstra

dave@westmark.WESTMARK.COM (Dave Levenson) (11/19/90)

In article <1990Nov14.034526.4488@darkover.uucp>, colin@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@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