
Para saber el tipo de cámara teclea este comando en un terminal:
lsusb
Básicamente, cualquier cámara del tipo 0c45:XXXX es probablemente una microdia, por ejemplo ID 0c45:624f Microdia. Algunas de estas cámaras están soportadas por los controladores SN9C1xx (libre) y SN9Cxxx (no libre). Se puede encontrar información sobre estos controladores y las cámaras soportadas en http://www.linux-projects.org.
Aquí se describe la instalación de un controlador libre que trata de dar soporte a todas las cámaras Microdia. Puedes obtener más información en el sitio web del proyecto. Para saber si funcionará con tu cámara consulta la lista de cámaras soportadas.
[editar] Instalación
Para instalar el controlador se necesita un entorno de programación adecuado y soporte básico para el sistema de control de versiones GIT:
sudo apt-get install build-essential linux-headers-$(uname -r) git-core curl
Ahora es sencillo obtener el código fuente del repositorio GIT:
git clone http://repo.or.cz/r/microdia.git
Hay que acceder al directorio creado:
cd microdia
Y compilar el código:
Imagen:Clip.png No uses $ sudo make ni # make. En este punto no se necesitan privilegios de administrador y usarlos puede causar más adelante una cadena interminable de problemas.
make
Posiblemente se obtenga un mensaje de error como éste:
make: ctags: No se encontró el programa
make: *** [ctags] Error 127
Se debe a que al módulo no se encuentra en la ubicación esperada (todavía) y no significa que haya ningún problema.
Conviene eliminar los símbolos de depuración (como su propio nombre indica únicamente son necesarios para depurar errores).
strip -g sn9c20x.ko
Para instalar el módulo hay que copiarlo al directorio de módulos del núcleo (el primer comando devolverá un error si el directorio ya existe, en cualquier caso continúa con el siguiente comando)
sudo mkdir -p /lib/modules/$(uname -r)/kernel/drivers/media/video/usbvideo/
sudo cp sn9c20x.ko /lib/modules/$(uname -r)/kernel/drivers/media/video/usbvideo/
Reconstruir las dependencias entre módulos
sudo depmod -a
Y finalmente cargarlo con modprobe
sudo modprobe sn9c20x
Para probar la cámara puedes usar Cheese, Ekiga o la mayoría de los otros programas que funcionan con webcams. Para que funcione con Camorama y otros programas que no soportan Video for Linux 2 (vfl2) consulta las instrucciones originales de la web del proyecto (en inglés).
Tras una actualización del núcleo (kernel) posiblemente se produzca un error "bad module format" al intentar cargar el módulo microdia, en ese caso es necesario volver a compilar el módulo.
Troubleshooting insmod errors
# insmod sn9c20x.ko
insmod: error inserting 'sn9c20x.ko': -1 File exists
A similar module is was already loaded into the kernel and needs to be removed first. To find out which model that is, do:
$ lsmod | grep sn9c20x
Something like this should show up:
gspca_sn9c20x 31616 0
gspca_main 26816 1 gspca_sn9c20x
From which you can then figure out the module name (gspca_sn9c20x in my case) and replace it with the new module like so:
$ sudo rmmod gspca_sn9c20x
$ sudo insmod snc9c20x.ko
Remember to type that from within the git cloned microdia directory or else it will fail. You can now check to see if the module is loaded:
$ lsmod | grepsn9c20x
# insmod sn9c20x.ko
insmod: error inserting 'sn9c20x.ko': -1 Unknown symbol in module
See the output of #dmesg
The last few lines would be complaints about missing symbols, depending upon whats missing you may not have loaded the modules that module depends on,
So it failed with those error messages. You would need to modprobe for that module's dependencies
Try:
# sudo modprobe videodev
# sudo modprobe compat-ioctl32
then
# sudo insmod sn9c20x.ko
If still you get errors on #insmod, perhaps you have had a recent kernel update.
Update a the lists the dependencies for every module.
# depmod -a
# m-a update,prepare
You may also need to regenerate kernel initrd image (really).
insmod: error inserting './sn9c20x.ko': -1 Invalid module format
Possible Reason
"The gcc which compiled the kernel and
the gcc which compiled the module are incompatible."
Possible Solution
Install an older gcc side-by-side, and change cc environment variable to use older version.
Possible Solution
Reinstall the kernel image using
#apt-get install --reinstall linux-image-`uname -r`
Possible Reason 2
This happened to me(may be more people) when ubuntu Jaunty was upgdated with a 2.6.28-14-generic
kernel.
If your dmesg says something like:
microdia: Unknown symbol video_devdata
The videodev module needs to be loaded.
Possible Solution
modprobe videodev
insmod sn9c20.ko (from the directory where you have this file, i.e, where you compiled it)
FIXME: more possibilities
# insmod sn9c20x.ko
insmod: error inserting 'sn9c20x.ko': -1 File exists
A similar module is was already loaded into the kernel and needs to be removed first. To find out which model that is, do:
$ lsmod | grep sn9c20x
Something like this should show up:
gspca_sn9c20x 31616 0
gspca_main 26816 1 gspca_sn9c20x
From which you can then figure out the module name (gspca_sn9c20x in my case) and replace it with the new module like so:
$ sudo rmmod gspca_sn9c20x
$ sudo insmod snc9c20x.ko
Remember to type that from within the git cloned microdia directory or else it will fail. You can now check to see if the module is loaded:
$ lsmod | grepsn9c20x
# insmod sn9c20x.ko
insmod: error inserting 'sn9c20x.ko': -1 Unknown symbol in module
See the output of #dmesg
The last few lines would be complaints about missing symbols, depending upon whats missing you may not have loaded the modules that module depends on,
So it failed with those error messages. You would need to modprobe for that module's dependencies
Try:
# sudo modprobe videodev
# sudo modprobe compat-ioctl32
then
# sudo insmod sn9c20x.ko
If still you get errors on #insmod, perhaps you have had a recent kernel update.
Update a the lists the dependencies for every module.
# depmod -a
# m-a update,prepare
You may also need to regenerate kernel initrd image (really).
insmod: error inserting './sn9c20x.ko': -1 Invalid module format
Possible Reason
"The gcc which compiled the kernel and
the gcc which compiled the module are incompatible."
Possible Solution
Install an older gcc side-by-side, and change cc environment variable to use older version.
Possible Solution
Reinstall the kernel image using
#apt-get install --reinstall linux-image-`uname -r`
Possible Reason 2
This happened to me(may be more people) when ubuntu Jaunty was upgdated with a 2.6.28-14-generic
kernel.
If your dmesg says something like:
microdia: Unknown symbol video_devdata
The videodev module needs to be loaded.
Possible Solution
modprobe videodev
insmod sn9c20.ko (from the directory where you have this file, i.e, where you compiled it)
FIXME: more possibilities
1 comentarios:
copy and paste nada mas
Publicar un comentario