Wednesday, 27 January 2016

Cheap USB Fingerprint scanner for your Linux project

Recently I bought new Lenovo Yoga 300 laptop. The choice was really fast just the day before my travel to US. Basically I bought cheapest Lenovo laptop and just paid attention to screen resolution, battery power and weight.
The very first thing was installing Ubuntu on external HDD.

It works just fine. Actually touchscreen and screen rotation are not working but everything else works.
And I found that I really missing the fingerprint scanner. It so useful under Linux when you need to do so frequently sudo commands. And with fingerprint scanner it is just simple finger swipe instead of password typing.

I looked at my old Lenovo X200 laptop and typed lsusb and found that fingerprint scanner is actually on USB bus. Aha, this is USB device.
I bought spare 42W7764 fingerprint scanner taken from Lenovo laptop. It cost me around £3 from e-bay. It came with interesting flat cable and strange connector. That connector has 16 pins but flat cable has only four tracks. I just guessed that these four tracks basically USB bus. Close look at PCB confirmed that two offside pins are ground and power and two in the middle likely some differential signal.
I cut flat cable in half  and soldered USB cable. First I soldered GND(black) and +5V(red) and then soldered green and white in the standard order as in USB connector. After connecting, Ubuntu said that USB device appeared but with a lot of bus errors. I swapped green and white and finally got next system logs:

usb 1-4.3: new full-speed USB device number 8 using xhci_hcdusb 1-4.3: New USB device found, idVendor=0483, idProduct=2016
usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-4.3: Product: Biometric Coprocessor
usb 1-4.3: Manufacturer: STMicroelectronics
usb 1-4.3: ep 0x83 - rounding interval to 128 microframes, ep desc says 160 microframes

It just works!!!
I installed libpam-fprintd and enabled fingerprint login in User settings and everything works.

I looked at other fingerprint scanners on e-bay and looks like most of them got four wires but with all different types of connectors. Likely most of them USB devices but with non standard connectors.

I think my finding could be very useful to those who need some cheap fingerprint scanner for some project especially with Linux.
Will try it on Raspberry Pi next day.

7 comments:

  1. Great find, about how big is it? Could you put it in the enclosure of a large USB key?

    ReplyDelete
    Replies
    1. I will post the size when come home. But you could compare it on the picture with the size of the USB plug.

      It is good idea to make it as one solid USB key, this will solve the problem to have it non-moving on the desk (will be attached to laptop). Will try to find some USB device to replace internals. Thank you.

      Delete
    2. The PCB size is slightly less than 32mm x 24mm

      Delete
  2. Hi, could you please post schematics?

    Thanks.

    ReplyDelete
  3. Does this work on windows as PnP?

    ReplyDelete
  4. It was so good to read and useful to improve my knowledge as an updated one, keep blogging. Fingerprint Scanner

    ReplyDelete