Find the answer to your Linux question:
Results 1 to 5 of 5
Dear All, I'm writing a C program to access my simple serial device through RS232. My program is working fine with my device. But if the serial port is already ...
  1. #1
    Just Joined!
    Join Date
    Feb 2010
    Posts
    2

    Thumbs up how to identify the status of serial port (Port already opened)

    Dear All,

    I'm writing a C program to access my simple serial device through RS232. My program is working fine with my device. But if the serial port is already opened by some other application, i couldn't able to identify that from my C program.

    How can i get the status of that serial port as "Port Already Opened"

    Thanks for your valuable suggestions.

    Regards,
    Rajmohan

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    I think you can do that, but I'm not sure what the function is - memory fault... I'll see if I can dig it up in the meantime, unless someone else does first.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    This is a very old problem that has only been solved through the cooperative use of lock files. See the Serial HOWTO, Chapter 14, for details.
    --- rod.
    Stuff happens. Then stays happened.

  4. #4
    Just Joined!
    Join Date
    Feb 2010
    Posts
    2
    can you send me the link pls

  5. #5
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    No. My post count is too low to post links. Google can find it easily.
    --- rod.
    Stuff happens. Then stays happened.

Posting Permissions

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