pwc
[Top] [All Lists]

Re: [pwc] How to turn of LED at Startup

To: Philips Webcam Linux Driver <>
Subject: Re: [pwc] How to turn of LED at Startup
From: Patrik Jakobsson <>
Date: Fri, 29 Jul 2005 02:17:56 +0200
Dominik Pusch wrote:

Hi,
after booting the kernel, the LED of my Philips PCVC740K is on. When I load the pwc-module 'modprobe pwc leds=0,0', it stays on. When I start a v4l Application like mplayer, it still stays on. Firstly when I exit mplayer, the LED is turned off. When I start mplayer again, it stays off (fine! That's what I want). But I like to have LED status off directly after booting my system. Is there a way to do this?

Thanks in advance and excuse my horrible english,
Dominik (from germany)
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc


Guten tag

The driver doesn't seem to handle the led on some of the cameras. I can't find the spot where the led gets turned on and off since it's probably done by accident.

If you simply open the device and close it again the led will get turned off (at least that works for me). Try this program I've just made:

/* Compile with:
                gcc -o pwc-led-off pwc-led-off.c
*/
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

int main(int argc, char *argv[])
{
       char file[255];
       int num = 0;
       if (argc > 1)
               num = atoi(argv[1]);
       sprintf(file, "/dev/video%d", num);
       int fd = open(file, O_RDONLY);
       close(fd);

       return 0;
}

The first argument should be the minor number of the camera (defaults to 0 if not specified).
Put the program in your bootscript and you're ready to go.

   Patrik Jakobsson
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU