ts-7000
[Top] [All Lists]

RE: [ts-7000] Re: None of the serial port s are detected.

To:
Subject: RE: [ts-7000] Re: None of the serial port s are detected.
From: "Michael Schmidt" <>
Date: Sun, 27 Jul 2008 13:49:48 -0700 (MST)
On Sat, July 26, 2008 10:43 am, Jegan Bose Vincent wrote:
...
> the program is hanging for ever in the C read(FD,
> buffer, length) library call. Here is a tailored version of my
> application,
> any suggestion is greatly appreciated. Time is running out on my end, I
> need
> to make a suggestion to the bosses on the board selection.
>
> ::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NDELAY );
>
> //I tried this too
> //::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NONBLOCK );
>
> //I tried this too
> //::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY);
>
> And I tried many combinations.

You are most likely having problems because you aren't calling the termios
functions to set up the port.  The default probably has a VMIN or such
parameter that is causing read() to block.  There is some sample code
here:
ftp://ftp.embeddedARM.com/tmp/term.c
which has a function you can call to set up the serial port in raw mode;
you might see if calling it after open() fixes your problem.  I would also
recommend calling select() to wait for data and only calling read() when
data is available.

 ______   Best Regards,
|__  __/                  Michael Schmidt
   ||                   Software Engineer
   ||echnologic Systems (EmbeddedARM.com)
   || (480)    16610 East Laser Drive #10
   |/ 837-5200   Fountain Hills, AZ 85268
       http://oz.embeddedarm.com/~michael


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

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