[net.micro.pc] Can you Copy to COMn: in DOS/ How to ready COMn: in DOS.

dsnow@watarts.UUCP (Doug Snow) (10/20/86)

*******
 
  For a large number of applications, I've always wanted to be able
to do something like...
    
            mode com1:9600,e,1,... etc.
            copy script.fil com1:

  But, alas, I get a device not ready error. Anyone have any ideas/or 
suggestions.
-- 
           
		Doug Snow, Arts Computing Office
			   University of Waterloo
		           ( 519 ) 885 - 1211 ext. 3769
                           dsnow@watarts.UUCP

tj@utcs.UUCP (10/21/86)

Probasbly just looking for modem (DTR CTS) signals.
Make sure that the connector (25 pin) has pin 4 jumpered to pin 5
and pins 6,8, and 20 jumpered together. Also make sure that the
device at the other end of the wire can accept non stop at 9600 baud
or else 1) signal using dtr signals 2) use Xon/Xoff and sending PC
use software spooler that handles Xon/Xoff 3) Lose data.

go for it.

gkb@necntc.UUCP (Greg Busby) (10/21/86)

In article <8826@watarts.UUCP> dsnow@watarts.UUCP (Doug Snow) writes:
>  For a large number of applications, I've always wanted to be able
>to do something like...
>            mode com1:9600,e,1,... etc.
>            copy script.fil com1:
>  But, alas, I get a device not ready error. Anyone have any ideas/or 
>suggestions.
>           
>		Doug Snow 

We currently use a similar set of commands to download hex files to a
PROM programmer -- we have a .bat file which does the following:

	ECHO OFF
	MODE COM1: 9600,N,1,...
	COPY %1.HEX COM1:

This little sequence works fine for us.  Maybe it's the ECHO OFF, or
maybe the No parity, but we've had no trouble as long as the device on
the COM1: port was ready. Hope this helps.

GKB

darmon@polaris.UUCP (Pierre Darmon) (10/22/86)

In article <8826@watarts.UUCP> dsnow@watarts.UUCP (Doug Snow) writes:
>
>*******
> 
>  For a large number of applications, I've always wanted to be able
>to do something like...
>    
>            mode com1:9600,e,1,... etc.
>            copy script.fil com1:
>
>  But, alas, I get a device not ready error. Anyone have any ideas/or 
>suggestions.

I guess the way to go is

               type script.fil > com1:
-- 

Pierre Darmon, IBM Thomas J. Watson Research Center.                        
.....seismo!philabs!polaris!darmon.
darmon.yktvmz.ibm@csnet-relay  

cramer@kontron.UUCP (10/22/86)

>   For a large number of applications, I've always wanted to be able
> to do something like...
>     
>             mode com1:9600,e,1,... etc.
>             copy script.fil com1:
> 
>   But, alas, I get a device not ready error. Anyone have any ideas/or 
> suggestions.
>            
> 		Doug Snow, Arts Computing Office

The problem is the device attached to your serial port.  I'm able to
do the operation you describe above, but remember that the PC-DOS
serial driver doesn't support XON/XOFF, so an XON/XOFF device will
have buffer overrun problems.  I'm not terribly knowledgeable with
the various hardware flow control schemes -- how the device attached 
to COM1 is doing flow control maybe the source of the "device not ready"
error.

Clayton E. Cramer

john@uwmacc.UUCP (John Jacobsen) (10/24/86)

 In article <8826@watarts.UUCP> dsnow@watarts.UUCP (Doug Snow) writes:
 >
 >*******
 > 
 >  For a large number of applications, I've always wanted to be able
 >to do something like...
 >    
 >            mode com1:9600,e,1,... etc.
 >            copy script.fil com1:
 >
 >  But, alas, I get a device not ready error. Anyone have any ideas/or 
 >suggestions.


I just do "copy script.fil com1" and leave out the colon.  Doesn't that work?

John E. Jacobsen 
University of Wisconsin -- Madison Academic Comp. Cntr.

root@dosadi.UUCP (Maintenance Account) (10/25/86)

> >  For a large number of applications, I've always wanted to be able
> >to do something like...
> >    
> >            mode com1:9600,e,1,... etc.
> >            copy script.fil com1:
> >
> >  But, alas, I get a device not ready error. Anyone have any ideas/or 
> >suggestions.
>

I didn't bother to reply originally since I thought several other people
would beat me to it, but I guess I was wrong.  

Your method of copying is fine, from the software end.  the reason you're
getting the device not ready error is because the PC isn't receiving
the correct hardware handshaking signals.  The PC requires CTS, DSR, and
DCD to be high before it'll send a thing.  If it doesn't get them after
a certain time has lapsed, it will give the device not ready error.

If your serial port is on a multi-function card, there's probably some
jumper settings or dip switch settings for pulling these lines to true.
If not, you can do it by altering your cable a little bit.  CTS is pin
5, DSR is pin 6, and DCD is pin 8.  What you do is to jumper all these
pins to pin 20.  Pin 20 is DTR (data terminal ready) and the PC pulls
this line to true virtually all the time.  If you don't know how to
modify cables, probably the best way to do this would be to get what
is referred to as a mini breakout box.  It's a plastic connector shell
that has a connector at either end and a little patchboard in the middle
that allows you to jumper lines together.  I think they cost about $30
or so.  The truly lazy could also call a place like inmac and have
them custom make a cable for you.

Note, that this method disables all handshaking.  If the device you're
sending to can't take the full data stream non-stop, you'll have to
work something else out.  PC's generally don't talk any type of
software handshaking (like xon/xoff).

 
-- 

/Dave Edick/

{hplabs,ihnp4}!qantel!dosadi!root

             "I come in peace, take me to your lizard"

frank@rocky2.UUCP (Ferenc Horvath) (11/05/86)

If you want to avoid putting jumpers on the previously mentioned pins,
use the PRINT command with the file name you want to send through the
COM port.  Of course, you'll have to set "mode lpt1:=com1" first.
I have used this to print files on an H/P LaserJet.