Driver for 0x0c45:0x6128 - gspca

235 views
Skip to first unread message

Amauri

unread,
Mar 11, 2008, 2:51:09 AM3/11/08
to microdia
Hi,

Here is the driver for 0x0c45:0x6128, to be applied to
gspcav1-20071224:

https://groups.google.com/group/microdia/web/gspcav1-20071224-0c45-6128.diff

I sent this driver to Michel Mxhaard (gspca) in December 2007, but it
was not published yet.

Some strange things still occurs, like led turning on/off, but I can
do video calls in Skype...

Amauri

JoJo jojo

unread,
Mar 11, 2008, 4:15:20 AM3/11/08
to micr...@googlegroups.com

Thanks Amauri

This will surely help out the SN9C325 MCU users (0c45:6128 lsusb).
I would nominate aTux to review this code, we now wait to hear from him.

Also, we are not associated with gspca, so I can't guarantee this diff will
show up in the official gspca driver. No way of knowing when it will
showup in distros.

Meanwhile, I would like you to share with us your experience in
reverse engineering this driver. It will help out a lot of our users,
who are struggling in similar situations.

-JoJo

aTux

unread,
Mar 11, 2008, 2:31:56 PM3/11/08
to microdia
hello,
I am reviewing the driver and comparing it to the log, it seams that
some of the code in gspca is causing the strange behavior.

On Mar 11, 11:15 am, "JoJo jojo" <onetwoj...@gmail.com> wrote:
> On Tue, Mar 11, 2008 at 12:21 PM, Amauri <amaurimaga...@gmail.com> wrote:
>
> > Hi,
>
> > Here is the driver for 0x0c45:0x6128, to be applied to
> > gspcav1-20071224:
>
> > https://groups.google.com/group/microdia/web/gspcav1-20071224-0c45-61...

kamracik

unread,
Mar 11, 2008, 2:51:28 PM3/11/08
to microdia
Hello,


I tried this patch without success. It applies and compiles without
problem
but when i loaded module it didnt create /dev/video0

In dmesg I got only info about registered new driver gspca and nothing
else.

Amauri Magagna

unread,
Mar 11, 2008, 4:55:59 PM3/11/08
to micr...@googlegroups.com
Hi,

I think this behavior began after I added the "autobright" feature. I
don't know what each register means, so I was trying the codes for other
camera models until it works for my camera. Some additional usb snooping
is needed...

I uploaded the OM6802 data sheet to the group files, if it can help.

Amauri

aTux escreveu:

Amauri Magagna

unread,
Mar 11, 2008, 4:31:18 PM3/11/08
to micr...@googlegroups.com
Hi,

Please try:

$ dmesg | grep video
[ 19.296000] Linux video capture interface: v2.00

and

$ ls -l /dev/video*
crw-rw---- 1 root video 81, 0 2008-03-11 14:24 /dev/video0

and

$ cat /var/log/syslog | grep video
Mar 11 14:24:15 sadhana kernel: [ 19.296000] Linux video capture
interface: v2.00
Mar 11 14:24:16 sadhana NetworkManager: <debug> [1205256256.678412]
nm_hal_device_added(): New device added (hal udi is
'/org/freedesktop/Hal/devices/usb_device_c45_6128_noserial_video4linux').

Amauri

kamracik escreveu:

kamracik

unread,
Mar 11, 2008, 11:10:05 PM3/11/08
to microdia
Okey i inserted into:
gspca 605412 0
videodev 23808 1 gspca
v4l2_common 14592 1 videodev
v4l1_compat 11652 1 videodev

but still nothing, there is no /dev/video0

$ dmesg | tail -n 20
ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
wlan0: no IPv6 routers present
Linux video capture interface: v2.00
usbcore: registered new interface driver gspca
/var/tmp/portage/media-video/gspcav1-20070508/work/gspcav1-20070508/
gspca_core.c: gspca driver 01.00.18 registered

even tried other usb ports but nothing changes

Amauri Magagna

unread,
Mar 12, 2008, 12:05:46 AM3/12/08
to micr...@googlegroups.com
Hi,

Your log shows "gspcav1-20070508 (01.00.18)", but the driver is for
"gspcav1-20071224 (01.00.20)".

You must download the latest driver from gspca website
(http://mxhaard.free.fr/spca50x/Download/gspcav1-20071224.tar.gz), then
you can apply the patch and install the new driver.

Please tell me what happens...

kamracik escreveu:

def...@gmail.com

unread,
Mar 12, 2008, 1:03:24 AM3/12/08
to microdia
some problems, i ahve this webcam and both drivers dont works, the
chipset is correct, but the sensor i think you never heard about.

my webcam sends to me this info:

USB/VID_0C45&PID_6128\5&3AC0E39C&0&1

the led turn on, and the device /dev/video0 show up, but webcam doenst
respond.


thanks for your attention.

sorry my english is horrible, like my face :)

kamracik

unread,
Mar 12, 2008, 6:49:12 AM3/12/08
to microdia
I was using "gspcav1-20071224 strange, maybe gspca_build dont
overwrite old one.

With that gspca /dev/video0 comes up, but with strange behavior.
Sometimes it works almost perfect (almost cose i can set it res
640x480
and framerate 30) but it works and sometimes i have something like
screen shift, half of screen is light blue and on other half i see
capture
screen in blue colors.

Tried play with parameters but without success, in dmesg is nothing
helpful.

dmesg:
Linux video capture interface: v2.00
/root/trash/gspcav1-20071224/gspca_core.c: USB GSPCA camera found.
SONIX JPEG (sn9c1xx)
/root/trash/gspcav1-20071224/gspca_core.c: [spca5xx_probe:4286] Camera
type JPEG
/root/trash/gspcav1-20071224/gspca_core.c: [spca5xx_getcapability:
1252] maxw 640 maxh 480 minw 160 minh 120
usbcore: registered new interface driver gspca
/root/trash/gspcav1-20071224/gspca_core.c: gspca driver 01.00.20
registered

Amauri

unread,
Mar 12, 2008, 5:50:13 PM3/12/08
to microdia
I think this strange behavior is connected to other strange behavior,
that is the green led turning on and off. The "autobright" feature (in
Sonix/sn9cxxx.h) continuously changes brightness, and this command
was not properly debugged, some register addresses can be wrong (I
just added this camera's sensor to the code for another camera).

You can change the debug level by editing gspca_core.c:
static int debug = 0;
to
static int debug = 2; // some warning messages
or
static int debug = 3; // config/control function calls

Then recompile and reinstall the driver:
sudo ./gspca_build

Be carefull, it generates a lot of lines in the log...

kamracik

unread,
Mar 12, 2008, 6:38:05 PM3/12/08
to microdia
Hmm.. do you mean that led on top o camera? I have a purple
led on top of camera symbolic camera activity and it works perfectly.
It switch on only when i start camorama and switch off when i close
it.

About brightness I can't tell too much because colors, are not as they
should be.
They are just in one hue, in blue. In camorama with settings it gives
to me
i can only change it to red or green. Don't have possibility to
normalize them.

Later i try it in debug mode and public here logs, when it works
partly good
and when it works bad. I can only have hope logs will be relevant.

Amauri Magagna

unread,
Mar 13, 2008, 2:33:49 AM3/13/08
to micr...@googlegroups.com
Hi,

What viewer are you using to test your camera?

With patched gspca driver, the camera doesn't work in Skype's video test
option, but works fine in Skype video calls. I made several video calls
with durations of more than an hour, without any problem.

You can use Kopete, Camorama, or any other viewer, except Skype...


def...@gmail.com escreveu:

kamracik

unread,
Mar 13, 2008, 3:34:13 AM3/13/08
to microdia
I'm using diffrent and all of them have same effect.
camorama, spcaview, skype
I can't only get it to work with mplayer, where i have empty
window. I can make screen shots in each other if it would be helpful.


On 13 Mar, 07:33, Amauri Magagna <amaurimaga...@gmail.com> wrote:
> Hi,
>
> What viewer are you using to test your camera?
>
> With patched gspca driver, the camera doesn't work in Skype's video test
> option, but works fine in Skype video calls. I made several video calls
> with durations of more than an hour, without any problem.
>
> You can use Kopete, Camorama, or any other viewer, except Skype...
>
> defc...@gmail.com escreveu:

Amauri

unread,
Mar 13, 2008, 6:05:00 PM3/13/08
to microdia
Hi,

I can't change colors, too, this command was not checked in gspca, but
you can change some color parameters in /sys/module/gspca/parameters:
GBlue=320
GGreen = 288
GRed = 320
autoexpo = 1

You can try other values, I think these values depend on light
conditions (fluorescent/incandescent light, etc.). The "autoexpo = 1"
lets the driver control the brightness of the image (well, not only
the brightness, but also the sensor's gain, I added this adjust
because the image was very dark in my tests).

The autobright reads the mean luminance of the image, and increases or
decreases the bright (and the sensor's gain in this camera). It works
very well...

Amauri

licho...@gmail.com

unread,
Apr 8, 2008, 3:04:02 PM4/8/08
to microdia
hello, from bulgaria,
i have this camera http://www1.canyon-tech.com/cn07/pr_photo/CNR-WCAM43_1h.jpg
i downloaded driver gspcav1-20071224: and patch it with patch for
6128.
module is working, but picture is strange 1/3 is blue or red and other
part it's white or some other color. there is no picture.
camera works in windows. i also have tv tuner.

greetings
Ilia

pigeon

unread,
Apr 19, 2008, 10:53:58 PM4/19/08
to microdia
> i downloaded driver gspcav1-20071224: and patch it with patch for6128.
> module is working, but picture is strange 1/3 is blue or red and other
> part it's white or some other color. there is no picture.
> camera works in windows. i also have tv tuner.

I'm getting similar result as you've mentioned:

http://pigeond.net/~pigeon/0c45-6128-gspca.png


Pigeon.


Reply all
Reply to author
Forward
0 new messages