Jabra BT-500 Bluetooth Headset and Linux

BT500 works quite well when paired with Linux. To get the thing working you will need BlueZ stack (already in recent kernels), utilities (bluez-utils.spec) and ALSA Bluetooth driver – snd-bt-sco. There is one issue with BT500 (where you will hear no sound, just single beep at start and end of audio stream) which is handled by sco-mtu patch.

After setting headset in paring mode issue:

[root@tarm ~]# hcitool inq
Inquiring …
00:07:A4:BE:95:EE clock offset: 0x51ed class: 0x200404

Then pair with bt500:

[root@tarm ~]# hcitool cc 00:07:A4:BE:95:EE
[root@tarm ~]#

you will be asked for PIN code (enter: 0000).

[root@tarm ~]# btsco -v 00:07:A4:BE:95:EE
btsco v0.41
Device is 1:0
Voice setting: 0x0060
RFCOMM channel 1 connected
recieved AT*GNMK

From now one there should be second ALSA card available:

[root@tarm ~]# cat /proc/asound/cards
0 [Intel ]: HDA-Intel – HDA Intel
HDA Intel at 0xb0000000 irq 169
1 [Headset ]: Bluetooth SCO – BT Headset
BT Headset 1

Run your favorite application (twinkle perhaps – very nice SIP phone with G.711 support, ideal for connecting to Asterisk PBX) and choose BT Headset in sound setup (available also trough OSS emulation as /dev/dsp1 in my case).

You can view setting using alsamixer or amixer using -c 1 switch:

[root@tarm ~]# amixer -c 1
Simple mixer control ‘Master’,0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 – 15
Mono: 0 [0%]
Simple mixer control ‘Mic’,0
Capabilities: volume volume-joined
Playback channels: Mono
Capture channels: Mono
Limits: 0 – 15
Mono: 0 [0%]
Simple mixer control ‘AGC’,0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control ‘Loopback’,0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]

When pressing buttons on headset the commands are sent to Bluetooth dongle and are visible by btsco program. You can put your own script in .btscorc which will be executed when commands arrive. By this method you can for example connect hang up button on headset with skype disconnect button (through skype DBUS API).

Suspend to RAM on IBM ThinkPad Z60m with SATA drive

Suspend on this laptop works quite well beside one important thing – SATA driver (ata_piix). It doesn’t resume properly, scsi subsystem timeouts, filesystem reports errors and the whole fs is remounted read only.

Recently Hugh Dickins found a way to make resume reliable:
http://lkml.org/lkml/2006/4/21/303

Apply it to latest kernel (2.6.17rc2 in my case) and use suspend userspace tool s2ram.

It isn’t best way (patch violates layers in libata driver) but that’s all. It’s usable until clean solution is found.

Fingerprint reader in ThinkPad Z60m

Various IBM/Lenovo ThinkPad notebooks contain interesting feature – fingerprint reader. It is possible to use it under Linux for authentication. Thanks to PAM module we can easily use fingerprint reader to biometrically authenticate various apps.

Installation

To get fingerprint reader working under Linux (PLD/Linux in this case) we need:

Usage

Sample programs from BioAPI implementation will allow you to verify if fingerprint reader works correctly and will allow to dump your fingerprints data into *.bin files. *.bin files are later used to verify if fingerprint is correct one.

Example PAM configuration for sudo with authentication done through BioAPI:

[root@tarm ~]# cat /etc/pam.d/sudo
#%PAM-1.0
auth sufficient pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
auth required pam_unix.so
account required pam_unix.so
password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password sufficient pam_bioapi.so {5550454b-2054-464d-2f45-535320425350} /etc/bioapi/pam/
password required pam_unix.so md5 shadow use_authtok
password required pam_make.so /var/db
session required pam_unix.so
session required pam_env.so
session required pam_limits.so change_uid

(/etc/bioapi/… contains *.bin files with scanned fingerprints)

How it works?

[arekm@tarm ~]$ sudo zsh
Verification start
Put finger

When the finger was moved too fast:

Swipe too fast
Put finger

When the scan had bad quality (I just moved my finger quite fast and not in correct way):

Bad quality
Put finger

The finger was passed over right side of sensor only:

Finger is too right
Put finger

Correct scan, finger passed properly:

Image processing
Scanned good image
Operation succeeded
[root@tarm ~]#

Example of unlocking KDE lock screen:

Unlocking KDE lock screen with fingerprint

Interesting links:

ThinWiki article about ThinkPad FingerPrint reader.

2007-01-18 UPDATE:
There is open source implementation that is able to use fingerprint device in thinkpads:
ThinkFinger