Results 1 to 2 of 2

Thread: read from serial port

  1. #1

    read from serial port

    I have to count pulses that come through the serial port.
    I found a lot of info about reading characters, but that doesn't work.
    In windows C++ there is the function waitforsingleobject(). Does something like that exist in linux C++?


  2. #2
    Associate
    Join Date
    Dec 2002
    Posts
    13

    Re:read from serial port

    Maybe the select() function is what you are looking for.
    Use it to monitor the file in /dev that corresponds to you serial port (probably /dev/ttyS0). See "man select".

Similar Threads

  1. Reading and writing to the serial port
    By CP in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 06-05-2004, 05:07 AM
  2. Serial port doesn't seem to be working
    By Lixus Looser in forum Linux - General Topics
    Replies: 6
    Last Post: 03-25-2004, 05:13 PM
  3. USB and Serial Port Problems + Dual Boot Question
    By Lixus Looser in forum Linux - Hardware, Networking & Security
    Replies: 18
    Last Post: 01-19-2004, 11:54 PM
  4. Serial Port
    By mugs in forum Linux - Hardware, Networking & Security
    Replies: 17
    Last Post: 06-24-2002, 04:57 AM
  5. Multiple Serial Port cards
    By zipman in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 02-27-2002, 06:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •