[NTLUG:Discuss] Help with serial I/O.
Hrothgar
hrothgar at endor.hsutx.edu
Mon Oct 4 12:05:09 CDT 1999
* kmoravec at airmail.net [1999.10.04 09:30]:
:Programming in Linux.
:
:I have been programming a long time, but have programmed for DOS,
:Vax/Vms, Windows 3.1, but never UNIX.
:
:I have a very simple question. How do I open a serial port, and read
:and write binary information to it?
:
:What is the C command to open say COM3:
:
:Then does printf work?
:
:The program is very simple to talk to an external device, and dump the
:formatted results to a file, but I am not sure where to start.
:
:Is there a good general book on programming Linux in C that would
:explain this?
:
:Also I want to poll this device every 120 Seconds. Is there a sleep
:command that lets my program become inactive for a while? Or is it
:better to have it rescheduled to execute two minutes later?
:
:Kip
:
:_______________________________________________
:http://ntlug.org/mailman/listinfo/discuss
you should probably start by checking out the Serial Programming HOWTO.
one place to get it is here:
http://www.linux-howto.com/LDP/HOWTO/Serial-Programming-HOWTO.html
or look in /usr/doc/HOWTO/ on your linux box.
hope this helps and happy hacking!
--
cameron
[ How's my programming? Call 1-800-DEV-NULL ]
More information about the Discuss
mailing list