SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

<!doctype linuxdoc system>
<article>

<title>SN-WEBCAM
<author>Luca Amore - lookee - luca@lookee.it <date>23 December 2005
<abstract>
SN-WEBCAM REFERENCE MANUAL
</abstract>

<toc>

<sect>QUICK INSTALL<p>
Get the last release of sn-webcam:
<url url="http://sn-webcam.sourceforge.net" name="official home page of sn-webcam">

Read INSTALL file to <em>quick install</em> and use sn-webcam <p>

<sect>WHAT IS SN-WEBCAM<p>
The aim of this project is to develop a light and easy to use GNU/Linux webcam

<url url="http://www.gnu.org/philosophy/free-sw.html" name="FREE SOFTWARE"> that works in sn9c10*-based webcam. It perhaps works with other V4L2 webcams (let me know about this).<p>

SN-WEBCAM displays and saves (jpg) images, grabbed from sn9c10*-based Sonix/Microdia webcams, and also periodically upload them by FTP.<p>

Many options can be simply changed by a configuration file and many webcam controls are available to fine tune interactively the webcam grabs.<p>

SN-WEBCAM is worldwide used from many users and last releases can be considered quite stable. All feature requests, hacks, helps, improvement are apreciated from authors.<p>

This software works with any v4l2 drivers but it was tested and developed to work with the sn9c102 kernel module driver coded from Luca Risolia.<p>

Actually sn9c102 modules is enclosed in the most recent vanilla linux kernel of the 2.6.* branch.<p>

<sect1>KEY FEATURES<p>
<itemize>
<item> it's a FREE SOFTWARE relased under GNU/GPL v.2 and following license <item> it works with sn9c10* webcams
<item> it allows you to grab images (jpg) <item> timestamp on grabs
<item> it works with either native video formats over the USB: Sequential RGB Bayer and Huffman compressed <item> Huffman compressed video format allows very high video grab refresh rate <item> optionally you can periodically upload by FTP grabbed images <item> many controls are available for tuning the quality of grabbed imagesi (for eg. exposure, balancment of colours, gain, contrast) <item> you can change several options by editing sn-webcam.conf commented configuratin file </itemize>

<sect>INSTALLATION<p>

Read INSTALL file to <em>quick install</em> sn-webcam.<p> For more detailed intructions continue to read this document.

<sect1>DOWNLOAD LAST RELEASE<p>
You could obtain last release of this software here:<p> <url url="http://sn-webcam.sourceforge.net" name="sn-webcam official home page"><p>

And you could subscribe to
<url url="http://freshmeat.net/projects/sn9c102fg" name="sn-webcam freshmeat project page"> if you wish to know when new major releases are relased.<p>

<sect1>INSTALLING STEP BY STEP<p>
Usually the installing procedure of SN-WEBCAM is quite simple and it can be resumed in 4 steps:<p>

<itemize>
<item> installing and load V4L2 kernel modules <item> check and install required dependencies (SDL library, libjpeg and optionally SDL TTF for timestamp feature) <item> compiling SN-WEBCAM
<item> running and enjoing it
</itemize>

After that you can customize the configuration file <em>sn-webcam.conf</em> to fine tune this software to your needings.<p>

<sect1>DEPENDENCIES<p>
This software requires this libraries:<p> <itemize>
<item><url url="http://www.libsdl.org" name="SDL Library"> <item><url url="http://freshmeat.net/projects/libjpeg" name="libjepeg"> <item><url url="http://www.libsdl.org/projects/SDL_ttf" name="SDL TTF Library"> to enable timestamp feature <em>(optional)</em> </itemize>

<sect1>WEBCAM KERNEL MODULE DRIVER<p>
You need a V4L2 kernel module.<p>
If you have a sn9c10* webcam you could install sn9c102 kernel module.

<sect2>GET AND LOAD SN9C102 KERNEL MODULE<p> This module was enclosed in vanilla linux kernel &gt; 2.6.11.*<p> You can enable it [<em>CONFIG_USB_SN9C102</em>] in the kernel configuration menu under<p> <em>Device Drivers --&gt; USB Support --&gt; USB SN9C10x PC Camera Controller support</em><p> You can find USB SN9C10x PC Camera Controller support as an <em>"USB Multimedia devices"</em>.<p>

Alternatively you can download this module or find information in the <url url="http://www.linux-projects.org/modules/news" name="sn9c102 kernel module official home page">.

More technical information about this driver is available on the documentation folder of your linux kernel at:<p> <em>Documentation/usb/sn9c102.txt</em><p> Basic users don't need to read this detailed documentation.<p>

<sect1>COMPILING THE SOURCE<p>
At moment SN-WEBCAM is released only as source code under the GNU/GPL v.2 and upper license.<p> We hope to build and deploy soon binary packets for the most used linux distribution.<p>

enter in sn9c102 source directory:<p>
<code>
$ ./configure
$ make
</code>

If you expect errors and your compilation fails, check if you have the right dependencies (with their headers) properly installed.<p>

<sect1>FIRST RUN<p>
We suggest you to try this software with default configuration file (sn-webcam.conf).<p>

<itemize>
<item>enter in sn-webcam directory (or were you compiled the software) <item>assuring to have writing access in such directory </itemize>

<code>
$ ./sn-webcam
</code>

If it works well as webcam player you can customize the sn-webcam.conf file.<p>

<sect>USING SN-WEBCAM<p>

<sect1>WHERE ARE GRABBED IMAGES?<p>
The grabbed images are in the same directory where is putted the binary sn-webcam and are called cam.jpg (every grab overwrite the previous image).<p>

<sect1>HOW ENABLE FTP<p>
For enable FTP upload or for tune this software for your fun, look at and modify the self commented configuration file sn-webcam.conf.<p>

<sect1>WEBCAM CONTROLS<p>
It's possible to change the webcam control parameters pressing the keys displayed in the main menu.<p> I suggest you to work with exposure and gain to enhance the quality of grabs (off course remember to tune the manual focus of your webcam).<p>

<sect>TROUBLESHOTING
If unluckily you expect errors:<p>

<sect1>CHANGE SIZE AND DEPTH<p>
try to change the size and depth (in sn-webcam.conf file) of your grabs editing the keys xres, yres, bpp according to your webcam feature. for eg. 640x480.<p> for mismatch image sizes you could view on video malformed images.<p>

<sect1>CHANGE PIXEL FORMAT<p>
try to change the USB pixel format (in sn-webcam.conf)<p>

<sect1>CHECKING SN9C102 MODULE<p>
check if the sn9c102 module is properly loaded<p> if you don't build it monolitically in the kernel, you could check it:<p> <code>
$ lsmod |grep sn9c102

sn9c102 71716 0
</code>

<sect1>REMOVE AND RELOAD MODULE<p>
sometime is usefull remove and reload the kernel sn9c102 module<p>

<code>
# rmmod sn9c102
# modprobe sn9c102
</code>

<sect1>DMESG<p>
check with dmesg if the cam is right recognized<p>

<code>
for eg.

$ dmesg

[...]
usb 1-1: new full speed USB device using ohci_hcd and address 13 usb 1-1: SN9C10[12] PC Camera Controller detected (vid/pid 0x0C45/0x6029) usb 1-1: PAS106B image sensor detected usb 1-1: Initialization succeeded
usb 1-1: V4L2 device registered as /dev/video0 usb 1-1: Optional device control through 'sysfs' interface ready [...]
</code>

<sect1>PERMISSION DENIED<p>
if the run of SN-WEBCAM ends with "Error: Permission denied"<p>

check if you have the right permissions on the device selected (/dev/video0 that usually is a symlink to /dev/v4l/video0.<p>

you can fix this with:<p>
<code>
# chown lookee /dev/video0

to know the symlink
# ls -l /dev/video0

lrwxrwxrwx 1 root root 10 Dec 22 23:13 /dev/video0 -> v4l/video0

# chown lookee /dev/v4l/video0

where lookee is the username of the sn-webcam user </code>

<sect>UNDERSTANDING THE CONFIGURATION FILE<p> File webcam.conf contains parameters and it's fully commented to help you to understand all available options.

<sect>GRAB REQUESTS<p>
If you have interesting grabs taked with this software, We'll be happy to use them as demo images! (With credits off course!).<p>

<sect>CREDITS<p>
(in random synaptic order):<p>
<itemize>
<item> Christophe Lucas for his help, his patches and his old sn9c102-webcam software <item> Luca Risolia for his drivers and for the link to my software <item> Marco Comparato for his support to fix the memory leak bug on device.c <item> Igor Lopes Guerreiro for his bugreport and suggestions <item> Nathan Hurst for his patch to make bmp2jpg.c (gcc 3.4 compliant) <item> Gabry of PALug for his helps to debug <item> Ian McGhie, Alvaro Lopez for their interesting bugreports <item> <url url="http://sdlcam.raphnet.net" name="SDLCam Project"> for its GNU/GPL v.2 code (capture.c dump_thomas.c) <item> Luca Fini for his bugreport
<item> Pooly for his FTP persistent request <item> Imipak, co-owner of this project on Freshmeat page <item> Sourceforge for its hosting, cvs, mailing list <item> FREE SOFTWARE that make the world more funny and the knowledge shared :-) </itemize>

<sect1>THIS PROGRAM IS BASED ON<p>
<itemize>
<item><url url="http://go.lamarinapunto.com" name="sn9c102-tools"> <item><url url=" http://odie.mcom.fr/~clucas/articles/sn9c102.html" name="sn9c102-webcam"> <item><url url="http://www.lookee.it/index.php?p=5" name="sn9c102-webcam-lk"> <item><url url="http://nbpfaus.net/~pfau/ftplib" name="ftplib"> </itemize>

<sect>FOR ASTROPHOTOGRAPHERS<p>
<url url="http://www.weasner.com/etx/astrophotography/2005/lpi-linux.htm" name="This Guide"> helps to use this software with LPI (thanks to Patrick Zima):<p>

I don't know nothing about this but I found this use of SN-WEBCAM so cool!<p> Can anyone send me any astrophotos grabbed by SN-WEBCAM?<p>

<sect>SN9C102 SUPPORTED DEVICES<p>
I hope that you could try usefull this list of known supported devices that I'm cut and paste here from the section 9 of the <em>Documentation/usb/sn9c102.txt</em> documentation file of sn9c102 kernel module.<p>

<verb>
[copy from section 9 of file Document/usb/sn9c102.txt in your linux kernel source]

Below is a list of known identifiers of devices mounting the SN9C10x PC camera controllers:

Vendor ID Product ID


0x0c45     0x6001
0x0c45     0x6005
0x0c45     0x6009
0x0c45     0x600d
0x0c45     0x6024
0x0c45     0x6025
0x0c45     0x6028
0x0c45     0x6029
0x0c45     0x602a
0x0c45     0x602b
0x0c45     0x602c
0x0c45     0x6030
0x0c45     0x6080
0x0c45     0x6082
0x0c45     0x6083
0x0c45     0x6088
0x0c45     0x608a
0x0c45     0x608b
0x0c45     0x608c
0x0c45     0x608e
0x0c45     0x608f
0x0c45     0x60a0
0x0c45     0x60a2
0x0c45     0x60a3
0x0c45     0x60a8
0x0c45     0x60aa
0x0c45     0x60ab
0x0c45     0x60ac

[copy from section 9 of file Document/usb/sn9c102.txt in your linux kernel source] </verb>

<sect>CONTACT OR JOIN TO SN-WEBCAM DEVELOPERS<p> Join to us subscribing in:
<url url="http://lists.sourceforge.net/lists/listinfo/sn-webcam-devel" name="Official Developing Mailing List">

Luca Amore<p>
lookee<p>
e-mail: luca@lookee.it<p>
<url url="http://www.lookee.it" name="home page"><p> GnuPG/PGP Key: #7643F9AF @ pgp.mit.edu<p>

</article>


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.