Port programming

G

Gaijinco

How do you programm the ports of a computer?

Say I want to send a signal thru COM1 or an USB port?

Thanks
 
M

Martin Steen

Gaijinco said:
How do you programm the ports of a computer?

Say I want to send a signal thru COM1 or an USB port?

Thanks

You question is a little offtopic,
but here is a small hint:

Reading from a comport (windows):

ifstream InputFile("COM1");
InputFile.read(Buffer, NumberOfBytes);
InputFile.close();

On Unix, the names of the comports are like
"/dev/ttyS0" (don't know the exact name).

-Martin
 
V

Vilas Kumar Chitrakaran

Martin said:
You question is a little offtopic,
but here is a small hint:

Reading from a comport (windows):

ifstream InputFile("COM1");
InputFile.read(Buffer, NumberOfBytes);
InputFile.close();

On Unix, the names of the comports are like
"/dev/ttyS0" (don't know the exact name).

-Martin

A good reference for serial port programming in UNIX systems is here:

http://www.easysw.com/~mike/serial/

Vilas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top