472,783 Members | 992 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

read from serial port in c

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

Thanks and regards

Robert Ngo
Nov 14 '05 #1
1 4067
Robert Ngo <ro*******@163.com> 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

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


(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 ___ Je***********@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0',...
by: Tolgay Gül | last post by:
I need some codes that able to send and read data by serialport in VB.Net 2005 beta 2. I wrote some codes and It can send data via serialport but It cannot read what I send. I have looked up on...
by: Casey Bralla | last post by:
I'd like to read ASCII data from a serial port, but (once again) I'm having trouble getting started. (Can't seem to find the basic level of docs to get going <sigh>) I'd like to use only...
by: luca72 | last post by:
Hello at all sorry for my english but i'm Italian. I use pyserial to communicate via rs232 with an extarnal device called smartmouse. I write the exact line that i want , but when i read i read...
by: chenatcr | last post by:
Hello, I added a serial-USB converter to my laptop, it appear as USB serial port COM4, and I wrote an application to read 78k data from this port. In my VC++ express code, I defined...
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when...
by: ghjk | last post by:
I want to read sms from GSM modem using C# in serial communication. I wrote the code. But i want to do it automatically. I put my code here and please tell me how can i do it automatically. ...
by: ghjk | last post by:
I'm write code to read data from GSM modem. but it couldn't read modem response. Could you please help me? I'll post my code. using System; using System.Collections.Generic; using...
by: mmrasheed | last post by:
Hi, I am newbie in python. I am working on Telit GM862 GPS/GPRS module which has python interpreter built in. But it seems this problem is pretty much related to general python structure. I...
by: rfarley | last post by:
Hi, I am using the pyserial module and am trying to read the serial port from an accelerometer (LIS302DL). It has an option in which you write "*debug\r\n" and then you read the data (three...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.