?
Solved

bioscom

Posted on 1997-03-25
3
Medium Priority
?
4,300 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
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.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

762 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