If you’ve (finally) successfully paired a PS3 controller to your RPi over bluetooth, only to (stupidly) charge it via the USB cable connected to the PS3, you’ll discover that the PS3 automatically re-pairs to the controller. Luckily, there’s a quick way to reconnect to your RPi.
I’m a bit of a linux newbie myself, so I wanted to write up a quick how-to for anyone else that found themselves in this situation.
This assumes everything was working correctly before you unsynced it
1. Use the USB cable to connect the PS3 Controller to the RPi.
2. Using PuTTY or a keyboard connected to your RPi, type:
cd /opt/retropie/supplementary/ps3controller/
sudo ./sixpair
3. Unplug the PS3 Controller, and it should automatically reconnect via bluetooth.
Voila.