RasPi Zero W/Connecting a PS3 controller via Bluetooth

Hi

I'm trying to connect a (genuine) PS3 controller to my Zero W via BlueTooth.

I've downloaded the latest NOOB os. Have connected WiFi and then done "sudo apt-get update" and rebooted.
So I'm 100% up to date!

I've been following this guide
https://www.piborg.org/blog/pi-zero-wifi-ps3
but when I try and "Add Device..." I get asked to enter an access code on the PS3 controller which I don't know how to do.

I've tried an older guide using the CLI but when I connect it via a cable the PS3 won't stop buzzing/rumbling.

Can anybody please help?

Thanks in advance.

Andy

Images: 
piborg's picture

The GUI setup seems to think your PS3 controller is actually a keyboard, that is why it is asking you to enter a code. Since you cannot I think we will have to setup the controller using the terminal.

As that seems to be proving tricky we should probably go through each stage slowly.

  1. Shutdown the Raspberry Pi and disconnect the power
  2. Connect the PS3 controller with the USB cable
    Do not worry about the controller rumbling, just carry on anyway :)
  3. Connect power and wait for the Pi to start
  4. Open up a terminal
  5. Run this command: sudo ~/sixpair

If you could take a screenshot of the output so we can check the command worked correctly.
At this point you can unplug the PS3 controller to stop it rumbling.

Forgot to add this image

Images: 

Still haven't got anywhere with this.

Problem seems to be the device type. - it's not a keyboard!

Where is this data stored? Seems to be if I can change the default class for this device to a joystick it might well work.

Andy

Images: 
piborg's picture

This all seems very odd, not the same as what I see from our PS3 controllers at all:

pi@PiBorg:~ $ sudo bluetoothctl
[NEW] Controller B8:27:EB:16:80:10 PiBorg [default]
[NEW] Device 00:06:F5:5D:67:A6 00-06-F5-5D-67-A6
[bluetooth]# devices
Device 00:06:F5:5D:67:A6 00-06-F5-5D-67-A6
[bluetooth]# info 00:06:F5:5D:67:A6
Device 00:06:F5:5D:67:A6
        Alias: 00-06-F5-5D-67-A6
        Class: 0x000508
        Icon: input-gaming
        Paired: no
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v054Cp0268d0100
[bluetooth]#

I would try removing your PS3 controller:

sudo bluetoothctl
remove 05:8E:64:9F:63:25

Then power everything off and try the pairing again.

Out of curiosity what model number is written on the back of your controller?
I am using one with model number: CECHZC2E.

yes - all very odd!

Controller is marked CECHZC2U A1

Andy

piborg's picture

Looking up the model numbers yours should be slightly newer than ours, but I do not expect it to really make any difference.

Could you take a screenshot after doing the following:

  1. Power off the Raspberry Pi
  2. Make sure the controller is not attached via the USB cable
  3. Power the Raspberry Pi
  4. Connect the PS3 controller using the USB cable now
  5. Wait a few seconds
  6. Run this command: dmesg

You should see something like the image below with lines talking about the controller being connected.

With the controller still attached by cable what is the output from the command ls /dev/input

Images: 

Here you go!

Images: 
piborg's picture

The trouble seems to be that the controller is not actually an official one. The Shanwan clones are fairly close to the real thing, but they seem to play havoc with the Linux support for PS3 controllers. The giveaway is that the manufacturer is not listed as Sony, instead it is Shanwan.

There is still hope for getting it to work though :) It seems like there is a method of patching the bluetooth drivers to make them recognise the controller as a joystick like it should be. I would suggest trying this guide to see if you can get it working: Setting up PS3 controllers on Retropie (Gasia/ Shanwan clones)

Let us know if you have any success.

Thanks - will do!

Hi

Here's what I got!

Andy

Images: 
Subscribe to Comments for "RasPi Zero W/Connecting a PS3 controller via Bluetooth"