Solved

bioscom

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops 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.

809 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