Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

serial communication - two PC's (Win 8 & DOS)

Status
Not open for further replies.

mohsentalar

Newbie level 6
Joined
Sep 2, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,375
Hi
i have two pc ; one is MS-Dos and other has windows 8
i want to communicate them with serial port , like send and receive .txt file
thanks
 

andre_luis

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,479
Helped
1,183
Reputation
2,385
Reaction score
1,181
Trophy points
1,403
Location
Brazil
Activity points
54,953
re: serial communication - two PC's (Win 8 & DOS)

WIN: Hyperterminal, RealTerm, etc...
DOS: "COPY FILE.TXT COM1"
 

mohsentalar

Newbie level 6
Joined
Sep 2, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,375
re: serial communication - two PC's (Win 8 & DOS)

thanks
i have Teraterm for windows and i know nothing about serial in DOS
do i need to first OPEN PORT and finally CLOSE it, or not.
and how receive it in windows, any handshaking required?
i mean how to wait to receive files.
 

andre_luis

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,479
Helped
1,183
Reputation
2,385
Reaction score
1,181
Trophy points
1,403
Location
Brazil
Activity points
54,953
re: serial communication - two PC's (Win 8 & DOS)

For receiving data from serial port in DOS, just swap the ordering of above arguments of the COPY command. This will store all received bytes into the file.

Code:
"COPY COM1 FILE2.TXT"

The only problem is that this will keep the port opened indefinitely. There could have some way to manage it, but I can't remember. Take in mind that DOS operational system is not suited for run concurrent processes.
 

mohsentalar

Newbie level 6
Joined
Sep 2, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,375
ok
i did it and typed this command "COPY FILE.TXT COM1" but it said cant write...
i only used this line do you think this is enough or something else is needed like OPENPORT,etc
and i dont know what suppose to do in win os just run Teraterm and wait???

one other thing i tried: i went to Dos help and searched 'serial' it said use INTERLNK to connect 2 pc. it said some config requiered , add this line "c:\dos\interlnk.exe" to CONFIG.SYS and reboot system. i did it
but again i stuck in win os. in DOS help it said you must run INTERSRV.EXE on server pc and i dont know how to find it in windows
 

c_mitra

Advanced Member level 5
Joined
Nov 13, 2012
Messages
3,815
Helped
929
Reputation
1,860
Reaction score
921
Trophy points
1,393
Activity points
30,126
You need to set up the com1 port with baud rate, word length, parity, stop bits and other paraphernalia. I do not remember well, but you will perhaps need to read the set term command.
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
14,688
Helped
2,867
Reputation
5,744
Reaction score
2,876
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
109,736
INTERLNK to connect 2 pc. it said some config requiered , add this line "c:\dos\interlnk.exe" to CONFIG.SYS and reboot system. i did it
but again i stuck in win os. in DOS help it said you must run INTERSRV.EXE on server pc and i dont know how to find it in windows

INTERLNK and INTERSRV are DOS programs. They may or may not be present on your Windows machine.

They run in the DOS window. On a Windows machine you'll open a command window (DOS type). (That is, if this method will work at all with USB.)

These two programs were useful for transferring files between computers 20 years ago. That was at a time when data went through the parallel ports (DB-25). Does your Windows machine have a parallel port?

If you are lucky you'll be able to get the programs to cooperate. Otherwise you may need to resort to floppy disk, or zip disk, etc.
 

srizbf

Advanced Member level 5
Joined
Apr 3, 2010
Messages
1,992
Helped
417
Reputation
840
Reaction score
328
Trophy points
1,363
Activity points
10,985
before connecting the DOS and windows PC ,
make the baudrate in com ports is same on both.

you can use the mode command for this.
example:
Code:
mode com1: 9600,n,7,1
this sets com1 port to: 9600 baudrate , no parity ,7 databits and 1 stop bit .

then you can use the copy command:

Code:
copy abc.txt com1:
this copies the file abc.txt to com1 port.
 
Last edited by a moderator:

c_mitra

Advanced Member level 5
Joined
Nov 13, 2012
Messages
3,815
Helped
929
Reputation
1,860
Reaction score
921
Trophy points
1,393
Activity points
30,126
Also do not forget to use a twisted cable (that will make the receive data connect with the transmit data of the other)- straight cables (data in <-->data in) will also not work.
(google crossover serial port cable pin connection- if you have doubts- these cables can be purchased but are trivial to make if you know how to solder neatly)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top