- Arch Linux
- #1 2018-03-16 01:44:51
- Dualshock 3 Shanwan Controller and Bluetooth
- #2 2018-03-16 10:14:39
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #3 2018-03-16 15:12:48
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #4 2018-03-16 21:35:56
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #5 2018-03-16 22:23:38
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #6 2018-03-17 00:57:52
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #7 2018-03-17 01:34:12
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- #8 2018-03-17 02:05:37
- Re: Dualshock 3 Shanwan Controller and Bluetooth
- Using the PlayStation 3 controller in Bluetooth mode with Linux
- Watch on Youtube
- Watch on Youtube
- 1.В Introduction
- 2.В Disclaimer
- 3.В Support as a Bluetooth HID joystick
- 3.1.В Requirements
- Help:Controller Configuration
- Namespaces
- Page actions
- Contents
- Which controller should I buy?
- DualShock 3
- DualShock 4
- DualSense
- Xbox or XInput-compatible
- Using DualShock 3 controller
- On Windows
- Using dedicated DualShock 3 pad handler
- Using XInput pad handler with ScpToolkit
- On Linux
- Using DualShock 4 controller
- On Windows
- On Linux
- Analog sticks not centered with evdev pad handler
Arch Linux
You are not logged in.
#1 2018-03-16 01:44:51
Dualshock 3 Shanwan Controller and Bluetooth
I have this DS3 controller that, despite the Sony branding and solid construction, is a Chinese clone (lsusb identifies it as a Sony product, but dmesg says its from Shanwan). The controller works perfectly fine over USB, but I can’t seem to get it to connect via Bluetooth.
I tried plugging it in via USB, unplugged it, and scan. When doing this, I do see a Bluetooth address pop up, but I can’t connect to it. From the AUR, I’ve tried installing sixpair, but that, along with other packages (like bluez-ps3) requires an outdated version of Bluez.
My Arch Setups:
* Lenovo B40-80
* 3.95GHz Ryzen 1500X, Biostar X370GTN (ITX), 16GB DDR4, R9 290, OCZ 120GB SSD + PNY 1TB SSD
#2 2018-03-16 10:14:39
Re: Dualshock 3 Shanwan Controller and Bluetooth
First you need to pair your controller (write your computer’s bluetooth address inside the controller) through a USB cable, I believe I use sixpair too but I can confirm later.
Then I found the gentoo wiki more detailed on how to use bluez to pair it (but you do need to have bluez-ps3 to use a clone): https://wiki.gentoo.org/wiki/Sony_DualShock#DualShock_3
PS: the 4.16 kernel will have a fix for the clones rumbling when you connect them to USB, you can install the dkms-hid-sony-shanwan package in the meantime.
Last edited by Dreamkey (2018-03-16 10:17:06)
#3 2018-03-16 15:12:48
Re: Dualshock 3 Shanwan Controller and Bluetooth
The problem is sixpair and bluez-ps3 don’t work on the current version of Bluez. I saw the Gentoo guide and that too depends on an older version of Bluez. So, I don’t appear to have a way to connect using the current generation of Bluez.
I don’t have the USB rumbling issue, so no worries there (I think I’m already running the 4.16 kernel).
Last edited by schmidtbag (2018-03-16 15:13:43)
My Arch Setups:
* Lenovo B40-80
* 3.95GHz Ryzen 1500X, Biostar X370GTN (ITX), 16GB DDR4, R9 290, OCZ 120GB SSD + PNY 1TB SSD
#4 2018-03-16 21:35:56
Re: Dualshock 3 Shanwan Controller and Bluetooth
bluez-ps3 is bluez, it’s patched with the 5 patches you can find here (numbers 11 to 15). It was made by someone who sent them to the bluez mailing list, if I remember correctly it was the 3rd RFC; but I don’t know why it was never merged.
They don’t apply anymore since bluez v5.46, so if you absolutely need its last version there is no solutions yet.
But if you want to give a try, here is what I do when they won’t connect to my computer (I believe bluetoothctl saved my previous settings):
I’m curious if your controller works fine afterwards, because right now I have some troubles to use them: https://bbs.archlinux.org/viewtopic.php?id=235409
#5 2018-03-16 22:23:38
Re: Dualshock 3 Shanwan Controller and Bluetooth
Last edited by progandy (2018-03-16 22:32:27)
#6 2018-03-17 00:57:52
Re: Dualshock 3 Shanwan Controller and Bluetooth
@progandy: thanks! When I was seeing new release of bluez I was checking if the patches were applied, and I stayed on v5.45 when I couldn’t apply them anymore.
I just updated bluez (v5.49) and my controllers work like before, so @schmidtbag you should be able to use it too.
I still have the mapping issue, but I will check later the backports psyke83 did.
#7 2018-03-17 01:34:12
Re: Dualshock 3 Shanwan Controller and Bluetooth
Hmm I wasn’t aware the Sixaxis was so oddly picky about how it needed to be paired, at least the first time around. Seems to be easy to re-connect afterwords.
Sixpair didn’t seem to do anything for me; following the Gentoo guide worked after installing «bluez-ps3». I also needed to install hcitool, since the newer versions of Bluez don’t use that. I don’t especially like that I have to use this outdated bluez, but, at least it seems to be working with no negative side effects. At least for my gaming PC, the only thing I use Bluetooth for are gamepads, so for now I think I’m all set.
I may try experimenting with this a little bit, because now I have a clearer understanding of what exactly is going on in order for the controller to connect. It seems that it’s not so much the computer pairs with the controller, but rather the controller pairs with the computer. I’m not sure if there’s anything else I depend on in the bluez-ps3 package, but I wonder if I could use Arch’s normal bluez package (which in turn means the hcitool package gets broken), while doing the following:
1. Plug the controller in via USB.
2. Using whatever Bluetooth control panel (in my case, blueman), and set my PC to discoverable.
3. Unplug the USB cord.
4. There should be a prompt for authorization (say yes).
5. Trust the controller after being paired.
That should, in theory, allow me to make a first-time connection without any special tools, older versions of bluez, or CLI commands.
Also, for me the controller seems to be mapped out perfectly fine.
Last edited by schmidtbag (2018-03-17 01:35:13)
My Arch Setups:
* Lenovo B40-80
* 3.95GHz Ryzen 1500X, Biostar X370GTN (ITX), 16GB DDR4, R9 290, OCZ 120GB SSD + PNY 1TB SSD
#8 2018-03-17 02:05:37
Re: Dualshock 3 Shanwan Controller and Bluetooth
Hmm interesting little tidbit that I accidentally discovered — you can control the gamepad’s LEDs individually via shell scripts. For example if you want to turn on the «2» LED, you can do:
echo «1» > /sys/class/leds/XXXX\:XXXX\:XXXX.XXXX\:\:sony2/brightness
Replace the Xs with whatever your controller’s address is (bear in mind, it seems to change every time the controller is connected).
Change the 1 to a 0 to turn the LED off.
Since I personally intend to use the Sixaxis for «player 2», I created a udev rule that would automatically change the LED to 2 whenever the controller connects.
Last edited by schmidtbag (2018-03-17 02:47:40)
My Arch Setups:
* Lenovo B40-80
* 3.95GHz Ryzen 1500X, Biostar X370GTN (ITX), 16GB DDR4, R9 290, OCZ 120GB SSD + PNY 1TB SSD
Источник
Using the PlayStation 3 controller in Bluetooth mode with Linux
Watch on Youtube
Watch on Youtube
Table of Contents
1.В Introduction
Ever since the PS3 platform was released (Japan: 2006-11-11; USA: 2006-11-17; Europe: 2007-03-23) there has been speculation as to whether its wireless controller, dubbed «SIXAXIS», could be used in non-gaming applications. It is already known that the SIXAXIS operates as a regular HID device in USB mode. Since it is being marketed as a Bluetooth device, it was fair and legitimate to expect it to also work with any Bluetooth-compliant computer, just like the Wiimote.
This document explains how to configure Linux to recognize the SIXAXIS as a Bluetooth HID device.
2.В Disclaimer
These instructions are not endorsed by Sony. There is no guarantee that you will not damage your SIXAXIS or your PS3 by following them.
The use of Bluetooth authentication and encryption has not been investigated yet. Running in non-secure mode, as described in this document, might be inappropriate for some applications, and may also make the host computer temporarily vulnerable to attacks.
3.В Support as a Bluetooth HID joystick
3.1.В Requirements
At the time of writing, mainstream Linux distributions do not explicitly support the SIXAXIS in wireless mode. Hence, the following customizations are required.
linux-2.6.21 or later .В Earlier kernels do not support Bluetooth HID devices in «Report Protocol» mode.
patch-hidd-3.9-pabr3 or patch-hidd-3.19-pabr3 .В This patch causes the Linux Bluetooth HIDP daemon ( hidd ) to send a special command to the SIXAXIS when it connects. Sony already published a similar patch for enabling reporting in USB mode.
sixpair.c.В (Only required if the SIXAXIS is to be used with a non-PS3 Bluetooth master.) The SIXAXIS apparently does not support the standard Bluetooth pairing procedure; instead, pairing is done over USB, which is arguably simpler and more secure. This command-line utility searches USB buses for SIXAXIS controllers and tells them to connect to a new Bluetooth master.
Alternatively, it might be possible to support the Bluetooth HID «Report Protocol» on older kernels by using bthid instead of hidd , with a similar patch.
Besides, the new «input service» ( bluetoothd-service-input ), which replaces hidd in recent versions of bluez-utils , should support the SIXAXIS without any patch. However, since it does not accept connections from unknown Bluetooth devices, authorizations must be set-up by another utility, such as a udev plugin, as suggested in this discussion.
Источник
Help:Controller Configuration
Namespaces
Page actions
Before we begin, download the GamePad Test homebrew which will help visualise motion and pressure-sensitive information received by RPCS3 and can be used for troubleshooting. [Source]
Contents
Which controller should I buy?
This section is intended for those who do not own a controller right now and are looking into purchasing one, or who have a controller but need a new one with support for motion controls.
DualShock 3
Most DualShock 3 controllers sold online these days are FAKE. It’s impossible to tell fake controllers apart as they are made with the same molds and have same symbols and labels on them as official DualShock 3 controllers. Fake controllers might be missing some features (such as motion controls or pressure-sensitive buttons) and they are often not compatible with DualShock 3 drivers. For this reason it’s not recommended to purchase these controllers anymore. On top of that, even if you find a original controller then setting it up still involves installing additional software and requires far more effort than other options.
DualShock 4
DualShock 4 controllers are good choice for RPCS3 as they are commonly available in many colors and are easy to set up with the emulator. These controllers support motion controls as well, allowing you to play the games which require these features, and additionally it has the same symbols on the buttons as the PlayStation 3. However, to use these controllers on other games and emulators might require third-party tools that interfere with RPCS3. Some games do support DualShock 4 without third-party tools, but it’s not common and is mostly limited to games that were released for the PlayStation 4.
DualSense
For DualSense (PlayStation 5) controllers, the same notes apply as for DualShock 4 as these controllers are very similar for PC users. The games and software with native support for DualShock 4 are often not compatible with DualSense, but DualSense support might be more common in the future. DualSense also has additional features such as Adaptive Triggers and HD vibration, but as the time of writing these features aren’t utilised by RPCS3 or other PC software.
Xbox or XInput-compatible
If you mainly want a controller for PC games or other emulators then Xbox (or any third-party XInput compatible) controllers are a great choice as they are widely supported and do not require any additional software or third-party tools to work. However, they will not support features such as motion controls or pressure-sensitive buttons, which means that you will not be able to play games on RPCS3 that require these features. Additionally, the button labels on the controller will not match the ones that PlayStation 3 games display.
Using DualShock 3 controller
On Windows
Currently there are 3 methods of setting up your DualShock 3 (and SIXAXIS) to RPCS3:
- Using RPCS3’s dedicated DualShock 3 pad handler by installing Nefarius’ DsHidMini driver. (recommended)
- Using RPCS3’s dedicated DualShock 3 pad handler by installing the official DualShock 3 driver from Sony.
- Using RPCS3’s XInput pad handler together with the third-party tool ScpToolkit.
The three approaches have advantages and disadvantages so here’s a quick comparison between them:
Using dedicated DualShock 3 pad handler with DsHidMini driver | Using dedicated DualShock 3 pad handler with official SONY driver | Using XInput pad handler |
---|---|---|
Slightly complex installation instructions | Non-intrusive and simple installation | Very complex installation instructions |
Can be used in combination with other XInput devices in RPCS3 | Can be used in combination with other XInput devices in RPCS3 | Currently cannot be used in combination with other XInput devices in RPCS3 |
Bluetooth connectivity present when used in conjunction with Nefarius’ BthPS3 | No Bluetooth connectivity | Bluetooth connectivity present |
Permanently blocks all other Bluetooth device from connecting to the PC | ||
Some third-party DS3 controllers may work | No support for third-party DS3 controllers (e.g. PANHAI) | Some third-party DS3 controllers may work |
Need to uninstall third-party tools that access the DualShock 3 such as ScpToolkit | Need to uninstall third-party tools that access the DualShock 3 such as ScpToolkit | Pressure-sensitivity does not work with Nefarius’s version of ScpToolkit, need to use the original version linked below |
Preferable for users who already have original ScpToolkit v1.2.2.175 installed (or newer versions of ScpToolkit and aren’t interested in pressure-sensitive buttons) |
Using dedicated DualShock 3 pad handler
The recommended method is to use RPCS3’s dedicated DualShock 3 pad handler. This can be done in two ways: by using the official DualShock 3 driver from Sony or by using Nefarius’ DsHidMini driver. This option lets users take advantage of all features such as pressure-sensitive buttons and motion controls.
Using Nefarius’ DsHidMini
DsHidMini is a universal driver for the DualShock 3 developed by Nefarius and is currently in Beta testing. It allows the DualShock 3 to be presented as different types of HID devices. In its «SXS» mode, the driver emulates the behavior of the official Sony driver, ensuring compatibility with RPCS3. When used in conjunction with Nefarius’ BthPS3, controllers can be connected by Bluetooth after being paired. To use RPCS3’s dedicated DualShock 3 pad handler with Nefarius’ DsHidMini driver:
- Disable all third-party tools accessing the DualShock 3 controller (such as ScpToolkit).
- Follow DsHidMini’s installation guide.
- With the controller connected, open the DsHidMini Control UI and confirm that it’s in «SXS» mode, if it’s not then change to it.
- Select RPCS3’s dedicated DualShock 3 pad handler in the Gamepad Settings menu.
Using the official Sony Driver
With Sony’s driver bluetooth functionality will be unavailable. To use RPCS3’s dedicated DualShock 3 pad handler with Sony’s driver:
- Disable all third-party tools accessing the DualShock 3 controller (such as ScpToolkit).
- Download the DualShock 3 drivers v3.0.0.0 for Windows and install it. [Source]
- After completion of the installation, restart your PC.
- Connect the controller using a USB cable and press the PS button (in the middle of the pad) to allow the DualShock 3 to start sending reports to RPCS3.
- Select RPCS3’s dedicated DualShock 3 pad handler in the Gamepad Settings menu.
Additional Notes
Re-enable deep sleep mode on Windows 10 (Official Sony Driver)
When you have installed official Sony driver, your DualShock 3 controller prevent Windows 10 to turn on deep sleep mode automatically (after the timeout you defined in windows settings). To re-enable this behavior, you simply need to disable your PlayStation 3 controller in device panel (under Human Interface Device (HID) list). Image
Don’t forget to re-enable it to play. Of course, you still can unplug the USB cable in the same manner.
Resetting the controller
DualShock 3 can sometimes become unresponsive when the PC is restarted with it being connected. This can manifest in the following ways:
- All 4 lights are blinking.
- Controller appears as disconnected
- Controller appears as connected, but none of the buttons work
To fix this, turn the controller around and press the Reset button on the back. It is located in the bottom of a small, circular hole at the center of the controller, next to a larger screw-hole. You’ll need a thin, long stick to reach it.
Using XInput pad handler with ScpToolkit
The alternative method is to use the XInput pad handler along with ScpToolkit. This option carries various benefits and drawbacks as mentioned in the table above. To use the XInput pad handler for the DualShock 3:
- Download ScpToolkit v1.2.0.160 along with Update v1.2.2.175.
- Extract ScpToolkit v1.2.0.160 and place the ScpServer folder in the location of your choice.
- Extract Update v1.2.2.175 over ScpServer folder and overwrite all files when prompted.
- Connect your controller to your PC using a USB cable or Bluetooth and let Windows automatically install the generic driver.
- Launch the ScpDriver.exe found in ScpServer/bin/ and click Install.
- Navigate to ScpServer/bin/Win64/ and launch SCPUser.exe. Test whether the input from your controller is correctly recognised. If the input is not recognised, restart your PC and try again.
- Once the input is correctly working, download the modified XInput wrapper and copy the XInput1_3.dll from the x64 folder to your RPCS3 folder and place it next to the rpcs3.exe.
- Select RPCS3’s XInput pad handler in the Gamepad Settings menu.
- As stated in the comparison above, this method prevents RPCS3 from recognising other XInput controllers. However, if users move XInput1_3.dll out of the RPCS3 folder, RPCS3 will be able to recognise both XInput and DualShock 3 controllers at the same time. However, doing so will cause the DualShock 3 controller to lose pressure-sensitive buttons and motion controls, behaving like a regular XInput device.
- Currently only one application can receive pressure-sensitive information over SCP interface, so if you already have something else running that uses this information (for example, another emulator) then DualShock 3 controller in RPCS3 may behave as a regular XInput device, or in some cases one of the two applications may crash.
- If SCPUser.exe crashes with the error The application was unable to start correctly (0xc0000142) in step 6, download this fork of the modified XInput wrapper and copy the XInput1_3.dll from the x64 folder to the Win64 folder and place it next to the SCPUser.exe. If this resolves the issue and your controller is detected, copy this .dll to your RPCS3 folder instead.
On Linux
The DualShock 3 on Linux works with HIDAPI, allowing for the controller to work through USB as well as Bluetooth. To use the DualShock 3 Backend, users need to create a file called /etc/udev/rules.d/99-ds3-controllers.rules (you will need root permissions to create this file), and fill it with the following:
After this you must either:
- restart your computer for these settings to apply or
- run sudo udevadm control —reload-rules and replug in your controller
This will allow RPCS3 to communicate with the DualShock 3. Users can then select RPCS3’s dedicated DualShock 3 pad handler in the Gamepad Settings menu.
Using DualShock 4 controller
On Windows
The DualShock 4 on Windows works with HIDAPI, allowing for the controller to work through USB as well as Bluetooth. There aren’t any additional steps required and the controller should just work with RPCS3’s dedicated DualShock 4 pad handler. However, please note that third-party tools like ScpToolkit or DS4Windows may interfere with RPCS3 and it is recommended to disable all such tools.
On Linux
The DualShock 4 on Linux works with HIDAPI, allowing for the controller to work through USB as well as Bluetooth. To use the DualShock 4 Backend, users need to create a file called /etc/udev/rules.d/99-ds4-controllers.rules (you will need root permissions to create this file), and fill it with the following:
After this you must either
- restart your computer for these settings to apply or
- run sudo udevadm control —reload-rules and replug in your controller
This will allow RPCS3 to communicate with the DualShock 4. Users can then select RPCS3’s dedicated DualShock 4 pad handler in the Gamepad Settings menu.
Analog sticks not centered with evdev pad handler
When using the evdev pad handler on Linux, some users may encounter cases where the analog sticks of the controller are not centered but stuck in the corner of the movement zone. This issue occurs when incorrect drivers are used for the controller.
Usually, analog sticks have a range from -x to +x while triggers use only a positive range from 0 to +x . However, some controllers use positive ranges for analog sticks as well which does not directly work with RPCS3’s implementation. Hence, the following workaround is required:
/.config/rpcs3/ and open evdev_positive_axis.yml . If this file does not exist in the directory, create it.
Before | After |
---|
This is not an exhaustive list of options available. Users are requested to toggle other options as required by their specific controller or driver.
Источник