Steps to connect your PS3 controller via bluetooth to a computer.
1) Restart your pc in advance startup mode and select disable driver signature enforcement option.
2) Download and install sixaxispairtool from here
http://www.dancingpixelstudios.com/sixaxiscontroller/SixaxisPairToolSetup-0.2.3.exe
2) Run sixaxispairtool and connect you PS3 controller using usb cable. It will ask to install some driver. Allow it.
3) Go to bluetooth settings and find out MAC address of your bluetooth. Copy that address and paste it in the empty window in sixaxispair tool. Now click update.
4) Close Sixaxis Pair Tool & plug-out the PS3 controller from your PC.
5) Go to your bluetooth suite in your pc and click add device. Remember to press PS button on controller before it starts searching for device. Once it is found click on pair. It will ask for a passcode. Ignore it and click next.
6) Download and install motioninjoy from here.
http://www.xinputer.com/download/MotioninJoy_071001_signed.zip
7) Plug in your controller using usb cable. Start motioninjoy and go to "Device Manager". There you will see two ports mentioned. First would be your USB and second would be your bluetooth. Put a tick in check boxes in front of both of them and select " Install All " option. Then click on "Load Driver" option. Normally it will ask you for some permissions to install driver. If that happens allow it and you should see two ticks below montioninjoy column in device manager. If there is some error then go to the bottom of this guide. You'll find help there.
8)Now remove the USB cable and press PS button. Controller should be paired up. Sometimes you may have to select bluetooth pair option in motioninjoy.
9) Now select xbox 360 controller emulation option and enjoy.
*You dont have to run sixaxispairtool every time. It was just needed once. From now on you can just start motioninjoy and press PS on you PS3 controller and start using it.
*Error during step 7
Go to bluetooth settings and find out hardware id of you bluetooth. Copy it.
Go to Program Files\MotioninJoy\ds3\drivers folder and open MijXinput.inf file in notepad. Press Ctrl+F and search for "Bluetooth Dongle". Everytime you find a bunch of lines which have ";BLUETOOTH DONGLE" on top, go to the bottom of that bunch of lines and paste this without quotes :
"%MIJ.DeviceName%=CC_Install, <your hardware id>"
After you are done. Save the file in some other location as system won't allow you to overwrite a inf file in this way. After you have saved it to some other location. Just copy it from there and paste it in Program Files\MotioninJoy\ds3\drivers folder and select overwrite.
Now follow step 7 onwards and it should be done. If there is still any problem you are welcome to ask.
Sources:
[Tutorial] Use PS3 Controller On PC With Unsupported Bluetooth 3.0+ Adapter | PS3Hax Network
How to Use a PS3 Controller in Windows 8 (and Win7) in Local Mode