Live data from Hacker News

Driver adventures for a 1999 webcam

blog.benjojo.co.uk

51–60 of 78 posts

Re: Driver adventures for a 1999 webcam

#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?

Re: Driver adventures for a 1999 webcam

#52
post #50

While Linux support for old hardware tends to be great, lately various kinds of Linux support are suffering in some ways, as higher percentages of software techies are now using Macs and MS Windows. Add to this many people now going to pains to do open source for closed (and sometimes abusive) platforms, which has network effects, bringing and cementing more techies to closed, and leaving them oblivious to why and ho…

>While Linux support for old hardware tends to be great, lately various kinds of Linux support are suffering in some ways, as higher percentages of software techies are now using Macs and MS Windows.

Any examples or evidence of this? Seems easier than me than ever to use Linux with all kinds of hardware

Re: Driver adventures for a 1999 webcam

#53
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 devices?

Re: Driver adventures for a 1999 webcam

#54
post #52
post #50

While Linux support for old hardware tends to be great, lately various kinds of Linux support are suffering in some ways, as higher percentages of software techies are now using Macs and MS Windows. Add to this many people now going to pains to do open source for closed (and sometimes abusive) platforms, which has network effects, bringing and cementing more techies to closed, and leaving them oblivious to why and ho…

>While Linux support for old hardware tends to be great, lately various kinds of Linux support are suffering in some ways, as higher percentages of software techies are now using Macs and MS Windows. Any examples or evidence of this? Seems easier than me than ever to use Linux with all kinds of hardware

Here you go.

https://bugs.ghostscript.com/show_bug.cgi?id=706455

There is a workaround by manually editing a script to call gs in a different way, but the original way doesn't work and they won't fix it, and the script itself is from a package maintained by nobody.

Re: Driver adventures for a 1999 webcam

#56
post #45
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…

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.

Re: Driver adventures for a 1999 webcam

#57

Lovely! I recently picked up a Creative Labs webcam with an LPT and PS/2 connector (probably used for power). I wanted to try it out on a W98 machine, but this inspires me to even try and write a driver for it. A computer with LPT I have, now i just need to find the time :)

Holy shit!

LPT isn't a problem (besides the real memory access and something tells me it does) but PS/2... vood luck?

you wouldn't believe it but it's actually Shooting Stars playing RN

Re: Driver adventures for a 1999 webcam

#58
post #30

>This means that all attempts to get data from it using the first USB interface would fail. Now you might ask, why does the webcam have an endpoint with a 0 byte MaxPacketSize on its first interface? Who knows! Paper cuts like this is why the Linux Desktop isn't mainstream.

Is..is it not the webcam that's reporting the endpoint? Not Linux?

Correct. This is inherent to the camera's USB descriptor; it's entirely independent of the OS being used to interact with the device.

Re: Driver adventures for a 1999 webcam

#59
On a tangentant note, I've considered if it would be possible to gut the driver related parts (usb / Bluetooth subsystem ect) of linux and package it up to run as a userspace application in windows.

Then we could all use ps3 dualshock controllers wireless again on windows. It seems all the links to third party programs to make it work are virus infected.

Post reply on HN