Hobbynet SANE stv680 vidcam backend

Main Index, webcam info, Info, links, documents, Camera info, Progress, Download, To Do list

Goal for this page is to collect data about the stv0680 usb bridge and to give
information about the SANE stv680 Vidcam backend.
Some parts of the stv680 kernel module, pencam program and camlib libgphoto2 are
used for this backend.

Info, links, documents
1. Camera info: Aiptek
2. Webcam manufactuers: STMICROELECTRONICS
                        ST stonline
3. Programs: stv0680-usb-sourcforge.net, PENCAM2
	     stv0680 patch for Creative Webcam Go Mini
	     stv680 userspace program with sdl gui
	     pccam880 userspace program with v4l interface
	     Python sane example
Return/Terug Top
Aiptek stv0680vid 0x0553, pid 0x0202
Interface usb 1.1,
Optical Resolution: still camera (CIF) 352 x 288 ( VGA types 640-480 pixels)
		   CIF/QCIF or VGA/QVGA resolution is sensor depended.
		   gphoto2 saves files as 356 x 292
                   webcam  352-288/176-144 (vga types 640-480/320-240)
		   fileformat: .ppm, format from camera bayer 422.
Program tested with:		   
Aiptek Pencam 1: chip STV0680B-001 Asic rev. 7.60 Firmware 1.00
                 Sensor ID 25.65 (404 kernel module) (light setup 50Hz)  CIF/QCIF
Aiptek Pencam 1: chip STV0680B Asic rev. 7.60 Firmware 1.00
                 Sensor ID 25.166 (410 kernel module)  (light setup 50Hz) CIF/QCIF
Digital Dream l'espion: chip STV0680B Asic rev. 7.60 Firmware 3.00
                        Sensor ID 25.170 (xxx kernel module)  (light setup 50Hz) CIF/QCIF
17-01-2005 .. 17-01-2005 .. xcam frontend screenshot:
                         stv680-screenshot-text-25-65.jpg size ~57k] 

02-10-2004 .. 03-01-2005 .. xcam frontend screenshot stv680-screenshot-25-65.jpg
stv680-camera.jpg camera with sensor 25.65, 25.166,25.170
13-01-2005 Some snapshots to compare the quality of the different camera's.
	   Aiptek Pencam with sensor id 25.65
           Aiptek Pencam with sensor id 25.166
	   Digital Dream l' espion with sensor id 25.170
*** Remark: For these images brightness and white level values all 0.

For using this SANE stv680 backend the following is needed:

sane backends (SANE version 1.0.18 or higher):

sane-frontend (use SANE version 1.0.14 or higher):

check that stv680 kernel module is removed/disabled  (rm ../stv680/rmmod stv680)

see also download link

At this moment there are two frontends which can be used with the stv680 backend:
1. xcam: for display (no streaming video (SANE bugreport 300832) only snapshots in 
   display and save to file is possible).
   If a modified version is used, only streaming frames is possible 
   remove first "stop_camera ();" line in routine "input_available".
2. scanimage: for writing in batch mode to files (files can be one file
   each time overwritten or each time a frame is written to a new file).
   scanimage -B -d stv680:libusb:001:002 --batch=out.ppm --batch-count 5 --mode "Color RGB"
   for different files use =out%d.ppm
3. saned: not tested yet.
4. scanadf: not tested yet.
5. USB network?   see usbip

Using other frontends will be a problem, no idea if for example
writing a gstreamer-sane plugin will be a lot of work and/or difficult.
Another solution could be to use a frontend which can read the file from
scanimage which is refreshed at a rate of .. fps.

Return/Terug Top

03-07-2006 .. 03-07-2006 SANE-Backends 1.0.18 is released (stv680 is included).
05-06-2006 .. 05-06-2006 Files uploaded to SANE CVS, will be released with SANE 1.0.18.
14-05-2005 .. 24-04-2006 .. Working on code cleanup and memory leakage problem
14-04-2005 .. 14-04-2005 Update size of bulk read, with scanimage about 3 fps (352x288)
16-01-2005 .. 17-01-2005 Added stv680_add_text routine to source (copy/paste from pencam2), so timestamp
                         can be added to image (mode COLOR_RGB_TEXT), see screenshot.
03-01-2005 .. 10-01-2005 Adjust buffersize (CIF/VGA), reduce number of buffers, some code cleanup.
                         With scanimage about 2 fps (352x288).
25-12-2004 .. 03-01-2005 Worked on slides for separated color adjustment (red, green and blue)
23-12-2004 .. 24-12-2004 Worked on autodetection CIF or VGA sensor, VGA resolution mode, added other
                         usb vid and pid. With scanimage about 1.8 fps (352x288).
07-12-2004 .. 20-12-2004 Resolution 352x288 and 176x144 working, for source see download page,
                         Resolution VGA, QVGA, QSIF (640x480, 320x240, 160x120) untested 
			 (no webcam to test)
05-10-2004 .. 06-12-2004 First image, resolution 160 and 176 NOK, 
24-09-2004 Working on skeleton files stv680.c, stv680.h and stv680.conf (ready), 
           sanei_usb_read_bulk, bad address error (solved)
26-08-2004 Start of webpage, some test done (lsusb -v, sane-find-scanner -v -v,
           xcam, xawtv, camorama, spacagui, gtkam, gphoto2).
	   Status: gphoto2 (working, camlib stv680, see also README and .pdf file, images 356x292),
	           stv680 kernel module for webcam function, images 352x288 (camorama 10.5 fps)
	           pencam2 for still camera and webcamera function.
Return/Terug Top
27-09-2004 See Downloads page
Return/Terug Top
TO DO list
1. Code cleanup, check/resolve memory leakage (valgrind 2>logfile.txt xcam -B).
2. Check why the backend sometimes displays wrong image or crashes,
   some causes could be: timeing, code.
3. Check identify and init routine for usb commands sequence (increase fps).
4. Made some ref. images with a better light source.
5. Test/work on interface with other frontends like saned, scanadf or some v4l/v4l2 frontends.
Return/Terug Top

Copyright © 2004 - 2006. Alle rechten voorbehouden, Revisie: 29 Oktober 2006. Opmerkingen over deze site? Mail de webmaster