LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-16-2011, 04:57 PM   #1
EricNZ
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
Ubuntu - How to determine which process has /dev/ttyUSB0 port open?


I'm developing a serial port application under Lazarus using the SunaSer code library.

The application reports an error indicating that "the Port is opened by another process".

What command can I execute in a Terminal session to determine what process has the USB-serial port open?

Eric
 
Old 01-16-2011, 05:15 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
does
Code:
lsof | grep USB0
work?
 
Old 01-16-2011, 05:19 PM   #3
savotije
Member
 
Registered: Oct 2010
Location: Serbia (Europe)
Distribution: Slackware 13.1
Posts: 97

Rep: Reputation: 6
Or just:

Code:
lsof  /dev/ttyUSB0

Last edited by savotije; 01-16-2011 at 05:22 PM.
 
Old 01-16-2011, 05:39 PM   #4
EricNZ
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
Checking which process has /dev/ttyUSB0 open

Neither command produces any output in Terminal (in fact I had previously submitted the lsof command but couldn't see any mention of the port in question).

I guess I'll just have to review the source of the library code to clarify what exactly triggers the exception ...

Thanks for the responses.

Last edited by EricNZ; 01-16-2011 at 05:46 PM.
 
Old 01-16-2011, 05:51 PM   #5
savotije
Member
 
Registered: Oct 2010
Location: Serbia (Europe)
Distribution: Slackware 13.1
Posts: 97

Rep: Reputation: 6
That means that No process has opened file /dev/ttyUSB0.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/dev/ttyUSB0 permissions joegumbo Slackware 6 03-11-2013 05:23 PM
[SOLVED] How to define /dev/ttyUSB0? MrCode Linux - General 3 04-04-2010 04:39 PM
Failed to open device /dev/usb/ttyUSB0: No such device efm Linux - Newbie 2 04-04-2005 08:46 PM
/dev/ttyUSB0 and permissions mrsolo Linux - Software 1 11-14-2004 03:24 PM
/dev/ttyUSB0 js72 Linux - Networking 1 01-05-2003 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration