To: | |
---|---|
Subject: | Re: [ts-7000] not able to read data through com2 in TS7200 |
From: | "Alvaro Aguirre" <> |
Date: | Sat, 18 Nov 2006 16:38:27 -0300 |
Sonia: I don't mean to be rude but unless you know what you are doing we can't help you fixing your code every time because you are the only person who knows what you really need. I can send you code to open the serial port and read it but if you need to read the serial port do you know where to stop? at a new line? at a specific number of characters? blocking? nonblocking? You must understand and code what do you really need. You can use: -The Linux Documentation Project -Language C from K&R - http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/pdf/Serial-Programming-HOWTO.pdf -http://www.easysw.com/~mike/serial/serial.html In the case of the code you send you are checking the amount of data waiting on the serial port with ioctl, and you code EXPLICITLY ioctl(fd,FIONREAD, &count); if(count <= 0) return 0; And that's why you are getting: "the error is : 0"... as you code. If you need further guidance you can write me directly to my email and I'll do everything I can. Cheers, Alvaro On 11/18/06, soniathakur3 <> wrote:
|
<Prev in Thread] | Current Thread | [Next in Thread> |
---|---|---|
|
Previous by Date: | Re: [ts-7000] Using the DIO pins., Alvaro Aguirre |
---|---|
Next by Date: | [ts-7000] Re: Update Debian on USB, chentom60 |
Previous by Thread: | [ts-7000] not able to read data through com2 in TS7200, soniathakur3 |
Next by Thread: | [ts-7000] Re: not able to read data through com2 in TS7200, soniathakur3 |
Indexes: | [Date] [Thread] [Top] [All Lists] |
Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU