PDA

Bekijk de volledige versie : Compiling driver for webcam



max2950
07-06-2004, 11:56
First of all very big thanks to all of you spending time writing custom firmwares !

I was wondering if it is possible to implement some kind of MPEG4 encoder in the WL500g... But i think that the routers CPU might be a little bit weak for doing this...
What would be great is a feature to specify the compression level of the outputed JPEG picture...

I also would like to port the ActiveX component for viewing the webcam to a java applet. Since i do not have enough free time to do reverse engineering i just wanted to ask if someone knows where to find the source code of this ActiveX component?

Best Regards....


hi again !
I tried to do some packet sniffing on port 7777... But i could not figure out how the image data is organized within the stream. I thought the JPEG images were just putted one after each other on the network, but i was wrong... Any ideas?

joao
14-06-2004, 22:40
I also would like to port the ActiveX component for viewing the webcam to a java applet. Since i do not have enough free time to do reverse engineering i just wanted to ask if someone knows where to find the source code of this ActiveX component?


In fact, this router should be de-microsoftized. And replacing that ActiveX control for a Java Applet is really needed.
But I don't think there is a need to study the ActiveX control. There is an interesting project called webcam_server that can be used as a replacement for the ActiveX control used by Asus:
http://webcamserver.sourceforge.net/

oCe
08-07-2004, 21:37
I'd really like a compression-option for the webcam indeed (with my 64KB/sec upload I can get about 1 frame per 1.5-2 seconds...), but MPEG-4 is a bit overdone I guess; just some motionJPEG or any other decent but 'light' (in terms of cpu power that is needed) would be preferred (or required). and a java instead of active-x client would be even better! I'm no java and/or firmware-coder, so can't help with that; but can help with testing, where needed.

Samba
13-07-2004, 15:41
Hi!

Another webcam idea, if anyone have the time and interest to implement it: Encryption of the pictures so that only "authorized" people would be able to see them properly. If a Java applet is used, it could probably ask for a key, and use it to decrypt the images before showing them. I don't know, but I wouldn't be surprised if Java has standard libraries for doing DES encryption/decryption. I don't know if real time DES encryption would be to processor intensive for the Wl-500g box.

Regards,
Samba

ronin
25-07-2004, 20:19
does anyone have an idea of what the output is that is send through port 7777 and might there be any media players for it?

I'm getting sick of this active X component

Antiloop
25-07-2004, 22:14
does anyone have an idea of what the output is that is send through port 7777 and might there be any media players for it?

I'm getting sick of this active X component

find a client that is capable of receiving data from the program RCAMD, i don't know if this is some standard stream or something...

WlanMan
16-08-2004, 00:13
Hi

http://mxhaard.free.fr/camera.html
Oleg, can you squeeze the Patch (http://mxhaard.free.fr/download.html) into the Kernel, maybe for .5 Release ?
I Want to buy a very cheap webcam with this Chipset :).

Oleg
16-08-2004, 12:13
Probably I can patch the kernel, have not tried yet, but it's not enough to make it work. It's also needed to adjust web iface, scripts and perform testing. I've no such device, so I can't do this.

Arobs45
06-02-2005, 13:30
Dear all,

Do you think sometime additional webcam drivers could be added or implemented in the firmware ?

As i am a total Linux n00b, what can I do if I have the webcam linux driver ?

Thx

JF

WlanMan
07-02-2005, 10:52
Hi

You would have to compile the desired camera drivers as a module for the mipsel kernel, in some way. I think this needs some more intensive tweaking of the configure scripts of the drivers or there integration into the kernel source tree of the development system. i tryed to do this with the Drivers for some ultra-lowcost sunplus chipsets, but endet up seeing the driver supported the cam only very ugly (incorrect shutter controll). You may check first on a normal linux box that the driver works well with the cam...

Greets

max2950
09-03-2005, 10:50
does anyone have an idea of what the output is that is send through port 7777 and might there be any media players for it?

I'm getting sick of this active X component


You could give this a try (http://wl500g.info/showthread.php?t=1864) ;)

smarechal
19-03-2005, 23:35
Hi,

I'll try to speak well english,

Is camsource a software that can be implemented in wl500 with java applet of camserv?

I 've got a webcam server running with this configuration. It work fine and you can also send capture of webcam by ftp.

If you want to see the result: http://www.webnature.net/?page=webcam

Have a good night

Siegfried

macsat
27-04-2005, 14:21
Hi

This is probably for Oleg...

I have a Creative NX Pro webcam. This one dosnt work with the WL500gx router, but it DOES work in my linux, with theese drivers :
http://mxhaard.free.fr/download.html

I cant make it work on the router, since the kernel source is not included in your firmware...and I dont know much about howto patch the kernel other than doing normal module compiles and so on....

Any chance that it can be included ?

It would add support for some 130 webcams....

Oleg
27-04-2005, 16:03
Kernel sources ARE included to the ASUS GPL tarball, my sources contains all required patches for making custom firmware.

macsat
27-04-2005, 18:58
But will it be possible to compile a module to load, or does the kernel here not support modules?

WlanMan
03-05-2005, 15:53
Hi

Olegs tarrball is a patch to to the original asus tarball, this one carys crosscompiler toolchain and the stuff youre missing. The SPCA driver is not stable on mips, you can try it by searching he forum for it. It seems to have a memory leak, it eats up your memory until kernel gets panic and starts killing processes...
Does the NX cam works good on your linux box ? i have one of these ultra integrated spca webcams sold at around 12$ or so, and these are not well supported (Edit: OK, new drivers seem to habe better spca561 support, have to try again :)).

Greets

macsat
03-05-2005, 16:50
...on my linux box that is.

I havent yet tried to cross-compile for mipsel

dom
31-05-2006, 00:14
Hello,

I'm testing spca50x.o driver for webcam and it seem work fine with videodog and i will hope to compile myself.

I got sources from http://mxhaard.free.fr/download.html and i compiled them with cross compilation tools (already used to oleg's firmware with successful)
but in this case i have too many errors.

I would be very interested to get these sources of spca50x.o or if anybody has succeeds with http://mxhaard.free.fr/spca50x/Download/spca5xx-20060501.tar.gz
then if you can explain what have you patched.

vampire
05-06-2006, 12:02
Yep, I'll be real keen to test the latest (and perhaps final for 2.4 acording to the site) driver out too if someone manages to compile it, the last spca driver i got that worked with my webcam was var:57.02. Camera detected as "USB SPCA5XX camera found. Type Flexcam 100 (SPCA561A)" (a cheap $15 NZD camera) and it worked.

macsat
14-06-2006, 19:12
Hi

Did anyone successfully build theese drivers for Olegs firmware? :

http://linux-uvc.berlios.de/

dyonisos
27-05-2007, 22:11
Can you please help me with a step by step guide how to compile the pwc 10.0.12 webcam driver into Oleg 1927-7g FW?
Or, if available, could you please provide me with the compiled 10.0.12 pwc module for wl-500g Premium, so that I can use my Philips SPC900NC? Thanks!

geezerpl
10-01-2008, 12:45
I'd love too to know how to do it (and why Oleg won't implement the newest driver in his FW ?) ?
Many thanks !

raas
10-01-2008, 15:25
....... (and why Oleg won't implement the newest driver in his FW ?) ?
Many thanks !

Probably because there's limited amount of space in the flash memory to store all the goodies we want..

(The flash size of the chip where the firmware is stored is 4mb, Oleg has a 'hell-of-a-job' to put everything he needs into this space)

HTH

wpte
10-01-2008, 22:11
Probably because there's limited amount of space in the flash memory to store all the goodies we want..

(The flash size of the chip where the firmware is stored is 4mb, Oleg has a 'hell-of-a-job' to put everything he needs into this space)

HTH


and why are some older FW from asus 7 meg?:confused:

lly
11-01-2008, 13:54
geezerpl, dyonisos

There is no step-by step guide, since that action assumes that you have some knowledge in writing/compiling/building C/C++ programs.

First of all, you have to read this:
Recompiling firmware (http://wiki.wl500g.info/index.php/compilingcustomfirmware)

After successful custom firmware build, you should try two choices:
1) apply patches on kernel and make modules.
2) modify Makefile from pwc-10.0.12-rc1.tar.bz2 for cross-compiling and make it

In all cases, it is possible that you see some compilation errors. IMHO nobody can give to you universal solution.

Since pwc-10.0.12 is not released for 2.4.20 kernel, I apologize that Oleg simply hasn't enough resources for it adaptation & tests.

al37919
11-01-2008, 14:18
in principle, there is also a toolchain for native compilation on the router using built in libraries: http://wl500g.info/showpost.php?p=75208&postcount=11

However, there is no howto.

pepek
02-04-2008, 11:54
Hello, I have problem with this driver on WL-500gP. (Oleg WL500gp-1.9.2.7-9)

insmode is done in post-boot - driver is registered, but webcam is not recognized.
Is something need to change in config (webinterface) ?

Can somebody help me ?

Jan 1 01:00:06 kernel: usb.c: USB device 2 (vend/prod 0x93a/0x2468) is not claimed by any active driver.
Apr 2 22:54:39 kernel: kjournald starting. Commit interval 5 seconds
Apr 2 22:54:40 kernel: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,2), internal journal
Apr 2 22:54:40 kernel: EXT3-fs: recovery complete.
Apr 2 22:54:40 kernel: EXT3-fs: mounted filesystem with ordered data mode.
Apr 2 22:54:40 kernel: Adding Swap: 95736k swap-space (priority -1)
Apr 2 22:54:40 kernel: usb.c: registered new driver spca5xx
Apr 2 22:54:40 kernel: drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered

raas
14-07-2008, 19:07
Hi, I want to connect my logitech quickcam express to the asus.
having found on the forum, I have to use spca5xx.o for this.
according to the site of mxhaard http://mxhaard.free.fr/spca5xx.html I have to use this driver for this.

I have placed spca5xx.o in the flash under /usr/local/modules/spca5xx.o
and I do a /usr/local/modules/spca5xx.o in the pre-boot file.
however, if I (un)plug the device, it does not get recognised.

see output of dmesg


[admin@NAS root]$ dmesg
le entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
Checking for 'wait' instruction... unavailable.
POSIX conformance testing by UNIFIX
PCI: Initializing host
PCI: Fixing up bus 0
PCI: Fixing up bridge
PCI: Fixing up bus 1
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au)
devfs: boot_options: 0x1
NTFS driver v1.1.22 [Flags: R/O]
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0xb8000300 (irq = 3) is a 16550A
ttyS01 at 0xb8000400 (irq = 3) is a 16550A
HDLC line discipline: version $Revision$, maxframe=4096
N_HDLC line discipline registered.
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
MPPE/MPPC encryption/compression module registered
PPPoL2TP kernel driver, V0.13 (oleg@cs.msu.su)
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Amd/Fujitsu Extended Query Table v1.3 at 0x0040
Flash Id: Vendor: 0x0001 Device: 0x007e
number of CFI chips: 1
Flash device: 0x800000 at 0x1c000000
Physically mapped flash: squashfs filesystem found at block 912
Creating 5 MTD partitions on "Physically mapped flash":
0x00000000-0x00040000 : "boot"
0x00040000-0x007f0000 : "linux"
0x000e4000-0x007f0000 : "rootfs"
0x007f0000-0x00800000 : "nvram"
0x003e0000-0x007f0000 : "flashfs"
sflash: found no supported devices
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
Linux IP multicast router 0.06 plus PIM-SM
ip_conntrack version 2.1 (256 buckets, 2048 max) - 352 bytes per conntrack
ip_conntrack_pptp version 1.9 loaded
ip_nat_pptp version 1.5 loaded
ip_tables: (C) 2000-2002 Netfilter core team
ipt_time loading
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
IPv6 v0.8 for NET4.0
IPv6 over IPv4 tunneling driver
NET4: Ethernet Bridge 008 for NET4.0
802.1Q VLAN Support v1.7 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
FAT: bogus logical sector size 59648
FAT: bogus logical sector size 59648
NTFS: Unable to set blocksize 512.
VFS: Mounted root (squashfs filesystem) readonly.
Mounted devfs on /dev
Freeing unused kernel memory: 72k freed
Algorithmics/MIPS FPU Emulator v1.5
Linux video capture interface: v1.00
eth0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.150.10.16
unregister_netdevice: device eth1/8106cc00 never was registered
PCI: Enabling device 01:02.0 (0004 -> 0006)
eth1: Broadcom BCM4318 802.11 Wireless Controller 4.150.10.16
vlan0: add 33:33:00:00:00:01 mcast address to master interface
vlan0: add 33:33:ff:57:ba:b8 mcast address to master interface
vlan0: dev_set_promiscuity(master, 1)
device eth0 entered promiscuous mode
device vlan0 entered promiscuous mode
device eth1 entered promiscuous mode
vlan1: add 33:33:00:00:00:01 mcast address to master interface
vlan1: add 33:33:ff:57:ba:b8 mcast address to master interface
vlan1: dev_set_promiscuity(master, 1)
device vlan1 entered promiscuous mode
br0: port 3(vlan1) entering learning state
br0: port 2(eth1) entering learning state
br0: port 1(vlan0) entering learning state
br0: port 3(vlan1) entering forwarding state
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan0) entering forwarding state
br0: topology change detected, propagating
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 20:50:46 Mar 17 2008
usb-uhci.c: High bandwidth mode enabled
PCI: Enabling device 01:03.0 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x100, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Enabling device 01:03.1 (0000 -> 0001)
ECHI PCI device 30381106 found.
UCHI reg 0x41 = 10
UCHI reg 0x41 changed to = 0
usb-uhci.c: USB UHCI at I/O 0x120, IRQ 12
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Enabling device 01:03.2 (0000 -> 0002)
ehci_hcd 01:03.2: PCI device 1106:3104
ehci_hcd 01:03.2: irq 12, pci mem c0124000
usb.c: new USB bus registered, assigned bus number 3
ECHI PCI device 31041106 found.
ECHI reg 0x49 = 80010f20
ECHI reg 0x49 changed to = 80010f00
ECHI reg 0x4b = 80010f09
ECHI reg 0x4b changed to = 80010f29
PCI: 01:03.2 PCI cache line size set incorrectly (0 bytes) by BIOS/FW, correcting to 32
ehci_hcd 01:03.2: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29/2.4
hub.c: USB hub found
hub.c: 4 ports detected
usb.c: registered new driver usblp
printer.c: v0.13: USB Printer Device Class driver
hub.c: connect-debounce failed, port 1 disabled
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.
hub.c: new USB device 01:03.2-2, assigned address 2
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: WD Model: 5000AAJ External Rev: 1.06
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
Partition check:
/dev/scsi/host0/bus0/target0/lun0:<7>eth0: no IPv6 routers present
vlan0: no IPv6 routers present
eth1: no IPv6 routers present
p1 p2 p3
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
br0: no IPv6 routers present
vlan1: no IPv6 routers present
hub.c: new USB device 01:03.0-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x46d/0x920) is not claimed by any active driver.
Adding Swap: 506036k swap-space (priority -1)
usb.c: registered new driver spca5xx
drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered
usb.c: USB disconnect on device 01:03.0-1 address 2
hub.c: new USB device 01:03.0-1, assigned address 3
usb.c: USB device 3 (vend/prod 0x46d/0x920) is not claimed by any active driver.
usb.c: USB disconnect on device 01:03.0-1 address 3
hub.c: new USB device 01:03.0-1, assigned address 4
usb.c: USB device 4 (vend/prod 0x46d/0x920) is not claimed by any active driver.
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,1), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,3), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
usb.c: USB disconnect on device 01:03.0-1 address 4
hub.c: new USB device 01:03.0-1, assigned address 5
usb.c: USB device 5 (vend/prod 0x46d/0x920) is not claimed by any active driver.
usb.c: USB disconnect on device 01:03.0-1 address 5
hub.c: new USB device 01:03.0-1, assigned address 6
usb.c: USB device 6 (vend/prod 0x46d/0x920) is not claimed by any active driver.
[admin@NAS root]$

esp. the last lines

what am I doing wrong here?
and, if this is solved, how to continue.?

TIA

wirespot
14-07-2008, 22:02
All I see in your log is the webcam being connected and disconnected.

You need to load the module, not run it:


insmod spcaxxx.o

raas
15-07-2008, 13:08
Hello wirespot, thanks for your reply,

that was a typo i did.. in the pre-boot I do a


insmod /usr/local/modules/spca5xx.o
(like you said)

however I doesn't seem to run,

After a reboot I issued

insmod /usr/local/modules/spca5xx.o
in an ssh session manually, it returns with a promt (if I do it again, there's a message it's already there)

After that I posted the output of dmesg
(after I first (un)plugged the camera several times)


could there be something wrong with the spca5xx.o?
I got it from http://www.wl500g.info/showthread.php?t=6734&highlight=spca5xx.o

Any ideas?

raas
15-07-2008, 19:20
Hi,

some changes, I still haven't figured out why it doesn't work with the pre-boot script (the file is executable), but when I run it by hand ('registering' the spca5xx.o)
the last lines of dmesg looks like this


usb.c: registered new driver spca5xx
drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered
usb.c: USB disconnect on device 01:03.0-1 address 2
hub.c: new USB device 01:03.0-1, assigned address 3
usb.c: USB device 3 (vend/prod 0x46d/0x920) is not claimed by any active driver.
[admin@NAS root]$


as you can see the driver is registered, but the driver doesn't recognize the camera? do I need an other driver or ??? i don't get it.

dyonisos
15-07-2008, 21:53
Does the webcam work at all? Have you tried it on a different Linux and/or Windows system? The spca5xx driver you have should be working.

raas
16-07-2008, 13:28
hehe.. smart thinking, dyonisos,
I got the webcam from a friend.. it is used.. but it is supposed to work.
haven't tried it on an normal pc though, but will do this tonight.

Thanks for your suggestion.

wpte
16-07-2008, 23:43
hehe.. smart thinking, dyonisos,
I got the webcam from a friend.. it is used.. but it is supposed to work.
haven't tried it on an normal pc though, but will do this tonight.

Thanks for your suggestion.

quickcam pro 4000 is working for me, but I think it is using a different driver.
I think you need the pwc driver


insmod videodev
insmod pwc
insmod pwcx

is this working?:)

raas
17-07-2008, 13:56
dyonisis and wpte, thanks for your reply.

I've tried the webcam on my pc, but no luck,
The webcam didn't came with a box, so I had to retrieve model/driver through a number on the webcam: V/UAL-9 this pointed me in the direction that it is a quickcam express. the picuter of a quickcam express looks like my cam, So I suppose this is the cam..

DL'd and installed the drivers, but when I connect the webcam, the logitech software doesn't detect it.. That's strange.. it looks like the webcam isn't working, perhaps it's broken, but that's strange, 'cause this friend of mine used it, and put it away working.

However, If I don't get it to work on a pc, I don't think it will work on the asus (indeed dyonisis)...
Will fidle around with it to see if i can get it to work.

wpte
17-07-2008, 17:06
dyonisis and wpte, thanks for your reply.

I've tried the webcam on my pc, but no luck,
The webcam didn't came with a box, so I had to retrieve model/driver through a number on the webcam: V/UAL-9 this pointed me in the direction that it is a quickcam express. the picuter of a quickcam express looks like my cam, So I suppose this is the cam..

DL'd and installed the drivers, but when I connect the webcam, the logitech software doesn't detect it.. That's strange.. it looks like the webcam isn't working, perhaps it's broken, but that's strange, 'cause this friend of mine used it, and put it away working.

However, If I don't get it to work on a pc, I don't think it will work on the asus (indeed dyonisis)...
Will fidle around with it to see if i can get it to work.

you probably need an old driver, they are not really downloadable on logitechs website anymore, but some google will help you out:)
I had it too with an old logitech one, doesnt work on the new drivers, but the old ones work perfectly:cool:

Tamadite
16-05-2010, 17:10
I have found the following page have the source code for the Logitech webcam I have.

http://qce-ga.sourceforge.net/

Will I get the webcam to work with router's web interface by just complying the drivers? In other words, is router's web interface directly connected to the already defined drivers or will it work as soon as the device get claimed by the driver?

(Why I do not try it? Because I want to avoid dedicating several hours to set up an WL-500gP compiling environment in vain)

wpte
16-05-2010, 19:10
(Why I do not try it? Because I want to avoid dedicating several hours to set up an WL-500gP compiling environment in vain)

not sure if it directly works...

and on the setup... including installing linux (like ubuntu) well... an hour or so for beginners:p
compiling is usually max. 30min depending on your pc :)

making things easier:
for software you need this:

build-essential
libncurses-dev
gawk
flex
bison
zlib-dev
subversion
build essential contains all the build software:)

also don't forget to sudo things when they don't work:D
you could also make /opt as your own so you don't need sudo-ing all the time:

sudo chown yourusername:root -R /opt

the rest is just follow the instructions on the wiki: http://code.google.com/p/wl500g/wiki/CompilingCustomFirmware :)

Tamadite
21-05-2010, 20:35
I manage to compile the driver targeting my x86 under Ubuntu but I can't get Makefile to compile for MIPSEL. There is no CC or CPP variable I can set as:

CC = mipsel-linux-gcc
CPP = mipsel-linux-gcc -E

This is the Makefile that comes with version 0.6.6-6 of the driver.


#
# Makefile for the qc-usb driver (based on Linux Philips USB Webcam driver)
#
# NOTE: This make file can serve as both an external Makefile (launched
# directly by the user), or as the sub-dir Makefile used by the kernel
# build system.

# If CONFIG_USB_QC isn't set, we'll assume the user want to build this driver has a module

ifndef CONFIG_USB_QC
CONFIG_USB_QC=m
endif

ifneq ($(KERNELRELEASE),)

quickcam-objs := qc-driver.o qc-hdcs.o qc-pb0100.o qc-vv6410.o
quickcam-objs += qc-formats.o qc-mjpeg.o qc-memory.o

obj-$(CONFIG_USB_QC) += quickcam.o

EXTRA_CFLAGS=-Wall -I$(PWD) -DNOKERNEL

else
ifndef KVER
KVER := $(shell uname -r)
endif
KLINK := $(shell test -e /lib/modules/${KVER}/source/ && echo source || echo "build")
ifndef KSRC
KSRC := /lib/modules/$(KVER)/$(KLINK)
endif
KMISC := /lib/modules/$(KVER)/drivers/media/video/
PWD := $(shell pwd)

all default:
$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules

install: default
install -d $(DESTDIR)/$(KMISC)
install -m 644 -c quickcam.ko $(DESTDIR)/$(KMISC)

uninstall:
-rm -rf $(DESTDIR)/$(KMISC)/quickcam.ko

clean:
rm -f *.[oas] .*.flags *.ko .*.cmd .*.d .*.tmp *.mod.c
rm -rf .tmp_versions qcset

CFLAGS ?= -Wall -O2

qcset: qcset.c quickcam.h
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ -lm $<
endif


any idea?

lly
21-05-2010, 20:47
This is the Makefile that comes with version 0.6.6-6 of the driver.

any idea?
Unfortunately, Makefile above, don't ready for cross-compiling. You have to rewrite some parts of it.

Tamadite
21-05-2010, 22:30
You have to rewrite some parts of it.

That's not an option for me right now since my knowledge on this matter is quite limited.

If the Makefile is not ready for cross-compiling, will I get it to work if I try to compile it directly on the router?

wpte
21-05-2010, 23:52
That's not an option for me right now since my knowledge on this matter is quite limited.

If the Makefile is not ready for cross-compiling, will I get it to work if I try to compile it directly on the router?

You need the kernel headers for that I believe... so that will also be a bit problematic.
furthermore the driver will be compiled with the optware uclibc, which is older than the firmware uclibc. so that might cause trouble as well when you want to use it:(

lly
22-05-2010, 08:07
That's not an option for me right now since my knowledge on this matter is quite limited.
If you want driver for "classic" Oleg FW 1.9.2.7-10, it compiled already - http://translate.google.com/translate?u=http%3A%2F%2Fwl500g.info%2Fshowpost.ph p%3Fp%3D119575%26postcount%3D46%26langid%3D3&sl=ru&tl=en&hl=&ie=UTF-8 (google autotranslate).

If you want to compile it for 1.9.2.7-d, you should:

build firmware from SVN first
setup proper LINUX_DIR
replace CC = mipsel-linux-gcc to CC = mipsel-linux-gcc-3.4.6


NB! Anyway, driver can be buggy

kolaCZek
02-08-2010, 10:43
Please,
can enyone built spca5xx driver for 1.9.2.7-d ?

fukushimaku
06-03-2011, 11:15
Hello,

I read from a lot of threads on different forums about
spca5xx but no results... I think I have 3 choices:

1st: compile the module onto router using actual compiler
2nd: cross-compilling the module on a pc machine
3rd: compile using same gcc version 3.2.3 with Broadcom
modifications from Asus directly to router

I attached here the makefile from 2nd and the result (spca5xx.o).


1st: I tried also to compile on the router the drivers:
http://mxhaard.free.fr/spca50x/Download/spca5xx-v4l1goodbye.tar.gz

- system: Broadcom BCM4704 chip rev 9 pkg 0;
- cpu: BCM3302 V0.6;
- Linux version 2.4.20 (gcc version 3.2.3 with Broadcom modifications) #109;
- firmware 1.9.2.7-10-USB-1.71 (from koppel.cz);
- webcam Logitech, Inc. QuickCam Communicate STX; ID: 046d:08d7;
- compiler: gcc version 4.1.1;
- linker: gnu ld version 2.17.50.0.8 20061201
(both installed with ipkg on /opt/ [compact flash, 16gb card])

At compilation process everything seems to stuck at /opt/include/asm/softirq.h
The output of `make` is:
-------------------------
Compiling drivers/usb/spcadecoder.c
In file included from /opt/include/linux/interrupt.h:46,
from /opt/include/linux/usb.h:139,
from drivers/usb/spca5xx.h:14,
from drivers/usb/spcadecoder.h:5,
from drivers/usb/spcadecoder.c:36:
/opt/include/asm/softirq.h: In function 'cpu_bh_disable':
/opt/include/asm/softirq.h:18: error: invalid lvalue in increment
/opt/include/asm/softirq.h: In function '__cpu_bh_enable':
/opt/include/asm/softirq.h:25: error: invalid lvalue in decrement
drivers/usb/spcadecoder.c: In function 'fun_D':
drivers/usb/spcadecoder.c:809: warning: value computed is not used
drivers/usb/spcadecoder.c: In function 'decode_spca561':
drivers/usb/spcadecoder.c:1422: warning: pointer targets in passing argument 4 of 'internal_spca561_decode' differ in signedness
drivers/usb/spcadecoder.c: In function 'spca50x_outpicture':
drivers/usb/spcadecoder.c:2161: warning: pointer targets in passing argument 2 of 'decode_spca561' differ in signedness
drivers/usb/spcadecoder.c: In function 'yuv_decode':
drivers/usb/spcadecoder.c:2270: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function 'jpeg_decode411':
drivers/usb/spcadecoder.c:2622: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function 'jpeg_decode422':
drivers/usb/spcadecoder.c:3001: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function 'bayer_decode':
drivers/usb/spcadecoder.c:3356: warning: cast increases required alignment of target type
make: *** [drivers/usb/spcadecoder.o] Error 1
-------------------------

2nd: I downloaded that version from the Asus's site
(and also the source of firmware: GPL_WL500GP_1.9.7.7.tar.gz and toolschain323.tar.gz),
extracted into pc#2 with CentOS 5.5, and configured in Makefile from spca5xx-v4l1goodbye.tar.gz
I compiled it after many struggles. Only few warnings and no error (see below):
----------------------------------------------------------------
# make
Compiling drivers/usb/spcadecoder.c
In file included from /opt/firmware/broadcom/src/linux/linux/include/linux/net.h:22,
from /opt/firmware/broadcom/src/linux/linux/include/linux/fs.h:15,
from /opt/firmware/broadcom/src/linux/linux/include/linux/capability.h:17,
from /opt/firmware/broadcom/src/linux/linux/include/linux/binfmts.h:5,
from /opt/firmware/broadcom/src/linux/linux/include/linux/sched.h:9,
from /opt/firmware/broadcom/src/linux/linux/include/asm/uaccess.h:13,
from drivers/usb/spca5xx.h:11,
from drivers/usb/spcadecoder.h:5,
from drivers/usb/spcadecoder.c:36:
/opt/firmware/broadcom/src/linux/linux/include/linux/socket.h: In function `__cmsg_nxthdr':
/opt/firmware/broadcom/src/linux/linux/include/linux/socket.h:107: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function `yuv_decode':
drivers/usb/spcadecoder.c:2270: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function `jpeg_decode411':
drivers/usb/spcadecoder.c:2622: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function `jpeg_decode422':
drivers/usb/spcadecoder.c:3001: warning: cast increases required alignment of target type
drivers/usb/spcadecoder.c: In function `bayer_decode':
drivers/usb/spcadecoder.c:3356: warning: cast increases required alignment of target type
Compiling drivers/usb/spca5xx.c
In file included from /opt/firmware/broadcom/src/linux/linux/include/linux/net.h:22,
from /opt/firmware/broadcom/src/linux/linux/include/linux/fs.h:15,
from drivers/usb/spca5xx.c:45:
/opt/firmware/broadcom/src/linux/linux/include/linux/socket.h: In function `__cmsg_nxthdr':
/opt/firmware/broadcom/src/linux/linux/include/linux/socket.h:107: warning: cast increases required alignment of target type
In file included from drivers/usb/spca5xx.c:847:
drivers/usb/spcausb.h: In function `spca50x_reg_read_with_value':
drivers/usb/spcausb.h:335: warning: cast increases required alignment of target type
drivers/usb/spcausb.h:341: warning: cast increases required alignment of target type
drivers/usb/spca5xx.c: At top level:
drivers/usb/spca5xx.c:5660: warning: initialization from incompatible pointer type
drivers/usb/spca5xx.c:5661: warning: initialization from incompatible pointer type
drivers/usb/spca5xx.c:5662: warning: initialization from incompatible pointer type
drivers/usb/spca5xx.c:5663: warning: braces around scalar initializer
drivers/usb/spca5xx.c:5663: warning: (near initialization for `spca5xx_driver.disconnect')
drivers/usb/spca5xx.c:5663: warning: excess elements in scalar initializer
drivers/usb/spca5xx.c:5663: warning: (near initialization for `spca5xx_driver.disconnect')
drivers/usb/spca5xx.c:150: warning: `bright' defined but not used
drivers/usb/spca5xx.c:151: warning: `contrast' defined but not used
Linking spca5xx.o
----------------------------------------------------------------
Also there are few interesting results:
- on router, after /sbin/insmod videodev and
/sbin/insmod /opt/lib/webcam/spca5xx.o
there are no complains;
- some weird characters appear when the camera is loaded;
- appeared the message: `vlan1: dev_set_allmulti(master, 1)`;
- no video0 in /dev (nor /dev/4l/video0);
- no other errors, no tained, no unresolved symbols;
- there are no files in /proc/video nor /proc/spca50x
and some informations in files from /proc/bus/usb (see attached);
----------------------------------------------------------------
dmesg output:
----------------------------------------------------------------
usb.c: registered new driver audio
usb.c: audio driver claimed interface 81e304d0
usbaudio: device 2 audiocontrol interface 1 has 1 input and 0 output AudioStreaming interfaces
usbaudio: device 2 interface 2 altsetting 1 channels 1 framesize 2 configured
usbaudio: valid input sample rate 8000
usbaudio: device 2 interface 2 altsetting 1: format 0x00000010 sratelo 8000 sratehi 8000 attributes 0x00
usbaudio: device 2 interface 2 altsetting 2 channels 1 framesize 2 configured
usbaudio: valid input sample rate 16000
usbaudio: device 2 interface 2 altsetting 2: format 0x00000010 sratelo 16000 sratehi 16000 attributes 0x00
usbaudio: registered dsp 14,3
usbaudio: constructing mixer for Terminal 3 type 0x0101
usbaudio: warning: found 1 of 0 logical channels.
usbaudio: assuming the channel found is the master channel (got a Philips camera?). Should be fine.
usbaudio: registered mixer 14,0
usb_audio_parsecontrol: usb_audio_state at 81c66dc0
usb.c: audio driver claimed interface 81e304b8
audio.c: v1.0.0:USB Audio Class driver
[b]vlan1: dev_set_allmulti(master, 1)
Linux video capture interface: v1.00
usb.c: registered new driver Ðÿ½',
usb.c: Ðÿ½', driver claimed interface 81e304a0
drivers/usb/spca5xx.c: spca5xx driver 00.60.00.1 registered
------------------------------------------------------

3rd: very slow (you know already the deal with the router's limited cpu, ram)...
so: no problem at `configure`, errors at `make`... still working at it...
don't know if I will see it finaly and properly compiled :(

I really don't still want to get to 2.6.x kernel; after few months maybe.
I appreciate every single advice in this problem.