Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
I need serial communication using RS232, So I am trying to open serial port but I can't open port please suggest me hoe to use.

What I have tried:

I need serial communication using RS232, So I am trying to open serial port but I can't open port please suggest me hoe to use.
Posted
Updated 31-Jan-19 4:08am
Comments
CHill60 31-Jan-19 9:37am    
I'm sorry - this is a Quick Answers forum. We can't offer you tutorials or training, nor will we write code for you.
Post the code you are trying to use and we may be able to help you fix it
KarstenK 31-Jan-19 11:49am    
Please specify what you really means with MS-DOS. It is so old, but I remember some floppy disks about 30 years ago. :-O

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A simple search gave loads of answers: "RS232 From C program"[^]

Please, in future do at least basic research yourself, rather than wasting your time and ours.
 
Share this answer
 
Serial communication is a bit cumbersome, but Serial library for C++ article will give you some insights of the used API and some details.

Important is to understand that the communication "takes time" up to some seconds and so your code needs to wait gentle for some answers. I have coded some 20 years ago some serial communication and ended with that "overlapped" stuff.

So be patient for good results. Good luck ;-)
 
Share this answer
 
Comments
Rick York 31-Jan-19 11:23am    
This individual is the world's last remaining developer using ms-dos. That article is about using the Win32 API so it won't work for him. I don't even bother to try answering these questions any more. If he is still using ms-dos he needs far more help than I can possibly ever provide.
Dave Kreskowiak 31-Jan-19 16:39pm    
Yeah, I forgot about how to do this stuff literally a couple of decades ago.
KarstenK 31-Jan-19 11:48am    
Thanks for the detail.

Maybe he should update to Windows 3.1 ;-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900