LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Unmout web cam without disconnecting (https://www.linuxquestions.org/questions/ubuntu-63/unmout-web-cam-without-disconnecting-4175454854/)

williepabon 03-20-2013 09:34 AM

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.

camorri 03-20-2013 12:39 PM

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.

williepabon 03-21-2013 08:31 AM

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.

camorri 03-21-2013 08:47 AM

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?

williepabon 03-22-2013 03:22 PM

Quote:

Originally Posted by camorri (Post 4915974)
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.

camorri 03-23-2013 08:31 AM

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

williepabon 03-24-2013 12:12 PM

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

camorri 03-24-2013 12:55 PM

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


All times are GMT -5. The time now is 06:16 PM.