[899] in winnt
Re: DOS voodoo
daemon@ATHENA.MIT.EDU (David Beckman)
Mon Aug 26 18:01:45 2002
Date: Mon, 26 Aug 2002 17:59:31 -0400
From: David Beckman <dave@draper.com>
In-reply-to: <3D6A6262.3B79894F@mit.edu>
To: djbroder@MIT.EDU
Cc: winpartners@MIT.EDU
Message-id: <5.1.0.14.2.20020826174824.00bef008@mail.draper.com>
MIME-version: 1.0
Content-type: multipart/alternative;
boundary="Boundary_(ID_GVNTQwihdtokybYeOrETcw)"
--Boundary_(ID_GVNTQwihdtokybYeOrETcw)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
According to my old DOS 5 manual, the command syntax for serial port
configuration looks like this:
mode com[n][:] [baud=b] [parity=p] [data=d] [stop=s] [retry=]
or the shorthand form:
mode com[n][:] b,p,d,s,r
where:
n = 1 - 4
b = (I'll leave out the really slow ones) 96 (9600 baud) or 19 (19,200 baud)
p = n (none), e (even), o (odd), m (mark) or s (space). The default is "e"
d = number of data bits. Usually 8
s = number of stop bits. Usually 1
r = only valid for using the mode command with printer ports
In the shorthand form you must include the right number of commas, even if
you are accepting the default for a parameter.
Once you have configured communication with the port, you can create a text
file with the hex string and use the copy command to send it to the port:
copy com2: textfile.txt
Good luck Dave.
-Dave
At 01:16 PM 8/26/2002 -0400, Barbara wrote:
>I'm pretty sure the mode command goes like this:
>mode com2:=96,n,8,1,p
>
>djbroder@MIT.EDU wrote:
> >
> > Twelve years ago I did this, but Lord knows I can't remember how...
> >
> > I want to send a string of six or eight hexadecimal numbers out of COM2
> (or 1)
> > to a device (a projector).
> >
> > I do know that the COM statement goes something like this:
> > mode com2: baud=9600 parity=n data=8 stop=1 {xon=none, full duplex}
> > (The projector in question wants the above parameters. I do not know
> what is
> > optional and what is required)
> >
> > any how I want to pipe the following string to a com port (in hex):
> > 02 00 00 00 02
> >
> > can anybody point me to a full explanation of the mode command? Or
> whatever it
> > is I need?
> >
> > thanks
>
>--
>
>_____________________________________________________________________________________
>Barbara Santorella, MCSE
>NT Systems Administrator
>MIT, Bates Linac
** David Beckman phone: 617-258-4254
** Senior IT Services Support fax: 617-258-4431
** Draper Laboratory e-mail: dave@draper.com
** 555 Technology Square, MS 33
** Cambridge, MA 02139
--Boundary_(ID_GVNTQwihdtokybYeOrETcw)
Content-type: text/html; charset=us-ascii
Content-transfer-encoding: 7BIT
<html>
According to my old DOS 5 manual, the command syntax for serial port
configuration looks like this:<br>
<b>mode com</b>[<i>n</i>][:] [<b>baud</b>=<i>b</i>]
[<b>parity</b>=<i>p</i>] [<b>data</b>=<i>d</i>] [<b>stop</b>=<i>s</i>]
[<b>retry</b>=]<br>
or the shorthand form:<br>
<b>mode com</b>[<i>n</i>][:] <i>b,p,d,s,r<br>
</i>where:<br>
n = 1 - 4<br>
b = (I'll leave out the really slow ones) 96 (9600 baud) or 19 (19,200
baud)<br>
p = n (none), e (even), o (odd), m (mark) or s (space). The default is
"e"<br>
d = number of data bits. Usually 8<br>
s = number of stop bits. Usually 1<br>
r = only valid for using the mode command with printer ports<br><br>
In the shorthand form you must include the right number of commas, even
if you are accepting the default for a parameter.<br><br>
Once you have configured communication with the port, you can create a
text file with the hex string and use the copy command to send it to the
port:<br>
copy com2: textfile.txt<br><br>
Good luck Dave.<br><br>
-Dave<br><br>
At 01:16 PM 8/26/2002 -0400, Barbara wrote:<br>
<blockquote type=cite class=cite cite>I'm pretty sure the mode command
goes like this:<br>
mode com2:=96,n,8,1,p<br><br>
djbroder@MIT.EDU wrote:<br>
> <br>
> Twelve years ago I did this, but Lord knows I can't remember
how...<br>
> <br>
> I want to send a string of six or eight hexadecimal numbers out of
COM2 (or 1)<br>
> to a device (a projector).<br>
> <br>
> I do know that the COM statement goes something like this:<br>
> mode com2: baud=9600 parity=n data=8
stop=1 {xon=none, full duplex}<br>
> (The projector in question wants the above parameters. I do not know
what is<br>
> optional and what is required)<br>
> <br>
> any how I want to pipe the following string to a com port (in
hex):<br>
> 02 00 00 00 02<br>
> <br>
> can anybody point me to a full explanation of the mode command? Or
whatever it<br>
> is I need?<br>
> <br>
> thanks<br><br>
-- <br><br>
_____________________________________________________________________________________<br>
Barbara Santorella, MCSE<br>
NT Systems Administrator<br>
MIT, Bates Linac </blockquote>
<x-sigsep><p></x-sigsep>
<font face="Trebuchet MS">** David
Beckman
phone: 617-258-4254<br>
** Senior IT Services
Support fax:
617-258-4431<br>
** Draper
Laboratory
e-mail: dave@draper.com<br>
** 555 Technology Square, MS 33<br>
** Cambridge, MA 02139</font></html>
--Boundary_(ID_GVNTQwihdtokybYeOrETcw)--