OpenWrt Forum Archive

Topic: Logitech Quickcam Pro for Notebooks in full res with ASUS wl-500gP v2

The content of this topic has been archived on 7 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I've got an ASUS wl-500gP v2 router with a compiled kamikaze r11000 on it. (the latest SVN version won't boot)
Loaded ohci_hcd, and ehci_hcd, and uvcvideo (SVN r215)

root@OpenWrt:/# lsmod
Module                  Size  Used by    Not tainted
uvcvideo               49840  0
videodev               23104  1 uvcvideo
compat_ioctl32           448  1 uvcvideo
v4l1_compat            11280  2 uvcvideo,videodev
v4l2_common            12608  2 uvcvideo,videodev
ehci_hcd               28848  0
ohci_hcd               16656  0
input_core             20208  2 uvcvideo
nf_nat_tftp              480  0
nf_conntrack_tftp       2480  1 nf_nat_tftp
nf_nat_irc               960  0
nf_conntrack_irc        2832  1 nf_nat_irc
nf_nat_ftp              1472  0
nf_conntrack_ftp        5152  1 nf_nat_ftp
ppp_async               9856  0
ppp_generic            20192  1 ppp_async
slhc                    5376  1 ppp_generic
crc_ccitt               1024  1 ppp_async
usbcore               106576  4 uvcvideo,ehci_hcd,ohci_hcd
switch_robo             4256  0
switch_core             5088  1 switch_robo
diag                    7120  0

Plugged in the webcam, dmesg says:
usb 1-1.2: new full speed USB device using ohci_hcd and address 3
usb 1-1.2: configuration #1 chosen from 1 choice
uvcvideo: Found UVC 1.00 device <unnamed> (046d:0991)
input: UVC Camera (046d:0991) as /devices/ssb0:1/usb1/1-1/1-1.2/1-1.2:1.0/input/input0
usbcore: registered new interface driver uvcvideo
USB Video Class driver (SVN r215)

But looking in de usb devices file, it connects only with low speed (Spd=12). Spd should be 480.

root@OpenWrt:/# cat /proc/bus/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  1/900 us ( 0%), #Int=  2, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.23.16 ssb-usb-ohci
S:  Product=SSB OHCI Controller
S:  SerialNumber=ssb0:1
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0424 ProdID=2502 Rev= 0.01
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  9 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=046d ProdID=0991 Rev= 0.05
S:  SerialNumber=74767CD8
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00
A:  FirstIf#= 2 IfCount= 2 Cls=01(audio) Sub=02 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo
E:  Ad=87(I) Atr=03(Int.) MxPS=  16 Ivl=16ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
I:  If#= 1 Alt= 1 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 192 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 384 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 512 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 640 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 800 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo
E:  Ad=81(I) Atr=05(Isoc) MxPS= 944 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I:* If#= 3 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I:  If#= 3 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
E:  Ad=86(I) Atr=05(Isoc) MxPS=  68 Ivl=1ms

Without full speed, the cam can't transfer the raw image, instead it switches the highest resolution alvailable in this mode. In this case 176x144

root@OpenWrt:/# mjpg_streamer -i "input_uvc.so -d /dev/video0 -y -r 1600x1200"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1600 x 1200
i: Frames Per Second.: 5
i: Format............: YUV
i: JPEG Quality......: 80
format asked unavailable get width 176 height 144
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled

Using mjpeg, the highest available resolution is 800x600

root@OpenWrt:/# mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 1600x1200"   
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1600 x 1200
i: Frames Per Second.: 5
i: Format............: MJPEG
format asked unavailable get width 800 height 600
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled

Anyone have a clue, what could be the problem? Why not connects the webcam with full seed? Maybe the new USB controller of the V2?

I suspect you are missing a USB 2 kernel module. The messages you are getting are consistent; you have to bear in mind that for historical reasons what is known as full-speed is USB 1 and 12Mbits. USB 2 is called high-speed and does 480Mbits. When you do get USB 2 you will find that the camera won't do 1600x1200 as a MJPEG, it only does 960x720. 1600x1200 is only available in YUY2.

---
Entikle

You`re right, I need high speed USB with 480Mbit connection speed.
ehci_hcd and ohci_hcd modules are both loaded. Maybe this is the maximum speed available with this "new" usb chip of the v2?

I've tried the same image and settings with an Asus wl-500gP v1, and it works great! Unfortunately, v1 is getting harder to find in the stores. sad

There are better routers out there like Alix or Avila boards. Try to avoid this Broadcom crap.

No, you got usb2 kernel module loaded (ehci_hcd) and wl-500gP has a usb2 host controller, so it's not a router issue (forum2008 should know about it).
The point is, all the common webcams i know about can't work at high speed!! Even thou vendors declare a webcam 'usb2 capable', this only means it works on usb2 bus. Of course it does, usb2 is backwards compatible to usb1!! The're kidding!!!

Just look at the line 'T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  9 Spd=12  MxCh= 0'
'Spd=12' means that your cam works at 12 Mbit/s. That's all. Uvc driver works because your cam is uvc specs compliant. The resolution is bound to the sensor quality: for example for my cam with 1.3 Mpixel sensor i got 640x480. If the cam can higher resolutions this is through interlacing algorithms / extra cam capabilities. So if you don't have access to that cam's chipset specifications you can't even write a uvc driver extension for your cam to get higher resolutions.

Feel yourself lucky, 'cause your cam is a truly mjpeg streaming cam. I got 2 Logitec STX, which were supposed to be. But they're YUV ...

No, it really should negotiate for and work at 480Mbits; the internals are the same as the Pro 9000 and that definitely does. As long as this is the "Pro for Notebooks" we are talking about and not the "for Notebooks Pro" (sigh, Logitech product names). If it doesn't I would suspect a cable issue - you aren't running this through a hub or one of those evil USB cable extenders, are you? Does it come up as a 480Mbit device if you plug it into a Mac or a PC?

The Asus 500gp v2 and 520Gu both use the same processor with integrated USB.  There is a problem with the way USB is handled in Kamikaze, in the 2.4 kernel, and with this specific processor.  Unless you want to try the 2.6 kernel from trunk, USB2.0 doesn't work.  As far as I know, wireless doesn't work for the broadcom wireless chipsets in kernel 2.6.  So, until some more software work is finished, it looks like you're lucky it even works at all.  Using the 2.4 kernel on the 520gu, the router would lock up tight as a drum after very little activity on the USB port. Don't be suprised if you see that as well.

Ok, the current status is the following:
Asus wl-500gP v1
Logitech Quickcam pro 9000 for notebooks
Kamikaze r11000 with 2.6 kernel, using broadcom wifi.

The cam works at 480Mbit, and in full resolution (1600x1200)

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=046d ProdID=0991 Rev= 0.05
S:  SerialNumber=74767CD8
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA

MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 1600 x 1200
i: Frames Per Second.: 1
i: Format............: YUV
i: JPEG Quality......: 75
o: output folder.....: /tmp
o: delay after save..: 60000
o: picture diff-bytes: 0
o: command...........: disabled

Broadcom wireless also seems to be working on 2.6 kernel!
Memory is  getting tight, but it's still enough to run an openvpn client:
                         total         used         free       shared      buffers
  Mem:        30020        28476         1544            0          284

root@OpenWrt:/# ps
  PID  Uid        VSZ Stat Command
    1 root       2412 S   init       
    2 root            SW< [kthreadd]
    3 root            SW< [ksoftirqd/0]
    4 root            SW< [events/0]
    5 root            SW< [khelper]
   19 root            SW< [kblockd/0]
   53 root            SW  [pdflush]
   54 root            SW  [pdflush]
   55 root            SW< [kswapd0]
   56 root            SW< [aio/0]
   68 root            SW< [mtdblockd]
  227 root            SWN [jffs2_gcd_mtd3]
  256 root       1128 S   /sbin/hotplug2 --override --persistent --max-children
  407 root       2424 S   udhcpc -t 0 -i eth0.1 -b -p /var/run/eth0.1.pid -R
  450 root            SW< [khubd]
  467 root            SW< [b43]
  853 root       2416 S   crond -c /etc/crontabs
  858 root       2412 S   telnetd -l /bin/login
  874 root       2428 S   udhcpc -t 0 -i wlan0 -b -p /var/run/wlan0.pid -R
  881 root       5084 S   openvpn --writepid /var/run/openvpn.pid --daemon --co
  886 root       2412 S   init       
1142 root       2424 S   /bin/ash --login
1230 root       2412 S   /bin/sh -c if ps | grep mjpg_streamer >/dev/null; the
1240 root       2408 S   /bin/sh /usr/bin/stream
1241 root      25776 S   mjpg_streamer -i input_uvc.so -d /dev/video0 -f 1 -y
1243 root      25776 S   mjpg_streamer -i input_uvc.so -d /dev/video0 -f 1 -y
1244 root      25776 R   mjpg_streamer -i input_uvc.so -d /dev/video0 -f 1 -y
1247 root      25776 S   mjpg_streamer -i input_uvc.so -d /dev/video0 -f 1 -y
1288 root       2412 R   ps

Here is a picture from the cam, refreshing every 60 seconds: http://ftp.viharvadasz.hu/~kandras/vvftplive.jpg
It's pointed to the sky, like a "stormhuntig camera"
I will test it for a few days, and see if it's stable, and then will try again with the v2.

There's a patch on openwrt-devel http://lists.openwrt.org/pipermail/open … 02465.html that adds a ehci driver for the bcm5354. It hasn't been added to svn yet.

There are some webcam related issues discussed toward the end of this thread http://forum.openwrt.org/viewtopic.php?id=15106

The prospects for the v2 radio working on 2.6 aren't very bright. It doesn't look like the reverse engineering has been done for the 5354's PHY yet. So, support for it in b43 is a while off.

The discussion might have continued from here.