[comp.sys.ibm.pc] Problem with serial port

foote@ernie.Berkeley.EDU (Bill Foote) (02/23/89)

This is a re-post--I didn't receive any replies with a California
distribution, so I'm trying "world".



I have a problem with my serial port (on my Unisys AT clone).  I
can't send output to it using fopen("com1:", "w") from Microsoft
C, and "copy con: com1:" doesn't work (it accepts keyboard input,
but nothing comes out of the serial port).  When I type in
"mode com1:12,N,8,1" (or even just "mode com1:"),  I get the error
message "invalid parameter com1".  Despite this, Procomm, Telix, and
Crosstalk XIV all have no trouble with the serial port, and my
diagnostics disk tells me that I do indeed have a serial port
installed.  Does anyone have any idea what might be wrong?

Please send all replies to foote@ernie.berkeley.edu.

Thanks in advance,

Bill Foote

brown@nicmad.UUCP (Vidiot) (02/25/89)

In article <10220@pasteur.Berkeley.EDU> foote@ernie.Berkeley.EDU (Bill Foote) writes:
<
<I have a problem with my serial port (on my Unisys AT clone).  I
<can't send output to it using fopen("com1:", "w") from Microsoft
<C, and "copy con: com1:" doesn't work (it accepts keyboard input,
<but nothing comes out of the serial port).  When I type in
<"mode com1:12,N,8,1" (or even just "mode com1:"),  I get the error
<message "invalid parameter com1".  Despite this, Procomm, Telix, and
<Crosstalk XIV all have no trouble with the serial port, and my
<diagnostics disk tells me that I do indeed have a serial port
<installed.  Does anyone have any idea what might be wrong?

Ya, MSC (5.1) doesn't support the com ports, at least not directly.  We have
the same problem where I work.  One has to write their own com port handler
or buy one of the third party C library packages that include com port
functions.
-- 
	       harvard-\	 att--\
Vidiot            ucbvax!uwvax!astroatc!nicmad!brown
	       rutgers-/      decvax--/
	ARPA/INTERNET: nicmad!brown%astroatc.UUCP@spool.cs.wisc.edu

w8sdz@WSMR-SIMTEL20.ARMY.MIL (Keith Petersen) (02/26/89)

foote@ernie.Berkeley.EDU (Bill Foote) writes:
> I have a problem with my serial port (on my Unisys AT clone).  I
> can't send output to it using fopen("com1:", "w") from Microsoft
> C, and "copy con: com1:" doesn't work (it accepts keyboard input,
> but nothing comes out of the serial port).  When I type in
> "mode com1:12,N,8,1" (or even just "mode com1:"),  I get the error
> message "invalid parameter com1".  Despite this, Procomm, Telix, and
> Crosstalk XIV all have no trouble with the serial port, and my
> diagnostics disk tells me that I do indeed have a serial port
> installed.  Does anyone have any idea what might be wrong?

Bill, the problem is that you have to turn on DTR (and maybe CTS/RTS
handshaking if the modem wants to see that).

If you get file pd1:<msdos.modem>DOSMODEM.ARC from Simtel20 and run
DTR.COM in your AUTOEXEC.BAT file you will be able to do simple things
like ECHO string>COM1 without getting the abort/retry/fail message.

There is another file in that archive called AT.COM which sends
Hayes-compatible "AT" command to the modem.

  AT Z             sends ATZ<cr> to reset the modem.
  AT DT555-1212    will dial that number

etc.

The default baud rate for the PC's COM ports is 2400.

--Keith Petersen
Maintainer of the CP/M & MSDOS archives at wsmr-simtel20.army.mil [26.0.0.74]
DDN: w8sdz@wsmr-simtel20.army.mil
Uucp: {ames,decwrl,harvard,rutgers,ucbvax,uunet}!wsmr-simtel20.army.mil!w8sdz

don@trsvax.UUCP (02/27/89)

<I have a problem with my serial port (on my Unisys AT clone).  I
<can't send output to it using fopen("com1:", "w") from Microsoft
<C, and "copy con: com1:" doesn't work (it accepts keyboard input,
<but nothing comes out of the serial port).  When I type in
<"mode com1:12,N,8,1" (or even just "mode com1:"),  I get the error
<message "invalid parameter com1".  Despite this, Procomm, Telix, and
<Crosstalk XIV all have no trouble with the serial port, and my
<diagnostics disk tells me that I do indeed have a serial port
<installed.  Does anyone have any idea what might be wrong?

A simple solution is

	copy con aux

This does what you were trying to do with the copy con com1 command.  I
redirect debugging output from symdeb to a terminal, and the above command
is a simple test to see that everything is set properly, such as baud rates
and null modem.

% make me stop
don't know how to make me.  Stop.

Don Subt			The opinions expressed above are
Tandy Corp.			strictly mine, not my employer's.

817-390-3068			...!killer!ninja!sys1!trsvax!don