If you are trying to pair your mobile phone with your laptop via Bluetooth, you might get the error message "detection of service failed".
I was getting this error message when I was trying to pair my Nokia E5 with Laptop having Toshiba Bluetooth Stack for Windows XP version 6.01.03
This is how I fixed it.
Right click on Bluetooth manager tray icon in your laptop. Go to Options and then click on Security tab.
Choose security level as High and just below that, choose file transfer password like 111. Apply the settings.
Now if you try to pair after entering the same password as above, you should be able to pair your device with your laptop.
Normal procedure is to search for the Bluetooth devices, then select one of the device, choose the password and enter the same password on both the devices. In this workaround, the password is predefined in the laptop and you enter the same password in your mobile device. And it works!