On 03/11/2013 23:43, Nikola Hardi wrote: > I would like to see this device (UPEK 147e:1002) supported and I would > like to volunteer as much as I can. I own this device (it's built in > ThinkPad Edge e420) and I'm interested in learning about USB > protocols, devices, writing new device drivers for Linux and about > reverse engineering working drivers. > I'm not sure where to start. I'm reading about Linux drivers and > things like char device, ioctl and similar but it seems that libusb is > better choice for learning and pyusb is interesting. I don't have a > clue which device class fingerprint readers belong, what are > interfaces, what transfer modes exist but I'm reading about it and it > just would be nice if you could share few hints and suggest me where > to go. As a first step, you need to get USB dumps of communications between the fingerprint reader and an existing driver. As Vasily suggested, you can use a sample program (like the one Vasily provided) linked with the Linux version of the BSAPI, and dump USB data using the usbmon kernel module (whose documentation is available in the kernel source tree in the file usbmon.txt, if you need it).
Run the sample program two or three times, dumping USB data in a different file each time. Then you can compare the dumps and look for differences/similarities, and maybe try to get a first idea of what each "part" of the dump is doing. Then using your dumps, write a test program (using libusb) which will replay exactly the same requests as the BSAPI did. Make a USB dump of your program while it's running and compare with the dumps you got from the BSAPI sample program. Then it's up to you to find out why you got different results (if they were different that is). Try to guess the format and meaning of the different registers/commands by changing their value and see what effect it has. Also pay attention to timings; for instance, if you see in the dumps that the BSAPI waits for, say, 100ms between two consecutive requests, add the same delay in your test program. Upek devices from the sensor-only family usually have a finger detection feature which sends a "notification" using the interrupt endpoint. Also read the source code of the libfprint upeksonly driver to see if you can spot similarities in the communication protocol. If the protocol seems totally different, take a look at other libfprint drivers to see if one of them could match. Once you have a working example program, you can start working on a libfprint driver. If your device is similar to another one supported by libfprint, it would be best to extend the existing driver to support your device. Once it's done, post it on the mailing list and call for testers. > I hope there can't be many differences between 0x1000 and 0x1002 > models. I tried to find some datasheets but there's nothing usefull or > I just couldn't find it. While I do not own a 147e:1002 device, I guess that if it is a sensor-only device like models 147e:1000 and 147e:2016, it is likely that they all behave similarily. However, if your device contains a biometric coprocessor, the protocol will be totally different. Regards. -- Hugo Grostabussiat _______________________________________________ fprint mailing list fprint@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/fprint