Solved

bioscom

Posted on 1997-03-25
3
4,274 Views
Last Modified: 2008-03-10
I want to be able to get 2 PC's to communicate over a serial link using the bioscom function.  The code I have been experimenting with is shown below.

The first PC runs following code


int main(void)
{
   int i,;
   char send;

   send='b';

   bioscom(0, 0xe3, COM2); //sets up com2 for 9,600 baud , no parity, 1 stop bit

   for (i=0;i<500;i++){
                  bioscom(1, send, COM2); //sends 'b' 500 times
                 }
   }

The second PC runs the following code

int main(void)
{
   int i,;
   char send,recieved;

   send='b';

   bioscom(0, 0xe3, COM2); //sets up com2 for 9,600 baud , no parity, 1 stop bit

   for (i=0;i<500;i++){
                      recieved=bioscom(2, send, COM2); //recieves 500 bytes
                 }
   }


both programs work fine when the other PC is running comms software such as terminal,  but they won't work with each other.
Ultimatly I want to be able to write 2 C programmes each running on a seperate PC's which can send text files to each other over a serial link.
0
Comment
Question by:grahamr032597
3 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1249755
Well, and the question is? :)
I mean, at least show a bunch of code to those of us (not me, i'm afraid) who could help you.
Rgds, julio
0
 

Author Comment

by:grahamr032597
ID: 1249756
Edited text of question
0
 

Accepted Solution

by:
klos earned 100 total points
ID: 1249757
Make sure you enable the modem control signals in your programs.  The BIOS will expect to see those signals on when it tries to send or receive data, and fail if it doesn't.  I expect the cable you're using already has these signals since the programs work with other COMM programs.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question