Live data from Hacker News

Driver adventures for a 1999 webcam

blog.benjojo.co.uk

71–78 of 78 posts

Re: Driver adventures for a 1999 webcam

#71
post #51
post #12

Reminds me when I had to read barcodes from a USB-connected barcode scanner on a Mac. The manufacturer supplied a closed-source library which only supported PPC code and they told me that they lost the source code, so I couldn't easily add intel support. In the end I sniffed the USB protocol of the windows driver and was delighted to see how they abused the control endpoint rather than setting up proper data endpoint…

That sounds pretty fun (once you're finished with it, I'm sure)! How does sniffing the USB work? Do you do that via some software/kernel extension, via special hardware, or something simpler? Do you find there are some USB devices where the manufacturer would rather you didn't sniff their traffic and make it more painful to piece together?

Wireshark via usbmon under Linux can be used to capture USB traffic. This is especially useful when the device has windows drivers, as usbmon can be used to capture the traffic off a windows VM.

For black box devices, you can build/buy a bus snoop cable and hook that up to usbmon/Wireshark (eg sniff the Xbox Kinect protocol).

Percurnious devices will encrypt/sign their packets to make reverse engineering more difficult, if not impossible, but those are few and far between. You're already buying the hardware and that's the expensive bit, so as long as you've bought the hardware, DRM-style weirdness over USB is rare. Still exists, but most hardware I see these days just uses a generic driver like HID for input, or UVC for video, reducing the amount of snooping needed to make the basics work. Getting extra functionality (like special LEDs) working still requires snooping of the working Windows driver+program though.

Re: Driver adventures for a 1999 webcam

#72
“Do you pine for the days when men were men and wrote their own device drivers?” https://en.m.wikiquote.org/wiki/Linus_Torvalds

This was such a great read and took me back to the days when you had to figure out the right pin configuration on your modems and write device drivers for anything that was a bit fancy on Slackware.

Thanks for the nostalgia.

Re: Driver adventures for a 1999 webcam

#73
post #45

Earlier quoted context omitted.

Core memory unlocked. Somewhere deep in the bellows of my electronics pile, I have an ancient HP barcode reader box that plugged inline with an AT keyboard. Into this box plugged a reader pen that you dragged across a barcode. Once read, it would send the barcode number as keyboard commands. It was a very tactile experience.

Meanwhile, USB barcode scanners nowadays work by basically being a keyboard, so I guess we've come full circle.

I think keyboard emulation was always the way most barcode readers operated.

Re: Driver adventures for a 1999 webcam

#74

I’ve been curious for a while - would it make sense for some USB drivers to be adapted / recompiled to WASM and used via web pages? (Chrome can allow JS code to access USB devices) Like in this case, would it have made sense to recreate the driver in this way so that other owners of the same camera could have immediately tried it out in their browsers regardless of their operating system? How OS-specific are most USB…

Don't know about webcams - usually (unlike in OP's case) those already have good OS-level support, but I did port gphoto2 to Wasm+WebUSB for access to DSLRs & mirrorless cameras: https://github.com/GoogleChromeLabs/web-gphoto2

Re: Driver adventures for a 1999 webcam

#75

I’ve been curious for a while - would it make sense for some USB drivers to be adapted / recompiled to WASM and used via web pages? (Chrome can allow JS code to access USB devices) Like in this case, would it have made sense to recreate the driver in this way so that other owners of the same camera could have immediately tried it out in their browsers regardless of their operating system? How OS-specific are most USB…

Don't know about webcams - usually (unlike in OP's case) those already have good OS-level support, but I did port gphoto2 to Wasm+WebUSB for access to DSLRs & mirrorless cameras: https://github.com/GoogleChromeLabs/web-gphoto2

Amazing, thanks for sharing

And really great write up too!

https://web.dev/porting-libusb-to-webusb/

Re: Driver adventures for a 1999 webcam

#76

Earlier quoted context omitted.

Don't know about webcams - usually (unlike in OP's case) those already have good OS-level support, but I did port gphoto2 to Wasm+WebUSB for access to DSLRs & mirrorless cameras: https://github.com/GoogleChromeLabs/web-gphoto2

Amazing, thanks for sharing And really great write up too! https://web.dev/porting-libusb-to-webusb/

Thanks, be sure to check out the part 2 as well :)

Re: Driver adventures for a 1999 webcam

#77

I wonder if you could have gotten the webcam to work on Windows 10 by installing the XP driver under compatibility mode.

>I wonder if you could have gotten the webcam to work on Windows 10 by installing the XP driver under compatibility mode.

There are a number of possibilities that might need to be attempted.

In the lab I've got a 20-year old USB HP Laserjet printer plugged into an XP PC which is on my local LAN. Not a network printer but shared with other PCs over the LAN. This was a business printer and the newest drivers were for Windows 7 until the fairly recent Universal Print Driver packages from HP, where the UPD driver supports it with Windows 10/11 when you plug the printer into the USB socket of the W11 PC.

But with the printer plugged directly into the XP PC, then a W11 workstation on the same LAN (with all the permissions right and everything) could still find the printer but not the drivers. You could manually install the printer using the UPD drivers which appeared successful, but it would not print whether you selectied it as default or not.

It was necessary to log in to W11 as an administrator, unzip the old XP drivers, then in File Explorer point to the exact INF file for the exact printer, and right-click for the context menu to Install the INF manually in the background.

No compatibility mode needed, W11 just finds & uses the XP drivers when it connects to the printer after that.

Old Intel USB webcams from 1998 still just plug right in since they were Intel and it's still Windows.

When XP came out it was interesting because a W9x Intel webcam no longer needed drivers and even without any cam app the cam appeared as a device in File Explorer. When you clicked on it in the left-hand panel, the live video appeared in the right-hand panel. Now you need an app but IIRC the built-in modern Windows app may not work. Might have to use Amcap.exe or something more legacy-capable.

Old USB joysticks which were supported in W9x are configured using the same interface as their analog predecessors, and conveniently some modern joysticks can still be configured using the legacy interface (with greatly reduced features) without using the specific hardware driver.

Re: Driver adventures for a 1999 webcam

#78

Earlier quoted context omitted.

If I recall correctly there was also a parallel port version of this webcam, for people using computers without usb support

There definitely was a Mac mini-Din-8 serial port version as well. I believe it was the original, before there even was a version for PC/Windows: https://wiki.preterhuman.net/Connectix_QuickCam

Connectix cameras were all CCD, BW ones used Texas Instruments TC255 http://wastelands-observatory.factspot.com/equipment/. This fabulously ungooglable DMS provider claims to have designed and manufactured it for Connectix https://www.odi.net/portfolio.html
Post reply on HN