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.

triggering another program to run using serial port

Status
Not open for further replies.

infineonintern

Newbie level 4
Newbie level 4
Joined
Apr 21, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
serial port trigger

hello, is it possible that when i run a program on computer A, it will trigger the serial port of computer B so that another program in computer B will run? The computers are connected by a null modem cable and both programs are written in C++ language and is running in a console application.

The programs are actually a kind of text file transferring between two computers where computer B will read a content from an existing textfile in that computer and send it line by line untill the end of line to computer A and exits itself. Computer A will log the textfile content into a newly created textfile.

The program is currently working but i have to run the program in computer A first which will start polling for an input and then i go to computer B to click and run the program so that it will start transferring.

My question is, can i do it in a way that when i run the program in computer A, it will automatically trigger the program in computer B to run without having to click on the program in computer B to run? If it is possible, how can i do it in c++? Does the program in computer B have to be in a sleep mode? I can paste the code for the programs in computer A and computer B if needed. Thanks!
 

which program is using serial connection

I think it is theoretically possible, but it would be hard work and it is likely to get very messy very quickly. The Ring Indicator pin changing state causes a hardware interrupt. You could create a handler for that interrupt. This would avoid the need to poll, but it is not an easy task.

The obvious question is why you want to do it this way? Why not just have the software on computer A write a file on computer B over a network? (If the only physical connection between them is the serial cable and you can't add NICs then configure the network to use the serial connection). This would be a much easier and quicker solution to your problem.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top