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: Sandy McArthur <>
Date: Thu, 28 Jul 2005 20:39:56 -0400
Seems to me that installing setpwc and calling:

setpwc -k 0 -l 100  /dev/videoX

would do the same and explicitly turn off the led instead of hoping for a side effect.

On Jul 28, 2005, at 8:17 PM, Patrik Jakobsson wrote:

Dominik Pusch wrote:

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?
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.

--
Sandy McArthur

"He who dares not offend cannot be honest."
- Thomas Paine

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
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