Biopod fingerprint reader
 The APC Biopod
The Biopod is a biometric finger-print reader made by APC. It uses an Authentec AES3400 sensor which is often used in
commercially available finger-print readers, including those found built into the chassis of many modern laptops.
The device comes with software for Windows, but nothing for Linux.
This led me to write some software of my own, the current state of which is able to access the device and capture an
image of your finger-print to disk. It does not do any biometric authentication.
This page will explain a little about the device, and the software I wrote.
The image format
The software saves the captured print in PNM format (Portable Any Map). Any good graphics package (such as
The Gimp) should be able to read them, as well standalone convertors like
pnmtopng should you wish to rasterise them.
 Output from aes3400.c
The lesser know PNM format was used for a couple of reasons: it's an uncompressed ASCII based image format, which is
incredibly easy to work with.
Each pixel is expressed by an ACSII number which makes building an image trivial. The bytes received from the finger
print reader can be easily converted to decimal and writen straight to disk. No complex algoritms required. It also
means that reading the file back into a program which, for example, recognises and authententicates the print is easy.
The layout of the PNM format is outlined below:
P2
128 128
16
6 1 2 2 13 10 8 1 11 3 6 10 2 1 0 15 7 . . . .
The first line specifies the type of PNM - in this case greyscale and ACSII encoded.
The second line specifies the x,y dimensions of the image.
The third line denotes number of colours used.
The forth line is the data, each number represents the colour of each pixel.
There must be 16384 numbers on the forth line to match the dimensions we specified on line 2.
Each number should range between 0-15, since the number of colours specified on line 3 is 16.
Decoding the received data
When a scan request is sent to the device it returns 8362 bytes of data. The first 8200 bytes is image data.
The image data is split up into eight sections, e0-e7, and each section is pre-pended with a 1 byte header: 0xe0 for section one, 0xe1 for section two, and so on. Excluding the eight header bytes, that leaves 8192 bytes for the raw image.
Each pixel is 4-bits, meaning each byte represents two pixels. 8192 bytes X 2 pixels = 16384 pixels creating a perfect 128x128 bitmap.
Thats the easy bit. Now, you would expect the build up of the image to be a simple case of line-by-line drawing two pixel for every received byte. You'd be wrong. The Authentec device returns eight columns of image data, 16 pixels wide, 128 pixels long. The header byte of each section represents the start of a new 16x128 slice.
The illustation on the right shows how the image is constructed from the byte stream.
Column e0 is drawn first, line-by-line, until a 16x128 slice has been constructed. This is followed by column e1, it's first pixel being number 2049 in the sequence. Remember, there are two pixels drawn for every byte, so the each column is 2048 pixels made up of 1024 bytes.
Device initialisation
The device must be initilised before an image can be captured. This is done by sending several bytes to the device which specifies the gain of the capture, amongst other things.
Downloads
The program is written in C, and makes use of the libusb library. You will need to build with this in mind.
Users of gcc can use the following:
gcc aes3400cap.c -o aes3400cap -lusb
Comments...
|
Authentec AES3400 found at 002
ERROR: usb_set_configuration (code:1)
What does this mean? Where should I look for a clue?
I'm running Debian Linux etch with precompiled kernel 2.6.18-1-openvz