it seems I renamed the original to ps3controller_orig.sh and modified ps3controller.sh.
this is the contents of my ps3controller.sh
rp_module_id="ps3controller"
rp_module_desc="Install PS3 controller driver-mod"
rp_module_menus="3+"
rp_module_flags="nobin"
function depends_ps3controller() {
getDepends bluez-utils bluez-compat bluez-hcidump checkinstall libusb-dev libbluetooth-dev joystick
}
function sources_ps3controller() {
wget -nv http://www.pabr.org/sixlinux/sixpair.c -O "$md_build/sixpair.c"
wget -O- -q http://sourceforge.net/projects/qtsixa/files/QtSixA%201.5.1/QtSixA-1.5.1-src.tar.gz | tar -xvz --strip-components=1
}
function build_ps3controller() {
gcc -o sixpair sixpair.c -lusb
cd sixad
make clean
make CXX="g++-4.6" CXXFLAGS="-O2"
}
function install_ps3controller() {
cd sixad
checkinstall -y --fstrans=no
update-rc.d sixad defaults
md_ret_files=(
'sixpair'
)
}
function configure_ps3controller() {
printMsgs "dialog" "Please make sure that your Bluetooth dongle is connected to the Raspberry Pi and press ENTER."
if ! hciconfig | grep -q "BR/EDR"; then
printMsgs "dialog" "Cannot find the Bluetooth dongle. Please try to (re-)connect it and try again."
break
fi
printMsgs "dialog" "Please connect your PS3 controller via USB-CABLE and press ENTER."
if $md_inst/sixpair | grep -q "Setting master"; then
printMsgs "dialog" "Cannot find the PS3 controller via USB-connection. Please try to (re-)connect it and try again."
break
fi
printMsgs "dialog" "The driver and configuration tools for connecting PS3 controllers have been installed. Please visit https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-a-PS3-controller for further information."
}
also there seems to be a difference in users:
-rw-r--r-- 1 root root 1.7K Mar 1 15:06 ps3controller.sh
-rw-r--r-- 1 pi pi 1.9K Mar 1 15:03 ps3controller_orig.sh
it is still working fine for me even after quite some reboots :)