Loading ...
Sorry, an error occurred while loading the content.

Logitech Quickcam 3/4000 USB WebCam on NSLU2 w/Unslung linux -- setup notes

Expand Messages
  • Jack Kozik
    I needed to setup a webcam for my weather website. I choose to use an NSLU2 connected to a Logitech Quickcam 3000/4000, where the NSLU was loaded with the
    Message 1 of 5 , Nov 29, 2006
    View Source
    • 0 Attachment

      I needed to setup a webcam for my weather website. I choose to use an NSLU2 connected to a Logitech Quickcam 3000/4000, where the NSLU was loaded with the unslung linux software distribution. My weather software wants to get a webcam jpg image from an http-cgi URL.

      This document captures the steps I followed to get this to work, initially for my records, but also, on the chance that it could benefit others. Most of the work was involving setting up of the Linux on the nslu, thus I chose this forum for my writeup.

      Background:

      - I want to put the weather webcam in a window with a the best view of the weather.
      - None of my home PCs are close enough to practically run a USB cable
      - LAN connectivity mostly ok. My house has several rooms wired w/CAT5
      - I have had two Wifi webcams.
        - They both failed after a couple of months of use (they run hot!)
        - I have tried a couple of webcams 
          that have "web servers" running in them
        - They want to have their own ActiveX controls running
          on in a web browser
        - Don't easily work with common webcam software
      - I have bought and returned a few different webcam solutions over the last 2 years.
      - I have experience with QC3000/QC4000 (basement sump pump monitors.) Very relabile. Image quality good enough.
      - I'll drop all of this if I can find a good solution under $300. The $600+ solutions are fantasic; just too expensive for me.

       

      Summary of steps I followed

      - Starting with a stock NSLU2
      - Load the Unslung firmware onto the NSLU2
      - Unsling the NSLU2, that is
       
      - Run a procedure that copies the root file system of the NSLU2
       
      - To an external thumb drive
       
      - The NSLU2 still behaves like a stock NSLU2, but it now has room to download linux pakages

      - Install ssh and get PC<->NSLU file transfer working (WinSCP)
      - Install NTP client (NSLU2 clock drifts really bad, don't know why)
      - Copy the webcam drivers/utilities from yahoo nslu2-linux group
        to NSLU2
      - Install image libraries
      - Create a couple scripts: quickcam.cgi and rc.local
      - Plug in the Quickcam into the USB socket not used
        by the thumb drive
      - Verify that http://mynslu/quickcam.cgi returns a webcam image

      It's actually simpler than it sounds and the existing references and HOWTOs were a big help. I was able to avoid doing kernal builds and retain the Unslung environment (my comfort zone).

       

      References:

      Unslung Firmware README file (use wordpad to read)
      - http://download.berlios.de/unslung/Unslung-6.8-beta-README.txt

      NSLU Wiki
      - http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam
      - http://www.nslu2-linux.org/wiki/HowTo/UseALogitechQuickcamMessenger

      Yahoo NSLU2 Group
      - http://tech.groups.yahoo.com/group/nslu2-linux/

      NSLU Message Forum
      - www.nslu2-info.de  (In German)

      Unslung addon packages (use the ipkg command)
      - http://www.nslu2-linux.org/wiki/Unslung/Packages

      Write Unslung scripts that execute on reboot.
      - http://www.nslu2-linux.org/wiki/Unslung/DiversionScripts

      Webcam PWC WIKI
      - http://www.lavrsen.dk/twiki/bin/view/PWC/FrequentlyAskedQuestionsPWC

      Linux WEB cam Howto
      - http://www.linux.com/howtos/Webcam-HOWTO/hardware.shtml

      Phillips Web Cam (pwc) drivers for QC 3000/4000
      - http://www.saillard.org/linux/pwc/1G

      NTP Client Howto
      - http://www.nslu2-linux.org/wiki/Optware/Ntpclient?from=Unslung.Ntpclient

      SSH support - Dropbear
      - http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess

       

      With thanks to the experts on this message board.

      Respectfully submitted,
      JK

       

       

      * * DETAILED SETUP NOTES * *

      Load the Unslung firmware onto the NSLU2

      I used the Unslung 6.8 beta download located at
      - http://www.slug-firmware.net/u-dls.php

      Unsling the NSLU2

      I followed the README. Lots of steps. Some steps I had to try more than once. Besure to test the back-out procedure and test that everything cycles sanely after a reboot. I probably rebooted 3 or 4 times through out the process... not bad, just part of the process.

       

      --------------------------
      Install ssh and get PC<->NSLU file transfer working (WinSCP)

      You want to get sshd running as soon as possible. The telnet access is not as convenient, and PC software like WinSCP make it really easy to copy files to/from the NSLU2. I ran the following two commands on the NSLU (over telnet):

      # ipkg update
      # ipkg install dropbear

      There's lot of fancy updating and tailoring you can do, but the default settings worked just fine for me. I use both putty and WinSCP to talk to the NSLU. From now on, I can get an NSLU linux prompt ("#" in the following text) by running putty.

       

      ------------------
      Install NTP client (typing commands into a putty window running on my PC)

      # ipkg install ntpclient

      Create the file diversion script
      file - /unslung/rc.rstimezone
      #!/bin/sh
      /usr/sbin/Set_TimeZone >/dev/null
      if [ -x /opt/bin/ntpclient ]; then
        /opt/bin/ntpclient -h pool.ntp.org -s >/dev/null
        /usr/sbin/hwclock --systohc >/dev/null
      fi
      return

      Update the Crontab file - /etc/crontab
      0 0 * * * root /usr/sbin/WatchDog &>/dev/null
      #1 * * * * root /usr/sbin/hwclock -s &>/dev/null
      11 * * * * root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null
      12 * * * * root /usr/sbin/hwclock --systohc &>/dev/null

       

      ----------------------
      Copy the webcam drivers/utilities from yahoo nslu2-linux group to NSLU2
      - http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executables/

      setpwc -> /opt/bin
      vidcat -> /opt/bin
      pwc.o -> /opt/lib/modules
      videodev.o -> /opt/lib/modules

      I used WinSCP to copy the files from my PC to the NSLU. I set setpwc and vidcat to executable.

      Make the video device and set permissions (copied from the HOWTO verbatium, thanks Geert)

      # mknod /dev/video0 c 81 0
      # mkdir /dev.state
      # mknod /dev.state/video0 c 81 0
      # chown admin.everyone /dev/video0
      # chown admin.everyone /dev.state/video0
      # chmod g+w /dev/video0
      # chmod g+w /dev.state/video0

      Install the drivers
      # cd /opt/lib/modules (mkdirs)
      # /sbin/insmod videodev.o
      # /sbin/insmod pwc.o

       

      ----------------------
      Install image libraries

      At the NSLU ssh/putty Linux prompt:
      # ipkg install libjpeg
      # ipkg install libpng
      # ln -s /opt/lib/libjpeg.so.62.0.0 /lib/libjpeg.so.62
      # ln -s /opt/lib/libpng.so.3.12.0 /lib/libpng.so.3
      # ln -s /opt/lib/libz.so.1.2.3 /lib/libz.so
      # /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o /share/hdd/test.jpg

      at your PC verify the webcam image displays in windows explorer at the following network share:

      \\nslu2\ADMIN 2\share\hdd

      The command setpwc -x is useful for debugging. The above "ln" commands are an interesting compromise; I found this in the www.nslu2-info.de message board. I suppose there might be a better way of fixing library locations for the image packages, but this was easy, works, and helped me avoid having to learn more about the image package architectures.

       

      ---------------------
      Create a couple of scripts

      Create a diversion script that re-installs the video modules on reboot
      file - /share/flash/data/unslung/rc.local
      #!/bin/sh
      cd /opt/lib/modules
      /sbin/insmod videodev.o
      /sbin/insmod pwc.o

      Create a cgi shell script to return a jpg. Note this takes advantage of the NSLU's existing httpd.
      file - /home/httpd/html/quickcam.cgi
      #!/bin/sh
      /opt/bin/qc quickcam.jpg > /dev/null
      echo -e "Content-type: image/jpeg\r"
      echo ""
      cat quickcam.jpg

      Create a script that shortens the vidcat command line (helpful for debugging)
      file - /opt/bin/qc
      #! /bin/sh
      /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o $1

      chmod 755 /opt/bin/qc
        /home/httpd/html/quickcam.cgi
        /share/flash/data/unslung/rc.local

      -------------------------
      Verify that http://mynslu/quickcam.cgi returns a webcam image
      in your PC's browser. I have tested this cgi within Image Salsa. It should also be verified inside of wdisplay's webcam infrastructure.

       

       

       

       

       

       

    • leguani
      Dear Jack, I came across your post about the webcam on the nslu2. It followed your steps exactly, but somehow, the following lines end up in my messages file,
      Message 2 of 5 , Jan 13, 2007
      View Source
      • 0 Attachment
        Dear Jack,

        I came across your post about the webcam on the nslu2.
        It followed your steps exactly, but somehow, the following lines end
        up in my messages file, so the driver is not associated with my webcam:

        <46>Jan 14 16:18:25 klogd: Linux video capture interface: v1.00
        <46>Jan 14 16:18:31 klogd: pwc Philips webcam module version 9.0.1 loaded.
        <46>Jan 14 16:18:31 klogd: pwc Supports Philips PCA645/646,
        PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
        <46>Jan 14 16:18:31 klogd: pwc Also supports the Askey VC010, various
        Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
        <46>Jan 14 16:18:31 klogd: pwc the Creative WebCam 5 & Pro Ex, SOTEC
        Afina Eye and Visionite VCS-UC300 and VCS-UM100.
        <46>Jan 14 16:18:31 klogd: usb.c: registered new driver Philips webcam
        <46>Jan 14 16:24:11 klogd: hub.c: new USB device 00:01.0-1, assigned
        address 2
        <44>Jan 14 16:24:11 klogd: Device descriptor:8 bytes received.
        <44>Jan 14 16:24:11 klogd: Device descriptor:18 bytes received.
        <44>Jan 14 16:24:11 klogd: usb.c: USB device 2 (vend/prod 0x5a9/0x518)
        is not claimed by any active driver.

        The webcam I have is supported by pwc.

        Do you have any idea what the problem can be?

        I'll add some debug information:

        #dmesg | less

        Linux video capture interface: v1.00
        pwc Philips webcam module version 9.0.1 loaded.
        pwc Supports Philips PCA645/646, PCVC675/680/690,
        PCVC720[40]/730/740/750 & PCVC830/840.
        pwc Also supports the Askey VC010, various Logitech Quickcams, Samsung
        MPC-C10 and MPC-C30,
        pwc the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite
        VCS-UC300 and VCS-UM100.
        usb.c: registered new driver Philips webcam
        hub.c: new USB device 00:01.0-1, assigned address 2
        Device descriptor:8 bytes received.
        Device descriptor:18 bytes received.
        usb.c: USB device 2 (vend/prod 0x5a9/0x518) is not claimed by any
        active driver.

        # lsmod
        Module Size Used by Tainted: P
        pwc 44788 0 (unused)
        videodev 4360 0 [pwc]
        ufsd 164872 0 (unused)
        x1226-rtc 3664 0
        rbuttons 1304 0 (unused)
        pbuttons 800 0 (unused)
        ixp425_eth 17116 0 (unused)
        ixp400 608216 0 [ixp425_eth]

        Thanks in advance!


        --- In nslu2-linux@yahoogroups.com, "Jack Kozik" <jackkozik@...> wrote:
        >
        >
        > I needed to setup a webcam for my weather website. I choose to use an
        > NSLU2 connected to a Logitech Quickcam 3000/4000, where the NSLU was
        > loaded with the unslung linux software distribution. My weather software
        > wants to get a webcam jpg image from an http-cgi URL.
        >
        > This document captures the steps I followed to get this to work,
        > initially for my records, but also, on the chance that it could benefit
        > others. Most of the work was involving setting up of the Linux on the
        > nslu, thus I chose this forum for my writeup.
        >
        > Background:
        >
        > - I want to put the weather webcam in a window with a the best view of
        > the weather.
        > - None of my home PCs are close enough to practically run a USB cable
        > - LAN connectivity mostly ok. My house has several rooms wired w/CAT5
        > - I have had two Wifi webcams.
        > - They both failed after a couple of months of use (they run hot!)
        > - I have tried a couple of webcams
        > that have "web servers" running in them
        > - They want to have their own ActiveX controls running
        > on in a web browser
        > - Don't easily work with common webcam software
        > - I have bought and returned a few different webcam solutions over the
        > last 2 years.
        > - I have experience with QC3000/QC4000 (basement sump pump monitors.)
        > Very relabile. Image quality good enough.
        > - I'll drop all of this if I can find a good solution under $300. The
        > $600+ solutions are fantasic; just too expensive for me.
        >
        >
        >
        > Summary of steps I followed
        >
        > - Starting with a stock NSLU2
        > - Load the Unslung firmware onto the NSLU2
        > - Unsling the NSLU2, that is
        > - Run a procedure that copies the root file system of the NSLU2
        > - To an external thumb drive
        > - The NSLU2 still behaves like a stock NSLU2, but it now has room to
        > download linux pakages
        >
        > - Install ssh and get PC<->NSLU file transfer working (WinSCP)
        > - Install NTP client (NSLU2 clock drifts really bad, don't know why)
        > - Copy the webcam drivers/utilities from yahoo nslu2-linux group
        > to NSLU2
        > - Install image libraries
        > - Create a couple scripts: quickcam.cgi and rc.local
        > - Plug in the Quickcam into the USB socket not used
        > by the thumb drive
        > - Verify that http://mynslu/quickcam.cgi <http://mynslu/quickcam.cgi>
        > returns a webcam image
        >
        > It's actually simpler than it sounds and the existing references and
        > HOWTOs were a big help. I was able to avoid doing kernal builds and
        > retain the Unslung environment (my comfort zone).
        >
        >
        >
        > References:
        >
        > Unslung Firmware README file (use wordpad to read)
        > - http://download.berlios.de/unslung/Unslung-6.8-beta-README.txt
        > <http://download.berlios.de/unslung/Unslung-6.8-beta-README.txt>
        >
        > NSLU Wiki
        > - http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam
        > <http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam>
        > - http://www.nslu2-linux.org/wiki/HowTo/UseALogitechQuickcamMessenger
        > <http://www.nslu2-linux.org/wiki/HowTo/UseALogitechQuickcamMessenger>
        >
        > Yahoo NSLU2 Group
        > - http://tech.groups.yahoo.com/group/nslu2-linux/
        > <http://tech.groups.yahoo.com/group/nslu2-linux/>
        >
        > NSLU Message Forum
        > - www.nslu2-info.de <http://www.nslu2-info.de> (In German)
        >
        > Unslung addon packages (use the ipkg command)
        > - http://www.nslu2-linux.org/wiki/Unslung/Packages
        > <http://www.nslu2-linux.org/wiki/Unslung/Packages>
        >
        > Write Unslung scripts that execute on reboot.
        > - http://www.nslu2-linux.org/wiki/Unslung/DiversionScripts
        > <http://www.nslu2-linux.org/wiki/Unslung/DiversionScripts>
        >
        > Webcam PWC WIKI
        > - http://www.lavrsen.dk/twiki/bin/view/PWC/FrequentlyAskedQuestionsPWC
        > <http://www.lavrsen.dk/twiki/bin/view/PWC/FrequentlyAskedQuestionsPWC>
        >
        > Linux WEB cam Howto
        > - http://www.linux.com/howtos/Webcam-HOWTO/hardware.shtml
        > <http://www.linux.com/howtos/Webcam-HOWTO/hardware.shtml>
        >
        > Phillips Web Cam (pwc) drivers for QC 3000/4000
        > - http://www.saillard.org/linux/pwc/1G
        > <http://www.saillard.org/linux/pwc/1G>
        >
        > NTP Client Howto
        > -
        > http://www.nslu2-linux.org/wiki/Optware/Ntpclient?from=Unslung.Ntpclient
        >
        <http://www.nslu2-linux.org/wiki/Optware/Ntpclient?from=Unslung.Ntpclien\
        > t>
        >
        > SSH support - Dropbear
        > - http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess
        > <http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess>
        >
        >
        >
        > With thanks to the experts on this message board.
        >
        > Respectfully submitted,
        > JK
        >
        >
        >
        >
        >
        > * * DETAILED SETUP NOTES * *
        >
        > Load the Unslung firmware onto the NSLU2
        >
        > I used the Unslung 6.8 beta download located at
        > - http://www.slug-firmware.net/u-dls.php
        > <http://www.slug-firmware.net/u-dls.php>
        >
        > Unsling the NSLU2
        >
        > I followed the README. Lots of steps. Some steps I had to try more than
        > once. Besure to test the back-out procedure and test that everything
        > cycles sanely after a reboot. I probably rebooted 3 or 4 times through
        > out the process... not bad, just part of the process.
        >
        >
        >
        > --------------------------
        > Install ssh and get PC<->NSLU file transfer working (WinSCP)
        >
        > You want to get sshd running as soon as possible. The telnet access is
        > not as convenient, and PC software like WinSCP make it really easy to
        > copy files to/from the NSLU2. I ran the following two commands on the
        > NSLU (over telnet):
        >
        > # ipkg update
        > # ipkg install dropbear
        >
        > There's lot of fancy updating and tailoring you can do, but the default
        > settings worked just fine for me. I use both putty and WinSCP to talk to
        > the NSLU. From now on, I can get an NSLU linux prompt ("#" in the
        > following text) by running putty.
        >
        >
        >
        > ------------------
        > Install NTP client (typing commands into a putty window running on my
        > PC)
        >
        > # ipkg install ntpclient
        >
        > Create the file diversion script
        > file - /unslung/rc.rstimezone
        > #!/bin/sh
        > /usr/sbin/Set_TimeZone >/dev/null
        > if [ -x /opt/bin/ntpclient ]; then
        > /opt/bin/ntpclient -h pool.ntp.org -s >/dev/null
        > /usr/sbin/hwclock --systohc >/dev/null
        > fi
        > return
        >
        > Update the Crontab file - /etc/crontab
        > 0 0 * * * root /usr/sbin/WatchDog &>/dev/null
        > #1 * * * * root /usr/sbin/hwclock -s &>/dev/null
        > 11 * * * * root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null
        > 12 * * * * root /usr/sbin/hwclock --systohc &>/dev/null
        >
        >
        >
        > ----------------------
        > Copy the webcam drivers/utilities from yahoo nslu2-linux group to NSLU2
        > -
        >
        http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executable\
        > s/
        >
        <http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executabl\
        > es/>
        >
        > setpwc -> /opt/bin
        > vidcat -> /opt/bin
        > pwc.o -> /opt/lib/modules
        > videodev.o -> /opt/lib/modules
        >
        > I used WinSCP to copy the files from my PC to the NSLU. I set setpwc and
        > vidcat to executable.
        >
        > Make the video device and set permissions (copied from the HOWTO
        > verbatium, thanks Geert)
        >
        > # mknod /dev/video0 c 81 0
        > # mkdir /dev.state
        > # mknod /dev.state/video0 c 81 0
        > # chown admin.everyone /dev/video0
        > # chown admin.everyone /dev.state/video0
        > # chmod g+w /dev/video0
        > # chmod g+w /dev.state/video0
        >
        > Install the drivers
        > # cd /opt/lib/modules (mkdirs)
        > # /sbin/insmod videodev.o
        > # /sbin/insmod pwc.o
        >
        >
        >
        > ----------------------
        > Install image libraries
        >
        > At the NSLU ssh/putty Linux prompt:
        > # ipkg install libjpeg
        > # ipkg install libpng
        > # ln -s /opt/lib/libjpeg.so.62.0.0 /lib/libjpeg.so.62
        > # ln -s /opt/lib/libpng.so.3.12.0 /lib/libpng.so.3
        > # ln -s /opt/lib/libz.so.1.2.3 /lib/libz.so
        > # /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o
        > /share/hdd/test.jpg
        >
        > at your PC verify the webcam image displays in windows explorer at the
        > following network share:
        >
        > \\nslu2\ADMIN 2\share\hdd
        >
        > The command setpwc -x is useful for debugging. The above "ln" commands
        > are an interesting compromise; I found this in the www.nslu2-info.de
        > message board. I suppose there might be a better way of fixing library
        > locations for the image packages, but this was easy, works, and helped
        > me avoid having to learn more about the image package architectures.
        >
        >
        >
        > ---------------------
        > Create a couple of scripts
        >
        > Create a diversion script that re-installs the video modules on reboot
        > file - /share/flash/data/unslung/rc.local
        > #!/bin/sh
        > cd /opt/lib/modules
        > /sbin/insmod videodev.o
        > /sbin/insmod pwc.o
        >
        > Create a cgi shell script to return a jpg. Note this takes advantage of
        > the NSLU's existing httpd.
        > file - /home/httpd/html/quickcam.cgi
        > #!/bin/sh
        > /opt/bin/qc quickcam.jpg > /dev/null
        > echo -e "Content-type: image/jpeg\r"
        > echo ""
        > cat quickcam.jpg
        >
        > Create a script that shortens the vidcat command line (helpful for
        > debugging)
        > file - /opt/bin/qc
        > #! /bin/sh
        > /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o $1
        >
        >
        > chmod 755 /opt/bin/qc
        > /home/httpd/html/quickcam.cgi
        > /share/flash/data/unslung/rc.local
        >
        > -------------------------
        > Verify that http://mynslu/quickcam.cgi <http://mynslu/quickcam.cgi>
        > returns a webcam image in your PC's browser. I have tested this cgi
        > within Image Salsa. It should also be verified inside of wdisplay's
        > webcam infrastructure.
        >
      • bsdirqconflict
        Not sure about your situation but my slug is also running the ov511 driver which I thought was necessary (but could be wrong there). user@machine ~ lsmod
        Message 3 of 5 , Apr 20 8:08 AM
        View Source
        • 0 Attachment
          Not sure about your situation but my slug is also running the ov511
          driver which I thought was necessary (but could be wrong there).

          user@machine ~> lsmod
          Module Size Used by Tainted: P
          pwc 39516 0
          ov511 56492 0 (unused)
          videodev 4424 1 [pwc ov511]
          ufsd 164872 0 (unused)
          x1226-rtc 3664 0
          rbuttons 1304 0 (unused)
          pbuttons 800 0 (unused)
          ixp425_eth 17116 0 (unused)
          ixp400 608216 0 [ixp425_eth]

          user@machine /opt/etc/init.d> cat S89wcam
          #
          # Startup script for webcam
          #

          # Make sure the driver is running
          if ( !(lsmod | grep "^videodev" -q) ); then
          insmod videodev &
          fi

          if ( !(lsmod | grep "^ov511" -q) ); then
          insmod ov511 &
          fi

          if ( !(lsmod | grep "^pwc" -q) ); then
          insmod pwc &
          fi
        • duy_pham
          I have follow your instruction but the problem is I can´t access to the nslu2-linux yahoo!groups pages. I think because the gateway from my country has
          Message 4 of 5 , Nov 6, 2007
          View Source
          • 0 Attachment
            I have follow your instruction but the problem is I can´t access to the
            nslu2-linux yahoo!groups pages. I think because the gateway from my country
            has blocked Yahoo!groups. I can´t download the driver and utilities to make
            the process. If anyone already downloaded this driver, please email me at
            duy_pham1985@....

            Thanks alot

            Jack Kozik wrote:
            >
            >
            > I needed to setup a webcam for my weather website. I choose to use an
            > NSLU2 connected to a Logitech Quickcam 3000/4000, where the NSLU was
            > loaded with the unslung linux software distribution. My weather software
            > wants to get a webcam jpg image from an http-cgi URL.
            >
            > This document captures the steps I followed to get this to work,
            > initially for my records, but also, on the chance that it could benefit
            > others. Most of the work was involving setting up of the Linux on the
            > nslu, thus I chose this forum for my writeup.
            >
            > Background:
            >
            > - I want to put the weather webcam in a window with a the best view of
            > the weather.
            > - None of my home PCs are close enough to practically run a USB cable
            > - LAN connectivity mostly ok. My house has several rooms wired w/CAT5
            > - I have had two Wifi webcams.
            > - They both failed after a couple of months of use (they run hot!)
            > - I have tried a couple of webcams
            > that have "web servers" running in them
            > - They want to have their own ActiveX controls running
            > on in a web browser
            > - Don't easily work with common webcam software
            > - I have bought and returned a few different webcam solutions over the
            > last 2 years.
            > - I have experience with QC3000/QC4000 (basement sump pump monitors.)
            > Very relabile. Image quality good enough.
            > - I'll drop all of this if I can find a good solution under $300. The
            > $600+ solutions are fantasic; just too expensive for me.
            >
            >
            >
            > Summary of steps I followed
            >
            > - Starting with a stock NSLU2
            > - Load the Unslung firmware onto the NSLU2
            > - Unsling the NSLU2, that is
            > - Run a procedure that copies the root file system of the NSLU2
            > - To an external thumb drive
            > - The NSLU2 still behaves like a stock NSLU2, but it now has room to
            > download linux pakages
            >
            > - Install ssh and get PC<->NSLU file transfer working (WinSCP)
            > - Install NTP client (NSLU2 clock drifts really bad, don't know why)
            > - Copy the webcam drivers/utilities from yahoo nslu2-linux group
            > to NSLU2
            > - Install image libraries
            > - Create a couple scripts: quickcam.cgi and rc.local
            > - Plug in the Quickcam into the USB socket not used
            > by the thumb drive
            > - Verify that http://mynslu/quickcam.cgi <http://mynslu/quickcam.cgi>
            > returns a webcam image
            >
            > It's actually simpler than it sounds and the existing references and
            > HOWTOs were a big help. I was able to avoid doing kernal builds and
            > retain the Unslung environment (my comfort zone).
            >
            >
            >
            > References:
            >
            > Unslung Firmware README file (use wordpad to read)
            > - http://download.berlios.de/unslung/Unslung-6.8-beta-README.txt
            > <http://download.berlios.de/unslung/Unslung-6.8-beta-README.txt>
            >
            > NSLU Wiki
            > - http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam
            > <http://www.nslu2-linux.org/wiki/HowTo/AddUsbWebcam>
            > - http://www.nslu2-linux.org/wiki/HowTo/UseALogitechQuickcamMessenger
            > <http://www.nslu2-linux.org/wiki/HowTo/UseALogitechQuickcamMessenger>
            >
            > Yahoo NSLU2 Group
            > - http://tech.groups.yahoo.com/group/nslu2-linux/
            > <http://tech.groups.yahoo.com/group/nslu2-linux/>
            >
            > NSLU Message Forum
            > - www.nslu2-info.de <http://www.nslu2-info.de> (In German)
            >
            > Unslung addon packages (use the ipkg command)
            > - http://www.nslu2-linux.org/wiki/Unslung/Packages
            > <http://www.nslu2-linux.org/wiki/Unslung/Packages>
            >
            > Write Unslung scripts that execute on reboot.
            > - http://www.nslu2-linux.org/wiki/Unslung/DiversionScripts
            > <http://www.nslu2-linux.org/wiki/Unslung/DiversionScripts>
            >
            > Webcam PWC WIKI
            > - http://www.lavrsen.dk/twiki/bin/view/PWC/FrequentlyAskedQuestionsPWC
            > <http://www.lavrsen.dk/twiki/bin/view/PWC/FrequentlyAskedQuestionsPWC>
            >
            > Linux WEB cam Howto
            > - http://www.linux.com/howtos/Webcam-HOWTO/hardware.shtml
            > <http://www.linux.com/howtos/Webcam-HOWTO/hardware.shtml>
            >
            > Phillips Web Cam (pwc) drivers for QC 3000/4000
            > - http://www.saillard.org/linux/pwc/1G
            > <http://www.saillard.org/linux/pwc/1G>
            >
            > NTP Client Howto
            > -
            > http://www.nslu2-linux.org/wiki/Optware/Ntpclient?from=Unslung.Ntpclient
            > <http://www.nslu2-linux.org/wiki/Optware/Ntpclient?from=Unslung.Ntpclien\
            > t>
            >
            > SSH support - Dropbear
            > - http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess
            > <http://www.nslu2-linux.org/wiki/HowTo/UseDropBearForRemoteAccess>
            >
            >
            >
            > With thanks to the experts on this message board.
            >
            > Respectfully submitted,
            > JK
            >
            >
            >
            >
            >
            > * * DETAILED SETUP NOTES * *
            >
            > Load the Unslung firmware onto the NSLU2
            >
            > I used the Unslung 6.8 beta download located at
            > - http://www.slug-firmware.net/u-dls.php
            > <http://www.slug-firmware.net/u-dls.php>
            >
            > Unsling the NSLU2
            >
            > I followed the README. Lots of steps. Some steps I had to try more than
            > once. Besure to test the back-out procedure and test that everything
            > cycles sanely after a reboot. I probably rebooted 3 or 4 times through
            > out the process... not bad, just part of the process.
            >
            >
            >
            > --------------------------
            > Install ssh and get PC<->NSLU file transfer working (WinSCP)
            >
            > You want to get sshd running as soon as possible. The telnet access is
            > not as convenient, and PC software like WinSCP make it really easy to
            > copy files to/from the NSLU2. I ran the following two commands on the
            > NSLU (over telnet):
            >
            > # ipkg update
            > # ipkg install dropbear
            >
            > There's lot of fancy updating and tailoring you can do, but the default
            > settings worked just fine for me. I use both putty and WinSCP to talk to
            > the NSLU. From now on, I can get an NSLU linux prompt ("#" in the
            > following text) by running putty.
            >
            >
            >
            > ------------------
            > Install NTP client (typing commands into a putty window running on my
            > PC)
            >
            > # ipkg install ntpclient
            >
            > Create the file diversion script
            > file - /unslung/rc.rstimezone
            > #!/bin/sh
            > /usr/sbin/Set_TimeZone >/dev/null
            > if [ -x /opt/bin/ntpclient ]; then
            > /opt/bin/ntpclient -h pool.ntp.org -s >/dev/null
            > /usr/sbin/hwclock --systohc >/dev/null
            > fi
            > return
            >
            > Update the Crontab file - /etc/crontab
            > 0 0 * * * root /usr/sbin/WatchDog &>/dev/null
            > #1 * * * * root /usr/sbin/hwclock -s &>/dev/null
            > 11 * * * * root /opt/bin/ntpclient -h pool.ntp.org -s &>/dev/null
            > 12 * * * * root /usr/sbin/hwclock --systohc &>/dev/null
            >
            >
            >
            > ----------------------
            > Copy the webcam drivers/utilities from yahoo nslu2-linux group to NSLU2
            > -
            > http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executable\
            > s/
            > <http://tech.groups.yahoo.com/group/nslu2-linux/files/Custom%20Executabl\
            > es/>
            >
            > setpwc -> /opt/bin
            > vidcat -> /opt/bin
            > pwc.o -> /opt/lib/modules
            > videodev.o -> /opt/lib/modules
            >
            > I used WinSCP to copy the files from my PC to the NSLU. I set setpwc and
            > vidcat to executable.
            >
            > Make the video device and set permissions (copied from the HOWTO
            > verbatium, thanks Geert)
            >
            > # mknod /dev/video0 c 81 0
            > # mkdir /dev.state
            > # mknod /dev.state/video0 c 81 0
            > # chown admin.everyone /dev/video0
            > # chown admin.everyone /dev.state/video0
            > # chmod g+w /dev/video0
            > # chmod g+w /dev.state/video0
            >
            > Install the drivers
            > # cd /opt/lib/modules (mkdirs)
            > # /sbin/insmod videodev.o
            > # /sbin/insmod pwc.o
            >
            >
            >
            > ----------------------
            > Install image libraries
            >
            > At the NSLU ssh/putty Linux prompt:
            > # ipkg install libjpeg
            > # ipkg install libpng
            > # ln -s /opt/lib/libjpeg.so.62.0.0 /lib/libjpeg.so.62
            > # ln -s /opt/lib/libpng.so.3.12.0 /lib/libpng.so.3
            > # ln -s /opt/lib/libz.so.1.2.3 /lib/libz.so
            > # /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o
            > /share/hdd/test.jpg
            >
            > at your PC verify the webcam image displays in windows explorer at the
            > following network share:
            >
            > \\nslu2\ADMIN 2\share\hdd
            >
            > The command setpwc -x is useful for debugging. The above "ln" commands
            > are an interesting compromise; I found this in the www.nslu2-info.de
            > message board. I suppose there might be a better way of fixing library
            > locations for the image packages, but this was easy, works, and helped
            > me avoid having to learn more about the image package architectures.
            >
            >
            >
            > ---------------------
            > Create a couple of scripts
            >
            > Create a diversion script that re-installs the video modules on reboot
            > file - /share/flash/data/unslung/rc.local
            > #!/bin/sh
            > cd /opt/lib/modules
            > /sbin/insmod videodev.o
            > /sbin/insmod pwc.o
            >
            > Create a cgi shell script to return a jpg. Note this takes advantage of
            > the NSLU's existing httpd.
            > file - /home/httpd/html/quickcam.cgi
            > #!/bin/sh
            > /opt/bin/qc quickcam.jpg > /dev/null
            > echo -e "Content-type: image/jpeg\r"
            > echo ""
            > cat quickcam.jpg
            >
            > Create a script that shortens the vidcat command line (helpful for
            > debugging)
            > file - /opt/bin/qc
            > #! /bin/sh
            > /opt/bin/vidcat -m -d /dev/video0 -s 160x120 -p y -o $1
            >
            >
            > chmod 755 /opt/bin/qc
            > /home/httpd/html/quickcam.cgi
            > /share/flash/data/unslung/rc.local
            >
            > -------------------------
            > Verify that http://mynslu/quickcam.cgi <http://mynslu/quickcam.cgi>
            > returns a webcam image in your PC's browser. I have tested this cgi
            > within Image Salsa. It should also be verified inside of wdisplay's
            > webcam infrastructure.
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >

            --
            View this message in context: http://www.nabble.com/Logitech-Quickcam-3-4000-USB-WebCam-on-NSLU2-w-Unslung-linux----setup-notes-tf2727147.html#a13602419
            Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
          • duy_pham
            I have make my Logitech quickcam pro 3000 work on NSLU2 following your instructions. But I can t get a better resolution than 160x120. When I set it bigger in
            Message 5 of 5 , Nov 29, 2007
            View Source
            • 0 Attachment
              I have make my Logitech quickcam pro 3000 work on NSLU2 following your
              instructions. But I can't get a better resolution than 160x120. When I set
              it bigger in vidcat command, it report a gray image.

              How can I improve the resolution with this device?
              --
              View this message in context: http://www.nabble.com/Logitech-Quickcam-3-4000-USB-WebCam-on-NSLU2-w-Unslung-linux----setup-notes-tf2727147.html#a14023757
              Sent from the Nslu2 - Linux mailing list archive at Nabble.com.
            Your message has been successfully submitted and would be delivered to recipients shortly.