Solved

bioscom

Posted on 1997-03-25
3
4,256 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now