Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > read from serial port in c

Reply
Thread Tools

read from serial port in c

 
 
Robert Ngo
Guest
Posts: n/a
 
      08-10-2004
how to read from serial port with c on a linux server, the serail port is
connect to a card reader. The information will then be save in a postgre
database.

Thanks and regards

Robert Ngo


 
Reply With Quote
 
 
 
 
Jens.Toerring@physik.fu-berlin.de
Guest
Posts: n/a
 
      08-10-2004
Robert Ngo <(E-Mail Removed)> wrote:
> how to read from serial port with c on a linux server, the serail port is
> connect to a card reader. The information will then be save in a postgre
> database.


Unless you treat the device file for the serial port like a normal file
you can't use the standard C functions like fopen(), fread() etc. -
and since they don't allow the fine grained control over what is going
on you will usually need Linux specific, nonstandard functions. But
these aren't discussed here but in e.g. comp.os.linux.development.apps
(but if you ask there it would probably be prudent to ask a question
and not only more or less state your intentions because otherwise your
chances of getting helpful relies won't be that good). Moreover, how to
deal with databases is also something for which no standard C functions
exist, again you will need some extensions which also are off-topic
here. Since I don't know about any newsgroup dealing with Postgresql
I guess reading a bit in

http://www.physiol.ox.ac.uk/Computin...rogrammer.html

(which was the first hit Google turned up for "postgres C library) might
get you started. As far as I can see there also seems to be a mailing
list devoted to the topic.
Regards, Jens
--
\ Jens Thoms Toerring ___ http://www.velocityreviews.com/forums/(E-Mail Removed)-berlin.de
\__________________________ http://www.toerring.de
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
emulate a serial port in windows (create a virtual 'com' port) Pom Python 2 01-31-2007 07:49 PM
Serial Port(COM)Port Saref Aref Computer Information 2 02-14-2005 07:38 AM
Can I connect router Serial interface directly to a PC serial port? Faustino Dina Cisco 2 08-18-2004 02:30 AM
Re: Serial port and PS/2 port schematics OR Assistive Tech. suggestion naive.verizon@locality.net Computer Support 1 07-10-2003 11:46 AM
Re: Serial port and PS/2 port schematics °Mike° Computer Support 1 07-09-2003 10:30 PM



Advertisments