home bbs files messages ]

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,154 of 42,547   
   foxidrive to All   
   Re: I forgot how to read a com port   
   15 Jun 15 01:32:29   
   
   From: foxidrive@server.invalid   
      
   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?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca