Sony DualShock 3 - call for testers: "sixaxis" script module
-
@Headcrab said in Sony DualShock 3 - call for testers: "sixaxis" script module:
I've done some more testing, and found out that libbluetooth-dev does the trick.
I think that's a red herring, the package contains only development files, without any impact on the Bluetooth stack that's running on the Pi.
EDIT: Hm, actually it seems to contain more than that. I'll take a look, but on my system this is not installed and the controller works ok.
-
@mitu
My findings are not based on actual knowledge of what each package does, so you are probably right.But just to be clear, when you say that your controller works fine do you mean that when trying to Register for the first time, it is being discovered without that package being installed?
-
@Headcrab said in Sony DualShock 3 - call for testers: "sixaxis" script module:
But just to be clear, when you say that your controller works fine do you mean that when trying to Register for the first time, it is being discovered without that package?
I never had that package installed and it's not installed now, so yes - discovery and (now) basic controller functionality worked without it. There might by a difference between systems though, I've paired and connected on a Pi4, which has a different BT chipset, so you being on a Pi3B+ might count.
-
@mitu said in Sony DualShock 3 - call for testers: "sixaxis" script module:
I've paired and connected on a Pi4, which has a different BT chipset, so you being on a Pi3B+ might count.
I just "borrowed" a rpi4(1gb) from my nas setup so i can test this.
I performed these steps:
- Burn the "retropie-buster-4.6-rpi4.img" image on the sd card
- boot into emulationstation
- connect ps3 controller over usb and configure controls, so i can navigate
- go to driver packages and install sixaxis
- with the controller connected over usb navigate to Bluetooth > "Register and Connect to Bluetooth Device"
- follow the instructions to unplug and re-plug the cable (and leave it connected)
The outcome was exactly like on my rpi3.
- Discovery fails.
- If i install libbluetooth-dev and reboot
- Discovery succeeds
Maybe it's a problem with my controller, i don't know.
Also, i do not own a ps3 console, so it is not interfering in any way. -
@mitu, Hello, thank you, you are always helping people. My controller is original Sony, I always used the same controller, before upgrading to version 4.6, the same controller worked perfectly.
-
@wmarcio What version did you run before the upgrade ? Did you install the 4.6 Buster image ? Did you enable support for 3rd party controllers ?
-
I don't remember the previous version exactly, but I always update frequently, it was the last one before I upgraded to 4.6. Yes I did a clean installation for version 4.6 Buster, as I saw that it didn't work, I restored the previous image of raspbian 9.11 stretch and Retropie 4.6, that's when the problem started. Yes, I have enabled support for third party control.
-
@wmarcio said in Sony DualShock 3 - call for testers: "sixaxis" script module:
I don't remember the previous version exactly, but I always update frequently, it was the last one before I upgraded to 4.6.
There's no difference between the previous (4.5.20) and the 4.6 version, except the version tag. There have been no modifications in quite a while for the bluetooth module in RetroPie, so I don't see what change in 4.6 might trigger this problem.
Yes I did a clean installation for version 4.6 Buster, as I saw that it didn't work, I restored the previous image of raspbian 9.11 stretch and Retropie 4.6, that's when the problem started. Yes, I have enabled support for third party control.
Then I suggest you try the
ps3controller
package, it might work better with 3rd party controllers. -
@mitu ok, will try It. Thxs again.
-
Thanks for your troubleshooting efforts. It seems that
libbluetooth-dev
itself doesn't fix your problem, but it triggers installation of the actual needed package -libbluetooth3
, which contains the sixaxis plugin for BlueZ. This is quite odd, as I would have expected it to be present in a default Raspbian installation.I'll do some checking and report back soon.
-
@psyke83 Looks like - in my case -
libbluetooth3
is also present, installed as akodi
dependency. -
@mitu said in Sony DualShock 3 - call for testers: "sixaxis" script module:
@psyke83 Looks like - in my case -
libbluetooth3
is also present, installed as akodi
dependency.That also explains why I didn't notice the issue until now. This PR should fix the issue: https://github.com/RetroPie/RetroPie-Setup/pull/3125
-
Thanks for the ongoing work on this.
I can't seem to get my Shanwan controllers to pair. RPI3B+, Buster from download today, upgraded first (both the retropie_setup scripts and 'Yes' to the OS/Kernel when it asks if you want to update that as part of 'Update'.
I've enabled third party support, which installs customhidsony.
I go to Register and Connect to Bluetooth Device, and it takes around 15 seconds for anything to happen weirdly - it used to be instant - then I get the Searching.. screen (with third party support it has the DualShock string - without it, it doesn't). In any case, no devices found. I've even tried custombluez and that doesn't work.
This used to work on an old Stretch build (I grabbed the original PR when sixaxis was first added as a pull request and it worked fine there).
It looks like some error flashes up, I did it via SSH so I could see the error, it appears to be this:
^[[CTraceback (most recent call last): │ │ File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-test-device", line 44, in <module> │ │ │ │ adapter = bluezutils.find_adapter(options.dev_id)───────────────────────────────────┘ │ File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluezutils.py", line 14, in find_adapter │ < OK > <Cancel> │ return find_adapter_in_objects(get_managed_objects(), pattern)────────────────────────┘ File "/home/pi/RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluezutils.py", line 9, in get_managed_objects manager = dbus.Interface(bus.get_object("org.bluez", "/"), File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object follow_name_owner_changes=follow_name_owner_changes) File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__ self._named_service = conn.activate_name_owner(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner self.start_service_by_name(bus_name) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name 'su', (bus_name, flags))) File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.bluez': timed out (service_start_timeout=25000ms)
systemctl status dbus-org.bluez.service
Looks to give:
Active: inactive (dead)
May 05 00:10:04 raspberrypi systemd[1]: Condition check resulted in Bluetooth service being skipped.The systemd line is added each time Register and Connect is pressed. It's inactive (dead) straight after I log in after boot.
pi@raspberrypi:~ $ service hciuart status ● hciuart.service - Configure Bluetooth Modems connected by UART Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2020-05-05 00:12:50 BST; 5min ago Process: 348 ExecStart=/usr/bin/btuart (code=exited, status=1/FAILURE) May 05 00:12:20 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART... May 05 00:12:50 raspberrypi btuart[348]: Initialization timed out. May 05 00:12:50 raspberrypi btuart[348]: bcm43xx_init May 05 00:12:50 raspberrypi systemd[1]: hciuart.service: Control process exited, code=exited, status=1/FAILURE May 05 00:12:50 raspberrypi systemd[1]: hciuart.service: Failed with result 'exit-code'. May 05 00:12:50 raspberrypi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART. pi@raspberrypi:~ $ sudo hciconfig -a pi@raspberrypi:~ $ sudo systemctl start bluetooth pi@raspberrypi:~ $ systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-05-05 00:19:42 BST; 7s ago Docs: man:bluetoothd(8) Main PID: 1097 (bluetoothd) Status: "Running" Tasks: 1 (limit: 1772) Memory: 1.7M CGroup: /system.slice/bluetooth.service └─1097 /usr/lib/bluetooth/bluetoothd May 05 00:19:42 raspberrypi systemd[1]: Starting Bluetooth service... May 05 00:19:42 raspberrypi bluetoothd[1097]: Bluetooth daemon 5.50 May 05 00:19:42 raspberrypi systemd[1]: Started Bluetooth service. May 05 00:19:42 raspberrypi bluetoothd[1097]: Starting SDP server May 05 00:19:42 raspberrypi bluetoothd[1097]: Bluetooth management interface 1.14 initialized
But it still won't pair - that's as far as I can get. Anyone have any ideas?
-
I've found the issue. Turning off wifi seems to break bluetooth! (It never used to, as I used to have it off beforehand too).
Looks like theres a bug in the latest rpi firmware ^
Only thing now is it seems L/R trigger is set to Axis 2+ and Axis 5+ and it takes like 10 minutes to be able to get EmulationStation to set it when setting up the controller (not checked if it works in game yet) - anyone else had this problem? Setting via USB has the same axis numbers but it's really easy to set.
-
The
hid-sony
driver has two problems: it exposes both analog and digital events for the triggers, and in the case of the analog events, the triggers violate the Linux gamepad specification by having the resting position at -32767, when the specification calls for it to start at 0.Due to these issues, two workarounds are applied to EmulationStation for DualShock controllers during button setup - digital trigger events are ignored, and negative axis events are discarded (as most Linux software can't support analog button events that span both axes).
The latter workaround means that it will only detect the triggers being pressed when at ~50% pressure or higher. I suspect you might be having this problem due to not pressing the buttons firmly enough. It's also possible that if you hold the trigger at <50% pressure (i.e. where it reports a negative axis value) for too long, EmulationStation thinks you are holding down a button with the intention to skip to the next button. I might take a look at the code again and see if that can be fixed, but can't make any promises.
Finally, there's also a slight chance that your controller doesn't have a stable Bluetooth connection due to interference. My Pi model 3B has a revision of Bluetooth that doesn't support hardware flow control, which causes frequent ghost inputs - unless I manually lower the HCI baud rate. I'm not sure if any 3B+ models lack flow control, but it might be worth checking.
-
@psyke83 thanks - I got it recognised in the end and whilst playing the controller seems fine - it was just the initial set up. I think now I know the specifics, setting it up again would be easier I think it needs a quick press rather than a slow press from the sounds of it.
Good work.
-
Sixaxis has been working great for me on my Rpi4 running a new Retropie 4.6 install with all updates. Normally I can connect 7 dualshock 3's at a time without issue. But I found a way to break it partially.
@psyke83 I didn't see this mentioned in regards to Sixaxis:
If you disable ERTM (to get an Xbox One S controller to pair by bluetooth) or install Xpadneo (it disables ERTM during install) you will lose the ability to connect more than 4 Dualshock 3's at a time!
I tested this by disabling ERTM with this line in /etc/modprobe.d/bluetooth.conf
options bluetooth disable_ertm=YAfter reboot I can only connect 4 dualshock 3's.
Delete the file or set to disable_ertm=N
And after reboot I can connect 7 dualshock 3's again!Just wanted to mention it in case anyone else runs into a similar problem.
-
@psyke83 Hi, I was away since a long time.
I'm installing the latest Retropie version on an Rpi 3 and wanted to try the sixaxis driver with a SHANWAN PS3 clone controllor.
I was able to pair the controller but not to connect, the led on number 1 turn on solid red for less than a second and then disconnects.
Sometimes happens that while doing it, Emulationstation crash.
This is the messages on bluetoothctlAgent registered [<span style="color:blue">CHG</span>] Device 00:26:5C:5D:BD:00 Connected: yes [CHG] Device 00:26:5C:5D:BD:00 Name: PLAYSTATION(R)3 Controller [CHG] Device 00:26:5C:5D:BD:00 Alias: PLAYSTATION(R)3 Controller [CHG] Device 00:26:5C:5D:BD:00 Connected: no [CHG] Controller B8:27:EB:75:21:27 Powered: no [CHG] Controller B8:27:EB:75:21:27 Discovering: no Agent unregistered [DEL] Device 00:26:5C:5D:BD:00 PLAYSTATION(R)3 Controller [DEL] Controller B8:27:EB:75:21:27 retropie [default] Agent registered [CHG] Controller B8:27:EB:75:21:27 Powered: yes [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001801-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001200-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 UUIDs: 00001800-0000-1000-8000-00805f9b34fb [CHG] Controller B8:27:EB:75:21:27 Alias: BlueZ 5.50 [CHG] Controller B8:27:EB:75:21:27 Name: retropie [CHG] Controller B8:27:EB:75:21:27 Alias: BlueZ 5.50 [CHG] Controller B8:27:EB:75:21:27 Alias: retropie
There is something I can try to solve the problem ?
Thank you in advance.
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.