Re: Serial port programming problems

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Neil O'Brien
Date: Sunday, May 2, 2010 - 12:33 am

On Sat, May 01, 2010 at 15:30:28 -0700, J.C. Roberts wrote:

I made that substitution and added a
#define DEBUG 1

The resulting binary sometimes fails to return and I then have to
hit ctrl-c.  I've tried it several times, and not seen any (repeating)
pattern in terms of when it works and when it fails.

Here's some typical output:

# grep TCSA ex_obsd_flush.c
 status = tcsetattr(fd, TCSAFLUSH, &options);
# cc -Wall -o ex_obsd_flush ex_obsd_flush.c
# time ./ex_obsd_flush
Port has been opened and set up
1 bytes available, read: 6
    0m1.21s real     0m0.00s user     0m0.00s system
# time ./ex_obsd_flush
Port has been opened and set up
^C    0m6.07s real     0m0.00s user     0m0.00s system

# time ./ex_obsd_flush
Port has been opened and set up
^C    0m7.49s real     0m0.00s user     0m0.00s system

# time ./ex_obsd_flush
Port has been opened and set up
1 bytes available, read: 6
    0m1.21s real     0m0.00s user     0m0.00s system

Following this I had two more failures, one success, one failure and
one success in that order.

--
Neil
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Serial port programming problems, Neil O'Brien, (Sat May 1, 12:59 pm)
Re: Serial port programming problems, Neil O'Brien, (Sun May 2, 12:33 am)
Re: Serial port programming problems, Aaron Mason, (Sun May 2, 3:56 am)
Re: Serial port programming problems, Neil O'Brien, (Sun May 2, 8:45 am)
Re: Serial port programming problems, J.C. Roberts, (Sun May 2, 12:01 pm)
Re: Serial port programming problems, J.C. Roberts, (Sun May 2, 2:29 pm)