SHANWAN / PS3 CONTROLLER Pi3 RETROPIE 3.6 BLUETOOTH SETUP
-
Hi @Hetoft,
all what I can say is that you should try to monitor the pairing process in order to identify the reason why it fails.
First of all, check the output of 'hciconfig', which should reveal something like this:hci0: Type: BR/EDR Bus: USB BD Address: 00:1B:10:00:2A:EC ACL MTU: 1017:8 SCO MTU: 64:1 UP RUNNING PSCAN RX bytes:549 acl:0 sco:0 events:29 errors:0 TX bytes:1564 acl:0 sco:0 commands:29 errors:0
If you don't see UP RUNNING PSCAN there is something wrong with your bluetooth device.
Next, watch what happens using 'sudo bluetoohctl' when you press the PS button:
[NEW] Controller 00:1B:10:00:2A:EC raspi5 [default] [NEW] Device 01:B6:AD:7F:63:25 PLAYSTATION(R)3 Controller [NEW] Device 01:B6:52:85:63:25 PLAYSTATION(R)3 Controller [NEW] Device 20:73:AB:91:DD:6F Bluetooth V3.0 Keyboard [CHG] Device 01:B6:52:85:63:25 Connected: yes
Check the connection status of your controller with info <hw address>
info 01:B6:52:85:63:25 Device 01:B6:52:85:63:25 Name: PLAYSTATION(R)3 Controller Alias: PLAYSTATION(R)3 Controller Class: 0x000540 Icon: input-keyboard Paired: no Trusted: yes Blocked: no Connected: yes LegacyPairing: no UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb) Modalias: usb:v054Cp0268d0000
Lighting of LED1 on your device indicates that it is connected and paired with your Pi. If you're not able to configure buttons, check whether your controller was registered as an input device. 'dmesg' should display something like this:
[ 482.434909] input: PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0/bluetooth/hci0/hci0:11/0005:054C:0268.0001/input/input0 [ 482.436176] sony 0005:054C:0268.0001: input,hidraw0: BLUETOOTH HID v0.00 Joystick [PLAYSTATION(R)3 Controller] on 00:1b:10:00:2a:ec
If it wasn't registered as an input device, you probably have to add the 'joydev' and 'uinput' kernel modules into your /etc/modules (reboot), or load them manually with
'sudo modprobe joydev' 'sudo modprobe uinput'
Cheers,
/luetzel -
Hey Grandmaster @luetzel !
Guess what?!My Shanwan controller broke....due to the crapy cheap lead it came with breaking the mini USB port pins!
So I bought another controller,and got it to pair no problem first time.........BUT.......now with this one I can't configure the buttons!Emulation Station detects the Gamepad but no button presses work for configuration.I have also checked 'jstest' and it seems to see all of the controllers various buttons,axis etc but doesn't respond (show any output) when I push the buttons while in 'jstest'.The same problem @Hetoft seems to be having.
As you seem to clearly be the bonafide expert in this PS3 controller drama any help would be very very well received!
Here is my 'dmesg' output:
[77212.502099] input: PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:12/0005:054C:0268.0003/input/input4 [77212.508016] sony 0005:054C:0268.0003: input,hidraw2: BLUETOOTH HID v0.00 Joystick [PLAYSTATION(R)3 Controller] on b8:27:eb:a1:9b:7f
According to this it seems to see it as an input device...although 'input4' it seems.Could this be part of the issue you think?
-
@luetzel - please consider styling your posts (eg using code blocks etc) http://commonmark.org/help/
-
-
@Wolfman100
sorry for my delayed answer. Did you try to remove the existing/ broken controller using bluetoothctl?Meanwhile I have patched the latest bluez-5.40 release and pushed it to my github repo https://github.com/luetzel/bluez/tree/bluez-5.40
It compiled without errors and I successfully paired both of my PS3 clones at the same time.
According to 5.40's Changelog it fixes some issues "with previously paired devices" whatever that means.Cheers,
/luetzel -
@luetzel no probs man!
Erm,I think I built a new system which I never paired the old (broken) controller with...as far as I can remember.
Do you think that it comes up as 'input4' could be an issue?Although strange that I don't get any response from button presses with 'jstest'.
'According to 5.40's Changelog it fixes some issues "with previously paired devices" whatever that means'
Hahah..mysterious!
I'll give the new patched bluez a go and see what happens on this never-ending quest to carry on my Donkey Kong adventures....
-
@Wolfman100
No I don't think that 'input4' is a problem. My first controller pairs as input0, the second as input1 and so on. I guess that the numbering is related to the other input devices that are already paired when you connect your controller. My bluetooh keyboard appears as input2 and it doesn't really matter in what order I pair my devices. -
@luetzel OK, that makes sense.
I just got this error when doing the 'make -j3' for your Bluez 5.40.
monitor/main.c:36:28: fatal error: src/shared/tty.h: No such file or directory #include "src/shared/tty.h" ^ compilation terminated. Makefile:5663: recipe for target 'monitor/main.o' failed make[1]: *** [monitor/main.o] Error 1 make[1]: *** Waiting for unfinished jobs.... Makefile:3129: recipe for target 'all' failed make: *** [all] Error 2
-
Hi @Wolfman100 ,
oops, sorry didn't notice that these files were missing after merging with the 5.40 branch.
Please clone the master branch (git clone https://github.com/luetzel/bluez) and try it again.
Should be fixed now.
Cheers,
/luetzel -
@luetzel Will do.Thanks my man.
-
OK,so I got the Bluez Master to Make and Install fine.The controller Pairs no problem,but still can't configure controls.
Here is my 'dmesg' output...looks like the same controller is registered three times....could this be part of the issue?It looks like the same controller is simultaneously input 0,input 4 and input 5 at the same time.I saw you mentioned removing controllers earlier,how do I do this?
[ 432.846781] usb 1-1.5: Product: PLAYSTATION(R)3 Controller [ 432.846794] usb 1-1.5: Manufacturer: SZMY-POWER CO.,LTD. [ 432.933985] input: SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:054C:0268.0003/input/input4 [ 432.935581] sony 0003:054C:0268.0003: input,hiddev0,hidraw2: USB HID v1.11 Joystick [SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller] on usb-3f980000.usb-1.5/input0 [ 434.086043] usb 1-1.5: USB disconnect, device number 9 [ 434.533717] usb 1-1.5: new full-speed USB device number 10 using dwc_otg [ 434.636697] usb 1-1.5: New USB device found, idVendor=054c, idProduct=0268 [ 434.636710] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 434.636717] usb 1-1.5: Product: PLAYSTATION(R)3 Controller [ 434.636724] usb 1-1.5: Manufacturer: SZMY-POWER CO.,LTD. [ 434.642275] input: SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:054C:0268.0004/input/input5 [ 434.642785] sony 0003:054C:0268.0004: input,hiddev0,hidraw2: USB HID v1.11 Joystick [SZMY-POWER CO.,LTD. PLAYSTATION(R)3 Controller] on usb-3f980000.usb-1.5/input0 [65756.104806] usb 1-1.5: USB disconnect, device number 10 [65767.938356] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [65767.938390] Bluetooth: HIDP socket layer initialized [65767.942313] input: PLAYSTATION(R)3 Controller as /devices/platform/soc/3f201000.uart/tty/ttyAMA0/hci0/hci0:11/0005:054C:0268.0005/input/input6 [65767.943239] sony 0005:054C:0268.0005: input,hidraw2: BLUETOOTH HID v0.00 Joystick [PLAYSTATION(R)3 Controller] on b8:27:eb:a1:9b:7f [65814.026297] Console: switching to colour frame buffer device 240x67 [65818.343306] Console: switching to colour dummy device 80x30
-
-
Hi @Wolfman100
for removing the controller, simply use sudo bluetoothctl. 'help' will list all possible commands. Then, remove your device with
'remove <dev>' (replace <dev> with the hardware address of your controller). Then, try to pair it again using sixpair. -
Well it seem's that under bluetoothctl their is only one controller paired,so I don't understand how when I do a 'dmesg' I get three different controllers with different inputs.I'm a bit lost here....
osmc@osmc:~$ bluetoothctl [NEW] Controller B8:27:EB:A1:9B:7F osmc [default] [NEW] Device 00:26:5C:02:54:D2 PLAYSTATION(R)3 Controller [NEW] Device CC:C5:0A:1F:F6:C3 Bluetooth 3.0 Macro Keyboard
-
@luetzel I just tried to run sixpair with the controller plugged in and got:
osmc@osmc:~$ sixpair usb_claim_interface: Operation not permitted
And now when disconetting my controller it won't stop rumbling!!!SO I had to disconnect it via 'bluetoothctl'
-
What happens if you run sudo sixpair? And whats your distro? I cannot reproduce this behavior on my Pis.
-
@luetzel ooooohhhh no...here we go again!
My distribution is OSMC,RetroPie is installed as RetrOSMC.
ANy idea what the 'usb_claim_interface: operation' is?I'm assuming it's for Sixpair to read the USB input?
-
@Wolfman100 erm......feel like an idiot.Was missing root permission.
sudo sixpair
fixed it:
Current Bluetooth master: b8:27:eb:a1:9b:7f Setting master bd_addr to b8:27:eb:a1:9b:7f
Still not playing ball though.Pairs fine...no response in JsTest
-
After doing some further research some people are suggesting that the package 'raspberrypi-sys-mods' is required.
When attempting to install the package however it cannot be found:
osmc@osmc:~$ sudo apt-get install raspberrypi-sys-mods Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package raspberrypi-sys-mods
-
@Wolfman100
IMHO the package raspberrypi-sys-mods doesn't exist on osmc. You have to add the Raspbian repo to your apt sources.list in order to install it.Your problem might be related to the fact, that Kodi 16 indeed blocks input for joypads if it doesn't run on x11.
(https://discourse.osmc.tv/t/osmc-kodi-16-with-usb-gamepad-support-wired/15610/3)
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.