il_diavolo
Posts: 131
Joined: Mon Dec 02, 2013 7:56 pm

[Solved] PS3 controller and Jessie, anybody got it working?

Sun Feb 21, 2016 3:24 pm

My DiddyBorg robot can be manually controlled with a PS3 controller. My Rpi B2 is installed in the robot and is currently working well with a fully updated "Wheezy" OS. The PS3 communicates via Bluetooth using QtSixA drivers and the axis and buttons are interpreted as Pygame events.

For obvious reasons I would like to upgrade to "Jessie" but I have hit a snag - the QtSixA drivers don't seem work in "Jessie". Piborg (the manufacturers of DiddyBorg) have published another method of connecting to Bluetooth using "bluetoothctl" but I can't get this to work either. Pairing using "sixpair" seems to work correctly, the single LED which lights on the controller after a couple of multiple flashes also indicates that it has paired and the joystick is present in /dev/input/. The problem is, however, that axis movements and button pushes do not elicit any responses.

Accordingly I have two questions:
1. Has anybody got a PS3 controller working with QtSizA in "Jessie"?
2. Has anybody any thoughts as to why a seemingly successfully paired controller has unresponsive buttons?

In the meantime I'll stick with "Wheezy".
Last edited by il_diavolo on Mon Feb 22, 2016 10:40 pm, edited 1 time in total.

il_diavolo
Posts: 131
Joined: Mon Dec 02, 2013 7:56 pm

Re: PS3 controller and Jessie, anybody got it working?

Mon Feb 22, 2016 2:45 pm

Anybody got any suggestions? I've worn Google out trying to answers.

il_diavolo
Posts: 131
Joined: Mon Dec 02, 2013 7:56 pm

Re: PS3 controller and Jessie, anybody got it working?

Mon Feb 22, 2016 10:39 pm

I think I've done it, after yet more Googling! Am I the only one?

il_diavolo
Posts: 131
Joined: Mon Dec 02, 2013 7:56 pm

Re: [Solved] PS3 controller and Jessie, anybody got it worki

Tue Feb 23, 2016 12:37 pm

My procedure for installing Sixad in "Jessie"

In a freshly installed version of "Jessie" (updated and upgraded) install the following packages:
sudo apt-get -y install bluetooth
sudo apt-get -y install libusb-dev
sudo apt-get -y install joystick
(python-pygame already installed in Jessie)
sudo apt-get -y install bluez-hcidump
sudo apt-get -y install checkinstall
sudo apt-get -y install libbbluetooth-dev
sudo apt-get -y install pyqt4-dev-tools
sudo apt-get -y install libjack0
sudo apt-get -y install libjack-dev

# It's possible that some of these installs are not necessary but I don't have enough knowledge to investigate this. This is the combination that works on my setup.

# Get sixpair from web site
wget http://www.pabr.org/sixlinux/sixpair.c
gcc -o sixpair sixpair.c -lusb

# get QtSixA from web site
wget http://sourceforge.net/projects/qtsixa/ ... src.tar.gz
tar xfvz QtSixA-1.5.1-src.tar.gz

At this point remove or rename the file "shared.h" from /home/pi/QtSixA-1.5.1/sixad

# From GitHub get an updated copy of "shared.h"
https://github.com/falkTX/qtsixa/tree/master/sixad

I did this in Windows cutting and pasting from the RAW file in GitHub into Notepad and converting it to Linux line endings in "PyPe", there's probably a better way but this worked.

Copy downloaded "shared.h" into /home/pi/QtSixA-1.5.1/sixad

# (Thanks to robl at "PiBorg-Home-Forums-Raspberry Pi General Discussions-make failure for QtSixA" for this information).

cd QtSixA-1.5.1/sixad

make

sudo mkdir -p /var/lib/sixad/profiles
sudo checkinstall

# At this point the file /etc/default/sixad needs modifying to prevent a "bad buffer" error when trying to connect with sixad.

sudo nano /etc/default/sixad - change LEGACY=0 to LEGACY=2

Attach controller to Pi with USB mini cable
sudo ./sixpair
disconnect
sudo sixad --start &
Press PS button
Test with jstest /dev/input/js0

This is not perfect and I would welcome any advice as to how to improve things:
Firstly the pairing doesn't survive a reboot so the controller needs re-pairing with a usb lead and sixpair each time.
Secondly the controller only works in Legacy mode, i.e. no vibration, no motion sensing, no axis output from buttons other than the joysticks.

User avatar
QBall1977
Posts: 74
Joined: Thu Aug 09, 2012 10:06 am
Location: Hull, East Yorkshire
Contact: Website

Re: [Solved] PS3 controller and Jessie, anybody got it worki

Mon Jun 20, 2016 9:53 am

Some guidance here - http://pythonhosted.org/triangula/sixaxis.html

and here - https://www.piborg.org/rpi-ps3-help

For using PS3 pad in Jessie.

It's bit fiddly but once setup it works! :D

I just can't get the evdev to work! Will keep you posted.
____________________________________________
Looking for where to start - try Kernel Panic - http://goo.gl/EEQ5J

Nat0ne
Posts: 1
Joined: Mon Nov 14, 2016 6:39 pm

Re: [Solved] PS3 controller and Jessie, anybody got it worki

Mon Nov 14, 2016 6:54 pm

Hello,

I am trying to pair the PS3 controller to a Raspberry PI. I did all steps that il_diavolo mentioned but I cannot make it work.
I have tried on a Raspberry PI 3, using Jessie lite and full, and on my laptop with native Ubuntu 14.04 LTS. I used an original PS3 controller and an non original PS3 controller. In my laptop I used a CSR V4.0 Bluetooth dongle and an other one of Version 3.0, and in RPI3 I used its own Bluetooth device.

All steps run ok until the very end. When I run "sudo sixad --start &" and press the PS button it does not pair. It pairs only if I connect the USB cable.

Any ideas?

Thank you in advance for an answer. It would be most appreciated!!

il_diavolo
Posts: 131
Joined: Mon Dec 02, 2013 7:56 pm

Re: [Solved] PS3 controller and Jessie, anybody got it worki

Mon Nov 14, 2016 10:29 pm

I've been running my Rpi3 with the PS3 controller for so long now that I can't remember exactly how I set it up. The methods used in my original posts worked for me but as it was running in Legacy Mode not all the outputs from the PS3 were available. The good folks at PiBorg (see links in previous posts) managed to get it to work properly and the instructions on their PS3 setup page are now correct and I confirm that they work with the Rpi3 and Jessie.
The only issue I had was that I couldn't get the "trust" command to report "success" but I found that the PS3 and the Rpi's on-board Bluetooth had connected anyway, so don't assume it hasn't connected just because of that.

Il Diavolo

bshogeman
Posts: 1
Joined: Wed Jan 25, 2017 9:53 pm

Re: [Solved] PS3 controller and Jessie, anybody got it worki

Wed Jan 25, 2017 10:00 pm

Same issue here.
With sixpair the device is recognized but keeps vibrating the whole time when connected with usb.
The device don't get a number but is just recognized. Then starting sixad with 'sixad --start' and I can press the PS button all I want but nothing happens. :(

Return to “Troubleshooting”