File transfer over a com port. 
Author Message
 File transfer over a com port.

Quote:

>I am working on a problem that I have and I think someone in these two
>groups may be able to help me. Can somone write a simple file transfer
>program that would allow me to send mode.com to a laptop with a bad floppy
>and without a copy of mode? it needs to go from the pc's com2 to the
>laptops com1 throuhg the use of ctty on the laptop. it does not need to be
>fast 2400 is the fastest i want to try 300 baud would be good. is this
>possible and would someone please help me ? I only have the dos 6.22
>version of qbasic.

Use DOS's INTERLNK software, and connect the two computers through the
parallel port.  The INTERLNK files were distributed with DOS 6.0, and are
in your DOS directory.  Type HELP INTERLNK at any dosprompt for the help.
The InterLink was added to DOS just for this purpose, to swap files.

Building a program to do such a thing is using a power-jack hammer to
remove a screw.  You're using the wrong tool.



Tue, 05 Jan 1999 03:00:00 GMT  
 File transfer over a com port.



Quote:

>I am working on a problem that I have and I think someone in these two
>groups may be able to help me. Can somone write a simple file transfer
>program that would allow me to send mode.com to a laptop with a bad floppy
>and without a copy of mode? it needs to go from the pc's com2 to the
>laptops com1 throuhg the use of ctty on the laptop. it does not need to be
>fast 2400 is the fastest i want to try 300 baud would be good. is this
>possible and would someone please help me ? I only have the dos 6.22
>version of qbasic.

You don't really give us enough information to fully understand your
problem.  You could use INTERLNK if you have it on both computers, but
if you don't have MODE.COM on the laptop, what else are you missing?

If you have Windows on the laptop, you might be able to use the Terminal
applet to transfer via a null modem cable.  I think Terminal had XMODEM
capability.

Otherwise, your only option is to write transmitter/receiver programs on
the two computers.  One to read the file on the sending computer and convert
the binary hex into ascii text and write it through the com port.  The other
on the receiving computer to take the ascii text coming through the com port,
convert each ascii hex character pair back into binary and write it to a
file.  I've done it.  It's a pain, but it works.




Tue, 05 Jan 1999 03:00:00 GMT  
 File transfer over a com port.

If you already have MS-DOS 6.22 and a NULL modem all that you need to do
is run INTERLNK.EXE on one computer and INTERSVR.SYS on the other.  This
will require you to tweak your CONFIG.SYS and AUTOEXEC.BAT files, but
the instructions are pretty obvious within the DOS HELP screens.

Quote:

> I am working on a problem that I have and I think someone in these two
> groups may be able to help me. Can somone write a simple file transfer
> program that would allow me to send mode.com to a laptop with a bad floppy
> and without a copy of mode? it needs to go from the pc's com2 to the
> laptops com1 throuhg the use of ctty on the laptop. it does not need to be
> fast 2400 is the fastest i want to try 300 baud would be good. is this
> possible and would someone please help me ? I only have the dos 6.22
> version of qbasic.

--
Dean "Scott" Fredrickson      ,    ,
a.k.a. Skot Fred             ("\''/").___..--''"`-._
                             `9_ 9  )   `-.  (     ).`-.__.`)


                          (il).-''  ((i).'  ((!.-'          

http://home.sprynet.com/sprynet/skotfred/



Fri, 08 Jan 1999 03:00:00 GMT  
 File transfer over a com port.

Quote:

>I am working on a problem that I have and I think someone in these two
>groups may be able to help me. Can somone write a simple file transfer
>program that would allow me to send mode.com to a laptop with a bad floppy
>and without a copy of mode? it needs to go from the pc's com2 to the
>laptops com1 throuhg the use of ctty on the laptop. it does not need to be
>fast 2400 is the fastest i want to try 300 baud would be good. is this
>possible and would someone please help me ? I only have the dos 6.22
>version of qbasic.

On one machine:
 OPEN "COM1:1200,N,8,1" FOR BINARY AS #1
 OPEN "mode.com" for output As #2
        DO
        LOOP WHILE EOF(1)
        DO
                A$=GET$(1,LOF(1))
                Print #2, A$;
    LOOP UNTIL EOF(1)
 END

On the other
  OPEN "COM2:1200,N,8,1" FOR RANDOM AS #1
  OPEN "mode.com" for input as #2
  DO
     A$=INPUT$(2,1)
         PRINT #1, A$;
  LOOP UNTIL EOF(2)
  END

This should work - however, it is 1:38am.  The major screwup will
come if I forgot which input/output verbs go with which file modes.

I believe with binary it is GET$/PUT.  With every mode, print should
work.

However, if I did screwup the syntax, just look in the online help.
The basic (pun not intended) is that the receiving end opens the
port, waits for bytes to start arriving, writes them one-by-one to
the output file and quits when they stop.  The sender opens the file
and starts pumping out bytes until done and then quits.



Sat, 09 Jan 1999 03:00:00 GMT  
 File transfer over a com port.

Quote:


> >I am working on a problem that I have and I think someone in these two
> >groups may be able to help me. Can somone write a simple file transfer
> >program that would allow me to send mode.com to a laptop with a bad floppy
> >and without a copy of mode? it needs to go from the pc's com2 to the
> >laptops com1 throuhg the use of ctty on the laptop. it does not need to be
> >fast 2400 is the fastest i want to try 300 baud would be good. is this
> >possible and would someone please help me ? I only have the dos 6.22
> >version of qbasic.

        Do you have Windows?  The Windows terminal program is great for
transfering binaries (make sure you use hardware flow control--I don't think
XON/XOFF works with binaries).
        You could also write your own CTS/RTS hardware handshaking routine
for binary transfers.  Modify this prog a little:

'BY STEVEN SENSARN

DIM BYTE AS STRING * 1

CLS

'change this line to your settings
OPEN "COM2:9600,N,8,1,CD600,CS1,OP0" FOR RANDOM AS #1

DO
    'instead of reading the byte from the keyboard, read it from the file
    BYTE = INKEY$
    IF BYTE <> " " THEN
        'i don't know what the ascii code for an EOF is--change 27 to that
        IF BYTE = CHR$(27) THEN CLOSE : END
        'waits for thr empty in lsr (i think--i forget)
        'notice &H2F8--change this to the base port address of your modem:
        'COM1:3F8h
        'COM2:2F8h
        'COM3:3E8h\may have gotten these mixed up--but your not using them
        'COM4:2E8h/anyways
        WAIT (&H2F8 + 5), 32
        'send byte across port
        'change this &h2F8 too
        OUT &H2F8, ASC(BYTE)
    END IF
        'if char in rbr then it is read
        'change this &h2F8 too
    IF (INP(&H2F8 + 5) AND 1) = 1 THEN
        'read byte
        'change this &h2f8 too
        BYTE = CHR$(INP(&H2F8))
        'instead of sending the byte to the screen, save it to the file
        PRINT BYTE;
    END IF
LOOP

Even after changing that program, I'm not sure if it would work due to the
EOF thing (I haven't done much file transfer stuff).

Quote:

> On one machine:
>  OPEN "COM1:1200,N,8,1" FOR BINARY AS #1
>  OPEN "mode.com" for output As #2
>         DO
>         LOOP WHILE EOF(1)
>         DO
>                 A$=GET$(1,LOF(1))
>                 Print #2, A$;
>     LOOP UNTIL EOF(1)
>  END

> On the other
>   OPEN "COM2:1200,N,8,1" FOR RANDOM AS #1
>   OPEN "mode.com" for input as #2
>   DO
>      A$=INPUT$(2,1)
>          PRINT #1, A$;
>   LOOP UNTIL EOF(2)
>   END

> This should work - however, it is 1:38am.  The major screwup will
> come if I forgot which input/output verbs go with which file modes.

> I believe with binary it is GET$/PUT.  With every mode, print should
> work.

> However, if I did screwup the syntax, just look in the online help.
> The basic (pun not intended) is that the receiving end opens the
> port, waits for bytes to start arriving, writes them one-by-one to
> the output file and quits when they stop.  The sender opens the file
> and starts pumping out bytes until done and then quits.

--
______________________________

Steven Sensarn

______________________________



Sun, 10 Jan 1999 03:00:00 GMT  
 File transfer over a com port.

Have a look for a program called  "FX"  this is a simple file transfer
and remote access program.

 As long as you can access the remote port, the program allows you to
"upload" the .exe file to the remote machine.

 I have used this program many times to get out of a "transfer jam"

 Need more details ?

 email me.

 Regards,
         Glenville T. Sawyer



Sun, 17 Jan 1999 03:00:00 GMT  
 File transfer over a com port.


Quote:

>Have a look for a program called  "FX"  this is a simple file transfer
>and remote access program.

> As long as you can access the remote port, the program allows you to
>"upload" the .exe file to the remote machine.

> I have used this program many times to get out of a "transfer jam"

> Need more details ?

> email me.

> Regards,
>         Glenville T. Sawyer

...And if anyone is interestd, I have a PROGRAM that I wrote (I was bord)

that shows STEP-BY-STEP how to make a Parallel-port adapter using the

Radio-Shack 25-Male to 25-Female junction-box designed exactly for the

"FX" program.  ...also works with the "LAP-LINK" software.

so "RING" me-E if anyone is interested.

Beau Schwabe



Sun, 17 Jan 1999 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. MSComm control - binary data transfer using a com port

2. Finding COM Ports - Mouse dies when VB talks to its COM Port

3. Serial port/modem access/file transfer in VB

4. serial port files transfer

5. help file transfer, open com

6. File Transfer and COM/DCOM

7. Print text file to com port

8. How do you copy a file to your com-port

9. Copying a file to a com port??????

10. How do you copy a file to a com port

11. VB4.0 sending commands to rs232 (com port) and printer port

12. How to use com port receive file ?

 

 
Powered by phpBB® Forum Software