LinuxQuestions.org
Visit Jeremy's Blog.
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 03-20-2013, 09:34 AM   #1
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Rep: Reputation: 0
Question Unmout web cam without disconnecting


I have a Logitech web cam (usb) connected to my ubuntu 12.04 OS. I also use a virtualization program (VBox) to run another(guest) OS. Now, I want to use the web cam in my guest OS, and in order to do this, I need to "unmount"(without physically disconnecting) the camera from the host OS, so that the guest OS would be able to capture and mount. What are the commands to: (1) identify the camera in the hardware devices, and (2) unmount or unattach the camera from the host (Ubuntu) system?. Thanks for the help.
 
Old 03-20-2013, 12:39 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
I need to "unmount"(without physically disconnecting) the camera from the host OS, so that the guest OS would be able to capture and mount.
Not at all necessary. Bring up v-box. Go into Settings - USB and add a filter. I added the vendor ID and
Product ID numbers, and added the manufacturers name in that field. You can get the Vendor ID and Product ID from a lsusb command in a command prompt in ubuntu. The line will look something like this:

Quote:
Bus 002 Device 005: ID 046d:0870 Logitech, Inc. QuickCam Express
046d is the vendor field, and 0870 is the product field.

Once that is added, go to the Devices drop down and the top, click USB devieces, and make sure there is a check beside the web cam. My guest is Win XP. XP detected the new hardware, added the driver, and in the control panel, I clicked on Scanners and Cameras, ran the wizard and took a picture. I'm sure any other web cam app will work with it now.

It should not matter what your guest is, you should only need to make a filter, so you can pass the device over to the guest. What you do in the guest will depend on what your guest system is.
 
Old 03-21-2013, 08:31 AM   #3
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
camorri:

Quote:
Bring up v-box. Go into Settings - USB and add a filter. I added the vendor ID and
Product ID numbers, and added the manufacturers name in that field. You can get the Vendor ID and Product ID from a lsusb command in a command prompt in ubuntu.
I did all that. My problem is that when I go to Devices > USB ports and try to select the device I filtered, I get a message saying the device is busy, or used by another (the host). That is why I want to know the Linux command to turn OFF/ON (deactivate/activate) a connected device.
 
Old 03-21-2013, 08:47 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Did you install Guest Additions?

What version of v-box?

Quote:
That is why I want to know the Linux command to turn OFF/ON (deactivate/activate) a connected device.
There isn't one. Only thing that will own a device, is an application. So, what are you running on the device?
 
Old 03-22-2013, 03:22 PM   #5
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camorri View Post
Did you install Guest Additions?

What version of v-box?



There isn't one. Only thing that will own a device, is an application. So, what are you running on the device?
I'm running the latest version of VBox and, yes, I installed the extensions and the guest additions. I'm not running any app on the device. It's just connected. The application to use the device will run on the guest OS.
 
Old 03-23-2013, 08:31 AM   #6
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Have you got gtk-lshw installed ? Its an application that shows hardware information, driver information, in a nice format.

You can run, in a konsole as root, the command 'gtk-lshw' to launch the application. If you get 'command not found' that means you do not have it installed. Go into your package manager, and see if its available. It is for most distros. Install it, run it, and post the information for the web cam. This is what it will look like, your device is probably different than mine.

Quote:
Generic USB device
/0/2/1/6


product: Camera [46D:870]
vendor: Logitech, Inc. [46D]
bus info: usb@2:6
version: 1.00
capabilities:
USB 1.1
configuration:
driver: STV06xx
maxpower: 90mA
speed: 12Mbit/s
 
Old 03-24-2013, 12:12 PM   #7
williepabon
Member
 
Registered: May 2007
Location: Florida, USA
Distribution: Ubuntu
Posts: 96

Original Poster
Rep: Reputation: 0
camorri:

Finally, I was able to have the guest OS (Ubuntu) to recognize the camera, as you can see when I run lsusb on a terminal.

Quote:
Bus 001 Device 002: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000
But still it is not working. Someone suggested that I need to install drivers for it, but this camera has been working flawlessly on another Ubuntu 12.04 (not virtualized) and I didn't install any drivers.

I couldn't get the command gtk-lshw, but I could run sudo lshw, but doesn't show the same info. Any suggestion will be welcomed. Thanks.
wp
 
Old 03-24-2013, 12:55 PM   #8
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Quote:
But still it is not working. Someone suggested that I need to install drivers for it, but this camera has been working flawlessly on another Ubuntu 12.04 (not virtualized) and I didn't install any drivers.
If the camera was plugged in to the system when you installed, the kernel module probably was detected and loaded.

Open a konsole in the host system, where it works. As root run the command 'lsmod | grep stv*' and I think you will see some lines of output.

On my web cam I see :

Quote:
lsmod | grep stv*
pci_stub 1373 1
gspca_stv06xx 20592 0
gspca_main 20211 1 gspca_stv06xx
usb_storage 43916 0
I suspect your driver will be something like 'gspca_stv0900' or very close to that.

On the guest system, you can try 'modprobe gspca_stv0900' ; adjust the the name to match what you find with the lsmod command. You need a driver for the web cam to operate.

This link shows a way to figure out the web cam, and driver.

-->http://nixbits.net/wiki/Webcams_for_linux
 
  


Reply

Tags
virtual box, webcam



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
Embed web cam images in web page secondhandman Linux - Newbie 1 06-30-2012 08:46 PM
A A One web cam........ snowshow Linux - Newbie 2 06-09-2009 03:41 PM
would like to play aMSN web cam sessions (.cam extension) using external program Gogul Linux - Software 5 09-17-2006 08:51 AM
Web Cam jtapiaRedHat Linux - Newbie 2 02-16-2006 06:57 AM
web cam and web cam server citrus Linux - General 2 03-24-2004 09:28 PM

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

All times are GMT -5. The time now is 03:08 AM.

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