F8 and a GPS -OT

Rick Stevens ricks at nerd.com
Tue Jul 8 17:14:14 UTC 2008


Simon Slater wrote:
> On Wed, 2008-07-02 at 19:03 -0400, Gene Heskett wrote:
>>> Regards,
>>> Les H
>>> ANother OLD RS232 and other serial buss Factually Accurate but often
>>> Retarded Technician.
>> There are times Les, when that description is too accurate. :-(
>>
> I don't suppose someone of your ilk could point a young bloke to some
> reading on serial comms with linux boxes?  I have a box of odd things
> I'd like to get going to save some manual data input (microchip reader,
> barcode scanners etc).  Might even be useful when I get a GPS next year.
> I keep putting it off for a rainy day, but the drought hasn't broken
> yet.  About 20 years ago did a bit with minicom and remote weather
> stations, but can't recall how I got started.

At the C/C++ program level, the most common stuff you'll deal with is
the termios(3) calls for setting baud rates, stop bits, etc.  From
there, it's a matter of calling getc(), putc() and other similar
system calls to get data from and send data to the device.  Make sure
you watch out for the "raw" versus "cooked" modes of the data streams
(e.g. a carriage return from the device may appear as a newline in the
"cooked" input stream).

Most other high-level languages (Perl, Java) use termios-type things
to control the ports.

Good luck.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer                       rps2 at nerd.com -
- Hosting Consulting, Inc.                                           -
-                                                                    -
-         The Navy's a bunch of wimps!  MY job's an adventure!       -
----------------------------------------------------------------------




More information about the fedora-list mailing list