Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch    |    Fun with MS-DOS batch files    |    42,547 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 41,155 of 42,547    |
|    T to foxidrive    |
|    Re: I forgot how to read a com port    |
|    14 Jun 15 13:07:42    |
   
   From: T@invalid.invalid   
      
   On 06/14/2015 08:32 AM, foxidrive wrote:   
   > On 14/06/2015 10:44, T wrote:   
   >> On 06/12/2015 10:10 PM, T wrote:   
   >>> Hi All,   
   >>>   
   >>> I needed to test a com port with a loop back.   
   >>>   
   >>> To write to the port, I used   
   >>> echo xxxx > com1   
   >>>   
   >>> To read the port, I opened another shell and   
   >>> type < com1   
   >>>   
   >   
   > I asked the questions because in my experience there was no method for   
   > plain batch commands to read a com port, so I was after more info about   
   > the task to perhaps figure out what could be a workaround.   
   >   
   >> Ah poop! Just figured it out.   
   >>   
   >> type COM{n}   
   >   
   > And that is the first time I've seen the type command used with a com port!   
   >   
   > If it works as you say, and it well may but I don't have a serial port   
   > to check it on, then it's a wonderful workaround.   
   >   
   > I would hazard a guess though, that some control characters and others   
   > will fail using type.   
   >   
   >   
   >   
   > But I have some reservations:   
   >   
   > How does the type command know when to quit trying to get info from the   
   > com port,   
   >   
   > and does it need a carriage return or line feed pair to output any data,   
   >   
   > and what terminates the type command?   
      
   Shake fist, accuse terminal's parents of not being married,   
   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca