Libfprint, as the time of the writting, has not yet have the ability to scan fingerprint using U.r.U 4500 fingerprint reader. In order to use it, I am trying to use the SDK that provided by the CD driver of the fingerprint reader. Unfortunately, according to [RDM] the supported kernel are:
- Novel Linux Desktop 9 SP3, with kernel version 2.6.5-7.244-default/smp.
- Novell Linux Point of Service SP2 with kernel version 2.6.5-7.201-SLRS
- Novell Linux Point of Service SP3 with kernel version 2.6.5-7.155.29-SLRS
- Suse Linux Enterprise Desktop 10 SP1 with kernel version 18.104.22.168-0.12-default/smp.
- Slackware 11 with kernel version 2.6.18.
- Slackware 11 with kernel version 22.214.171.124
- Slackware 12 with kernel version 126.96.36.199/smp
- Red Hat Enterprise Linux Work Station V3 with kernel version 2.4.21-50.EL/sm
- [This is my addition after infer] Using vanilla kernel version 188.8.131.52
If you have a few supported GNU/Linux distros on the list, you are damn lucky! But, as I and the rest of the world ain’t have one of those, we must improvise. Oh, I’m using Debian GNU/Linux 5.0.2 (Lenny) for my production machine and Debian GNU/Linux Unstable/Experimental as my playground. I think the way is the same with new distro.
I assume that we have a sane environment and you have sufficient *nix experience. Now let’s login as root: (or you could do all the steps using
, your call)
$ sudo su -# cd dp-ot-linux-sdk110
I assume that we are working in the source directory:
# export DP_SDK=`pwd`
So, when I said
, it means the directory of the extracted SDK, e.g.
Running Provided Script
In my case, running the
is pointless, it doesn’t run. Instead, I just run the script directly:
# cd $DP_SDK
# sh install/setup_tar.bin
Here’s the few steps that I do:
1 There is no term of selling your soul to the devil in the EULA, don’t be afraid to accept it.
2 Select the SDK to install, we are going to develop it anyway.
3 When installing kernel, mostly you will encounter this warning:
A prebuilt kernel driver for your kernel, [YOUR KERNEL VERSION], is not included.
That’s alright because we have the source, we will install it later.So, in #3 you just skip it and just install the SDK. The script will install all to
Installing Kernel Module: Behind The Scene
There are two ways of installing the kernel module:
- Patch the kernel yourself to comply with your kernel.
- Downgrade your kernel to the complying kernel version.
This Part I will use the number two because compiling is better and patching the kernel require some googling. I use 184.108.40.206 the latest 2.6.21.x vanilla kernel version. You could use 220.127.116.11 and use the provided kernel module or find the 2.6.21.x that provided by your distro and install with the recommended way. The reason why we should use 2.6.21.x is because the USB interface slightly change in 2.6.23 kernel and changed again in 2.6.30. Reboot into the that kernel. (You may not do this, but that’s advance)
Installing Kernel Module: Do It
I assume we already reboot into the kernel before we move forward.Extract kernel source in
to any directory. To avoid confusion, let’s assume that we work on SDK directory ($DP_SDK).
# tar xvfz redist/DigitalPersona-fpkrndrv-source-1.1.0-1.i586.tar.gz
An (optional) additional step is to move the source to /opt/DigitalPersona so that we can have cleaner way.
# mv opt/DigitalPersona/drivers/ /opt/DigitalPersona
# rm -rf opt
Go to the source directory:
# cd /opt/DigitalPersona/drivers/source
And compile the source:
Notice that there is a warning of a function being deprecated:
In file included from /opt/DigitalPersona/drivers/source/usbdpfp.c:104:/opt/DigitalPersona/drivers/source/usbdpfp.h:188: warning: ‘kmem_cache_t’ is deprecated
That’s the thing that we will fix in Part 2, if there is any. Now, we should move the kernel module and register it:
# mkdir /lib/modules/`uname -r`/kernel/drivers/biometric
# cp mod_usbdpfp.ko /lib/modules/`uname -r`/kernel/drivers/biometric/
# depmod -aq
Load the kernel into the memory:
# modprobe mod_usbdpfp
One More Thing (Optional)
Until this step, we are done and ready to load the kernel into the memory. By default the kernel will create device node with permission 0664. This means, if we run our application as regular user, e.g. running provided sample, we will have the error:
An error occured when opening the driver library
This is not the case if we run our application as root, but we don’t. One of the way to do this is to chmod all of the device node:
# chmod 0666 /dev/usbdpfp*
One clever way to do that automatically is to install udev rule
to our udev system. In Debian and it’s derrivative (e.g. Ubuntu), the rules are located in:
and numbered. So, we copy the udev rule by:
# cp $DP_FP/scripts/dp.udev.rules /etc/udev/rules.d/z98_dpfp.rules
You could rename by whatever and adapting according naming consensus in your distro. With this, every time we reboot, we would have our device node with enough permission (0666).
Want more fine grained security? Well, you could edit
file and change:
You could change “plugdev” into whatever group that you want. Your rule!
Here’s the screenshot when all are done:
[RDM] Readme.txt included in Digital Persona One Touch SDK for Linux version 1.1.0.