-
Notifications
You must be signed in to change notification settings - Fork 2
Hacking USB
Interesting post I came over that might be useful later:
http://ubuntuforums.org/showthread.php?t=581307&page=3
Dear Blazercist,
do you have windows installed on your machine? Unfortunately the logs captured under windows are invaluable to understand how the webcam works. If you have it installed, try capturing some logs with SniffUSB. Here are some instructions, since in the README some of it is still in french.
-
Download SniffUSB: http://www.pcausa.com/Utilities/UsbS...6-2.0.0006.zip You need .NET framework to have it running.
-
Disable the webcam in Control Panel --> System --> Hardware --> Device Manager --> Double click on the webcam --> Select "Disable" in the drop-down menu at the bottom of the tab.
-
Shut down the machine. Wait a few seconds. Power up the machine again and boot windows.
-
Start SniffUSB, install the filter for the webcam (it's all in the interface, don't worry) and start the log capturing. Go back to the hardware settings and reenable the camera. Capture for a few more seconds then stop the log. Click on "View log" and save it somewhere with a recognizable name.
-
Clear the log, start the capture again and start the webcam viewing software. Let it run for a few seconds (about 5" or the log will be HUGE), close the program, stop the capture. Save the log with another well recognizable name.
-
Repeat this procedure for a few more times, each time changing one (and ONLY one!) parameter of the image. For example, change the brightness by 20 points. Save the log and write down the minimum value for that parameter, the maximum, the default value, the value you started from and the value you ended up with. Again, it's tedious but it's worth it.
-
Do the same thing with the resolutions your camera is capable of. Write down the default resolution and the resolution you switch to.
-
At this point you'll have a nice selection of logs, each of which is probably about 300MB. Don't worry.
-
Move these logs to your linux installation. In the driver package there is a file called relog.c. This is a neat software that will clean up the logs leaving only the relevant information for Nol
-
Put the logs and relog.c in a directory. Compile relog.c Code: $ g++ relog.c -o relog and you'll obtain an executable named relog. Assuming that all logs you took have the extension .log, just type this to have them all automagically processed Code: $ cd /directory/with/logs/and/relog $ for i in $(ls ¦ grep .log); do ./relog $i msc; done You'll end up with a bunch of .bmp images, a bunch of $i.loglog files and the most important ones, $i.c files. These are the files that are really needed to create the driver. Pack them up (make sure they have representative names and include a README file with some additional explanation if needed) and make them available to Nol, along with the output of Code: $ lshw | grep Genesys -A3 -B1 and the model of the laptop you have. If it's an external webcam, include the model of that too.
After this the ball is in Nol's field... just wait patiently and hopefully your webcam will work fine like mine!
@Nol: sorry I am charging you with this work