checking if serial buffer has waiting char?

checking if serial buffer has waiting char?

Post by Emarit Ra » Mon, 17 Mar 1997 04:00:00



        I am writing an application where I need to read bytes off a
        serial port.  No problem so far, but the only I way I know
        when to read is if there is a character waiting at the serial
        port buffer.  Is there a function I can use to check to see
        if there is a char waiting to be read at the port?
        It looks like select() is what I want, but I cannot figure
        out how to use it.

        Thanks a lot.

--

        Electrical Engineering,         All generalizations are bad.
        Colorado State University                  Who is John Galt?
        _._  __.  _____  _._.  __._

 
 
 

1. ?? Modem sends ~15 chars, wait 30s, 15 chars, wait 30s...??

I've got my modem (Cardinal 336 int) sending & receiving chars, dialing,
etc.  But using either chat or minicom, chars are sent & received VERY
slowly.  For example, if I send

    ATZ^M

It takes about 30 seconds to see the OK response.  On longer strings, I
send/receive about 15 chars, pause about 30 seconds, send about 15 more
chars, ....  Any ideas on what's going on?

Wayne
__________________

Caliber Technology
Payroll Withholding Tax Updates
http://www.taxupdate.com/software

2. RS6000 keyboard port broken on motherboard

3. raw char * buffer to char * printable string conversion issue

4. sound/video

5. fork,exec and wait and wait and wait and wait

6. Allocated swap less than allocated partition

7. remove first 3 chars of a string && set IFS to newline

8. ========= SUCCESS =========================

9. Telnet wait & wait & wait &....

10. char *strcasestr(char *haystack, char *needle) a simple case independent strstr()

11. Outputing IFS characters on a serial-line

12. How to read chars from stdin without having to press <enter>

13. reading a single char without waiting for ENTER...