DIY lefty USB hub with fingerprint reader for about $5


The Project

Fingerprint readers are not the best form of security out there. Your fingerprints are literally everywhere. I wasn't going to let that stop me though. I've never had a computer with a fingerprint scanner on it, and I've always been too cheap to buy one. Then I saw a post on hackaday mentioning that many of the fingerprint scanners in laptops are USB devices.

Surely, I could make my own, I thought. Let me apologize now for not taking pictures as I put this little project together. I looked up replacement fingerprint readers on taobao.com (I live in China), and found some. The only other thing I needed was a USB chord to connect to it. Then I realized I had something better, a 4-port USB hub.


Parts (approx. $5)

ThinkPad X60/X60S fingerprint scanner
  • 1x Lenovo ThinkPad X60/X60S fingerprint scanner
  • 1x 4-port USB hub
I ordered four of the fingerprint readers from taobao (link may not open outside China) for 30RMB, including delivery. The USB hub was one that I had lying around, but when I bought it, it was the cheapest thing I could find, probably not more than about 25RMB. So the total for one fingerprint reader and the USB hub was probably about 33RMB which comes to about $5.


Preparation

Before putting everything together, I wanted to check just to make sure the device I purchased was indeed a USB device since the connector on these things is not a regular USB connector.
First I scraped off some of the coating on the lead coming out of the fingerprint reader, exposing the copper traces. I cleaned these off and tinned them. After using a multimeter to determine which trace was ground and that I hadn't bridged the traces, I accidentally reversed the order of the white and green wires only to discover that they actually are reversed coming out of the reader. Then I took and old USB cord, and cut it in half, soldering the wires to the traces.

After checking everything one last time with a multimeter, I plugged it into my computer and ran the lsusb command. Yay! The list showed an attached fingerprint reader!
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 064e:9700 Suyin Corp. Asus Integrated Webcam
Bus 001 Device 002: ID 8087:0a2a Intel Corp. 
Bus 001 Device 078: ID 0483:2016 STMicroelectronics Fingerprint Reader
Bus 001 Device 077: ID 1a40:0801 Terminus Technology Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Assembly

First I plugged the USB cable into the hub to determine exactly which lines ran where into the hub. I discovered that while my wires were soldered in the order of black, white, green, red on the lead coming out of the fingerprint reader, the pads on the USB hub (since I was simply going to solder it directly) were in the order of black, green, white, red, where black is ground and red is +5v on both the reader and the hub (note that the data lines are now back in the correct order).
Second, I cut the lead coming out of the fingerprint reader and scraped off the outer layer so that the copper traces were exposed. I then tinned the traces and soldered on some wire from the old USB cord that I had destroyed. The other end of these wires I soldered directly to the pads of one of the usb ports on the hub (the upper left port in the first picture here).
I used hot glue to fix the fingerprint reader where it seemed to fit best on top of the hub, and then I filled the port that the fingerprint reader is connected to with hot glue (third picture).
Finally, it was time to modify the case. I cut some bits off that the fingerprint reader obstructed and generally marked where the fingerprint reader was. Then I started by making three holes with a knife so that I could see where the reader was and started shaving the plastic out until I had a hole of the correct size. I shaved the edge of the plastic at an angle so that it would not be uncomfortable to run my finger across and put the top back on.

Left-Handed?

This was purely accidental, but I'm a lefty, so it was an unintended perk! A downward swipe on my reader requires the USB hub to be positioned such that the USB cable is coming out to the right of the hub. Hence it is easier to attach and use on the left side of devices like laptops. That doesn't mean you couldn't run a USB extension cable and use in a right-handed fashion though. Or you could just push your finger up across the reader instead.

Getting It Working in Ubuntu

The last thing to do was compromise my system and setup fingerprint authentication. All that's necessary is to install libpam-fprintd and enroll a digit!
$ sudo apt-get install -y libpam-fprintd
...
$ fprintd-enroll -f left-middle-finger user
Using device /net/reactivated/Fprint/Device/0
Enrolling left-middle-finger finger.
Enroll result: enroll-stage-passed
Enroll result: enroll-stage-passed
Enroll result: enroll-finger-not-centered
Enroll result: enroll-completed
user@user-computer:~$ sudo -i
Swipe your left index finger across the fingerprint reader
root@user-computer:~# 

Conclusion

The top sits a little higher than it did originally, but it's just snug enough that it doesn't fall off. My Dremel is out on loan at the moment, but when I get it back, I may attempt shaving away some of the bottom side of the lid for a better fit. At any rate, I'm still very pleased with out it turned out. Now I can trash the security of all my computers (including my RPi's) with my portable USB fingerprint scanner and expand the number of available USB ports at the same time!

Next Iteration

I'm thinking about possibly taking an old, dead thumb drive and re-purposing it as a portable fingerprint scanner that can be attached to a key chain so I can more easily carry around and use the same reader across multiple devices (desktops, laptops, RPi's). If I do, I'll be sure to make a new post with more pictures of the progression ... This one is completed. You'll find it here.

Comments

  1. I am really happy with your blog because your article is very unique and powerful for new reader.
    Fingerprint Scanner

    ReplyDelete

Post a Comment

Popular posts from this blog

Encrypted Ubuntu Installation with "Manual" Partitioning

Router Firmware -- Dumping and Flashing

Flashing TL-WR703N firmware directly to the flash chip