Path: utzoo!utgpu!watserv1!watmath!att!westmark!dave From: dave@westmark.WESTMARK.COM (Dave Levenson) Newsgroups: comp.unix.msdos Subject: Re: Accessing com1: under vpix Message-ID: <1513@westmark.WESTMARK.COM> Date: 18 Nov 90 17:08:35 GMT References: <1990Nov14.034526.4488@darkover.uucp> Organization: Westmark, Inc., Warren, NJ, USA Lines: 44 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