Plug And Pray.

I read a joke recently, I don’t recall where, that went something like this:

Our Hero is a devout Christian and an inveterate smoker, and one day speaking to a priest, he says “Father, I would like to be a good Christian, but I am a heavy smoker – is it alright for me to smoke while I pray?”

To which the priest replies “My son, a prayer is a conversation with God. It would be wrong for you to indulge such an impure vice at such a time.”

Our Hero thinks about this, thanks the padre and goes on his way. The next week, he returns with another question; “Father, I would like to be a good Christian, but I am a heavy smoker; is it alright for me to pray while I smoke?”

To which the priest smiled, and replied “My son, you may pray anytime.”

This rambles a bit, and it’s pretty nerdy, so if you don’t have a little bit of time on your hands, and those hands happen to be connected to a nerd or nerd-like brain by some apparatus I leave to your discretion, you should probably skip this one.

I’ve got this camera, a Centrios DSC-214, that’s apparently Unsupported In Linux®.The digital camera part works fine, like a normal USB key, but apparently there’s some magical webcam functionality that I’m naively trying to get working, and I’m getting absolutely no love.

This is part of what’s confusing me: step 1, how does USB work?


mhoye@werewindle:/etc/usbmgr$ ls
class host network preload.conf usbmgr.conf vendor
mhoye@werewindle:/etc/usbmgr$ locate usb.ids
/usr/share/apps/kcmusb/usb.ids
/usr/share/hwdata/usb.ids
/usr/share/misc/usb.ids
/usr/share/misc/usb.ids.old
mhoye@werewindle:/etc/usbmgr$ _

All of those usb.ids files are different, and none of them seem to be related to the subdirectories of /etc/usbmgr/vendor/ where the magic apparently really happens.


mhoye@werewindle:/etc/usbmgr$ lsusb
Bus 001 Device 003: ID 052b:1708 Tekom Technologies, Inc.
Bus 001 Device 001: ID 0000:0000
mhoye@werewindle:/etc/usbmgr$ _

The way I understand that this is supposed to work is:

  • I plug in the camera.
  • usbmgr realizes I’ve plugged something in.
  • usbmgr associates that device with a driver.
  • usbmgr then points the /dev/video symlink towards
  • whatever the relevant /dev/video## node is.

Then, I run my webcam programs, whatever they are, point them at /dev/video and all is right with the world. What really happens is a lot of nothing, because none of the video nodes in /dev appear to think they’re plugged into anything. So I tried this:


cd /etc/usbmgr/vendors
mkdir 052b
cd 052b
mkdir 1708

and in there, in a file called “modules”, I put the the words “usbvideo” and “spca50x”, because
I’ve found some drivers here that have consented, after some wierd Makefile-fixing, to compile themselves and allow themselves to be insmodded on my machine. Tekom’s website is horribly crippled, like someone broke a vintage bottle of Chateau Macromedia ’98 over the bar and slashed its hamstrings, but I’ve managed to extract some information from this page that I found by, we’ll, let’s not talk about that, and some prodding at the windows drivers seems to imply that there’s a SunPlus chip in my oh-look-it’s-rebranded camera.

I suppose I could put that stuff in usbmgr.conf, but that didn’t take when I tried it with some random webcam drivers just for kicks – as in “no news in dmesg”, not “I can’t edit a file” or “hey, surprise, Ooog try hit hardware with random, rock-shaped driver, go crunch fall down.”

But now, of course, because Ooog compile module against source tree with changed extraversion entry in makefile, because that’s what Ooog apparently supposed to do, it fails installation calamitously, tells Ooog his kernel is tainted and dumps a distressing amount of what appears to be binary noise into Ooog’s logfiles:

Apr 15 01:20:17 werewindle kernel: spca50x: version magic '2.6.4-MH1 preempt PENTIUMIII gcc-3.3' should be '2.6.4-1-686 preempt 686
gcc-3.3'
Apr 15 01:20:17 werewindle modprobe: FATAL: Error inserting spca50x (/lib/modules/2.6.4-1-686/kernel^@^@^@^@^@^@^@^@^@...

...for a page or three. So I may have just screwed my system for good. Woot. I'm going to have to get a clean set of kernel headers, recompile, fsck everything and keep my fingers crossed, I guess.

If you're out there, and you've made it this far, I'd like to know:

  • What's up with all those usb.ids files.
  • Roughly speaking, what's usbmgr really doing/supposed to be doing. I can't seem to find any docs on the topic.
  • Why I'm doing this at all.

This is a nice, knockaround digital camera. I like it a lot. But it would be really nice if I could get consumer hardware to work the way people who don't actually code for fun and sysadmin for a living apparently get to.

Whoops: found the joke here.

5 Comments

  1. Posted April 16, 2004 at 2:45 am | Permalink

    The disturbing unaddressed question underlying this entire entry is: What are you going to do with a webcam, anyway? The world isn’t ready for http://xxx.hoyecam.com.

  2. Mike Hoye
    Posted April 16, 2004 at 3:15 am | Permalink

    If you build it, they will come…

    Mercifully no.

  3. Posted April 16, 2004 at 3:18 am | Permalink

    Do you want a webcam, or a chatcam?

    USB cams are fine for chatcams, but I’ve always had the best results for webcams with a video capture card and a real camera that pumps out a video or SVideo signal.

  4. Mike Hoye
    Posted April 16, 2004 at 9:51 am | Permalink

    What I really want is something that a script can tell to take pictures on a regular interval. They don’t have to be particularly pretty pictures, but I am looking for some kind of picture-every-five-minutes functionality. The chatcam stuff I’m not so, or at all, worried about.

  5. Mike Bruce
    Posted April 20, 2004 at 3:46 pm | Permalink

    So, no one has answered your question. Well.

    usbmgr is just a Hotplug program. It just fiddles with modules and runs scripts. It doesn’t appear to be terribly useful, in your case. It also doesn’t appear to be intended for 2.6.x.

    All you have to do to get a usb device working in linux is to load the appropriate driver chain. So probably just modprobe usbvideo and the driver module. If that works, toss them into /etc/modules and be done with it. it sounds like you sort of did that. If it didn’t work, your drivers suck.

    I have no particular advice on the driver compilation.

    I will say that my policy of confirming good linux support before buying things is reinforced by your adventures, here.

One Trackback

  1. By Google on March 16, 2013 at 6:56 am

    Google…