Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS3 controller connectivity issues #968

Open
dwalton76 opened this issue Sep 26, 2017 · 16 comments
Open

PS3 controller connectivity issues #968

dwalton76 opened this issue Sep 26, 2017 · 16 comments

Comments

@dwalton76
Copy link

@dwalton76 dwalton76 commented Sep 26, 2017

What are you trying to do?

Pair a PS3 controller via bluetooth by following this guide
http://www.ev3dev.org/docs/tutorials/using-ps3-sixaxis/

What did you expect to happen?

For it to pair :)

What actually happened?

Everything matches up with the guide up until the final step

  1. The brick now asks “Authorize service HID?” Press “Accept”

I never get the "Authorize service HID" message. When I did

  1. Connect the gamepad via a mini USB cable to the EV3

dmesg showed

[  884.854259] usb 1-1.2: new full-speed USB device number 5 using ohci
[  884.995348] usb 1-1.2: New USB device found, idVendor=054c, idProduct=0268
[  884.995433] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  884.995486] usb 1-1.2: Product: PS3 GamePad
[  884.995533] usb 1-1.2: Manufacturer: SHANWAN
[  885.363522] input: SHANWAN PS3 GamePad as /devices/platform/ohci.0/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0001/input/input2
[  885.379245] sony 0003:054C:0268.0001: input,hidraw0: USB HID v1.10 Joystick [SHANWAN PS3 GamePad] on usb-ohci.0-1.2/input0

I stepped through this tutorial
https://wiki.gentoo.org/wiki/Sony_DualShock

and this piece seems key

Enabling Sony DualShock support

    Device Drivers --->
          Input device support --->
            <*>   Joystick interface
            <*>   Event interface
          HID support --->
            [*]   Battery level reporting for HID devices
            [*]   /dev/hidraw raw HID device support
            <*>   Generic HID driver
                  Special HID drivers --->
                    <*> Sony PS2/3/4 accessories
                    [*]   Sony PS2/3/4 accessories force feedback support
                USB HID support --->
                  <*> USB HID transport layer
      [*] LED Support --->
            <*>   LED Class Support

How do I check to see if HID support is enabled in our kernel?

What hardware and software are you using (including version numbers)?

Hardware

Hardware is an EV3. My controller isn't an official SONY controller, it is this one by MarioRetro:
http://addictedgamer.com/playstation-3-games/wireless-gaming-controller-ps3-bluetooth-gamepad-game-controller-with-dual-vibration-joysticks-for-playstation-3-generic-by-marioretro/

I'm not sure if that is part of the issue or not. If anyone has an official PS3 controller can you see if it pairs?

Software

System info (from ev3dev-sysinfo)

Image file:         ev3dev-jessie-ev3-generic-2017-02-11
Kernel version:     4.4.87-22-ev3dev-ev3
Board:              LEGO MINDSTORMS EV3 Programmable Brick
Revision:           0006
Brickman:           0.8.1
ev3devKit:          0.4.3
@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Sep 26, 2017

Official PS3 controller is working for me on fresh install of ev3dev-jessie (same kernel).

robot@ev3dev:~$ ev3dev-sysinfo 
Image file:         ev3dev-jessie-ev3-generic-2017-09-14
Kernel version:     4.4.87-22-ev3dev-ev3
Board:              LEGO MINDSTORMS EV3 Programmable Brick
Revision:           0006
Brickman:           0.8.1
ev3devKit:          0.4.3
@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Sep 26, 2017

What is output of lsusb? I suspect this device is not in the mainline kernel.

@dwalton76

This comment has been minimized.

Copy link
Author

@dwalton76 dwalton76 commented Sep 26, 2017

It shows up as a PS3 controller

robot@ev3[~]# lsusb
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 006: ID 054c:0268 Sony Corp. Batoh Device / PlayStation 3 Controller
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
robot@ev3[~]# 
@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Sep 26, 2017

You might try ev3dev-stretch since it has a newer kernel. There are a few hack for 3rd party controllers that aren't 100% compatible, but you might be out of luck unless you want to build your own kernel and debug it.

@JorgePe

This comment has been minimized.

Copy link
Contributor

@JorgePe JorgePe commented Sep 26, 2017

What do you get if you print all devices?

devices = [evdev.InputDevice(fn) for fn in evdev.list_devices()]
for device in devices:
    print(device)

Also on my Ubuntu I need to run with sudo or give 777 permissions to /dev/input/event20 AFTER pairing my generic BT gamepad - evdev needs membership of group plugdev / input but doesn't work on my Ubuntu laptop and it doesn't see any device.

@dwalton76

This comment has been minimized.

Copy link
Author

@dwalton76 dwalton76 commented Sep 27, 2017

Same problem on stretch....I'll chalk this up to the $10 controller I bought.

@dwalton76 dwalton76 closed this Sep 27, 2017
@dwalton76

This comment has been minimized.

Copy link
Author

@dwalton76 dwalton76 commented Oct 5, 2017

I got an official PS3 controller and get the Authorize service HID? prompt now but the controller does not show up via evdev.list_devices(). David does yours show up as an evdev device?

@dwalton76 dwalton76 reopened this Oct 5, 2017
@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Oct 24, 2017

As a matter of fact, it doesn't:


[597881.224820] usb 1-1.4.4: new full-speed USB device number 5 using ohci
[597881.432668] usb 1-1.4.4: New USB device found, idVendor=054c, idProduct=0268
[597881.474157] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[597881.534254] usb 1-1.4.4: Product: PLAYSTATION(R)3 Controller
[597881.567024] usb 1-1.4.4: Manufacturer: Sony
[597882.273288] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc@1c00000/ohci-da8xx/usb1/1-1/1-1.4/1-1.4
.4/1-1.4.4:1.0/0003:054C:0268.0001/input/input2
[597882.399249] sony 0003:054C:0268.0001: input,hidraw0: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on us
b-ohci-da8xx-1.4.4/input0
[597889.001317] usb 1-1.4.4: USB disconnect, device number 5
[597911.881476] usb 1-1.4.4: new full-speed USB device number 6 using ohci
[597912.079365] usb 1-1.4.4: New USB device found, idVendor=054c, idProduct=0268
[597912.098164] usb 1-1.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[597912.122616] usb 1-1.4.4: Product: PLAYSTATION(R)3 Controller
[597912.146993] usb 1-1.4.4: Manufacturer: Sony
[597912.270579] input: Sony PLAYSTATION(R)3 Controller as /devices/platform/soc@1c00000/ohci-da8xx/usb1/1-1/1-1.4/1-1.4
.4/1-1.4.4:1.0/0003:054C:0268.0002/input/input3
[597912.320390] sony 0003:054C:0268.0002: input,hidraw0: USB HID v1.11 Joystick [Sony PLAYSTATION(R)3 Controller] on us
b-ohci-da8xx-1.4.4/input0
[597913.384453] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[597913.464282] Bluetooth: HIDP socket layer initialized
[597913.694183] input: PLAYSTATION(R)3 Controller as /devices/platform/soc@1c00000/serial8250.2/tty/ttyS2/hci0/hci0:1/0
005:054C:0268.0003/input/input4
[597913.819641] sony 0005:054C:0268.0003: input,hidraw1: BLUETOOTH HID v1.00 Joystick [PLAYSTATION(R)3 Controller] on 0
0:17:e7:b4:71:28
[597914.089542] sony 0005:054C:0268.0003: controller with MAC address 04:98:f3:a3:1c:eb already connected
[597914.308959] sony: probe of 0005:054C:0268.0003 failed with error -17
[597919.207997] usb 1-1.4.4: USB disconnect, device number 6
@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Oct 24, 2017

After disconnecting and re-connecting via Bluetooth it is working. Apparently, during the pairing process when it is connected via USB and Bluetooth at the same time, it tries to register the Bluetooth connection with the same name as the USB connection.

@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Oct 25, 2017

@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Apr 20, 2018

@dwalton76, can you try again with the 4.14.x kernel?

@dlech dlech added the info needed label Apr 20, 2018
@dlech dlech added this to Kernel in ev3dev-stretch Apr 20, 2018
@dwalton76

This comment has been minimized.

Copy link
Author

@dwalton76 dwalton76 commented Mar 25, 2019

Sorry for the slow (almost 1 year) reply :( Will give it a try.

@dwalton76

This comment has been minimized.

Copy link
Author

@dwalton76 dwalton76 commented Mar 26, 2019

My PS3 controller is dead :( Does anyone have one they can use to test this?

@dlech

This comment has been minimized.

Copy link
Member

@dlech dlech commented Mar 28, 2019

The workaround still works for me. I had to press and hold the PS button for a while to get the authorization box to pop up.

@dlech dlech removed this from Kernel in ev3dev-stretch Apr 12, 2019
@dlech dlech removed this from the ev3dev-stretch milestone Apr 12, 2019
@yosefl20

This comment has been minimized.

Copy link

@yosefl20 yosefl20 commented Oct 21, 2019

Hey guys. I got a SHANWAN clone PS3 gamepad which as same as the post mentioned. And I'm using the kernel 4.14.96. It still doesn't work.
the logs of dmesg I got like this:
[ 3899.490319] usb 1-1.2: new full-speed USB device number 16 using ohci-da8xx
[ 3899.651162] usb 1-1.2: New USB device found, idVendor=054c, idProduct=0268
[ 3899.651235] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3899.651273] usb 1-1.2: Product: PS3 GamePad
[ 3899.651307] usb 1-1.2: Manufacturer: SHANWAN
[ 3899.762446] input: SHANWAN PS3 GamePad Motion Sensors as /devices/platform/soc@1c00000/ohci-da8xx/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0009/input/input19
[ 3899.851386] input: SHANWAN PS3 GamePad as /devices/platform/soc@1c00000/ohci-da8xx/usb1/1-1/1-1.2/1-1.2:1.0/0003:054C:0268.0009/input/input18
[ 3899.853847] sony 0003:054C:0268.0009: input,hidraw0: USB HID v81.10 Joystick [SHANWAN PS3 GamePad] on usb-ohci-da8xx-1.2/input0
[ 3901.853082] usb 1-1.2: USB disconnect, device number 16

It's a clone of PS3, not manufactured by SONY.

@denorlov

This comment has been minimized.

Copy link

@denorlov denorlov commented Nov 16, 2019

Tryied to pair SHANWAN PS3 Gamepad with latest ev3dev (ev3dev-stretch-ev3-generic-2019-10-23). Without any luck. When connected over USB - PS3 vibrates. Also wasn't able to come to situation when ev3dev ask about authorisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.