×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

How to get a Sony Dualshock 4 USB controller to be used as a joystick

  • Posts: 3
  • Thank you received: 0
I have this spare Sony Dualshock 4 Playstation controller lying around. It clicked in my head that it has a USB connection and so I plugged it into my Raspberry Pi running Astroberry to see if I could use it as a joystick. TL;DR: No.

I get this from "usb-devices":
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 18 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=054c ProdID=09cc Rev=01.00
S:  Manufacturer=Sony Interactive Entertainment
S:  Product=Wireless Controller
C:  #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=500mA
I:  If#=0x0 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=(none)
I:  If#=0x1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I:  If#=0x2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=(none)
I:  If#=0x3 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid

And I get this from "lsusb":
Bus 001 Device 018: ID 054c:09cc Sony Corp. DualShock 4 [CUH-ZCT2x]

Which all look great, but I don't see a device for the controller in /dev (other than the /dev/bus/usb/... device). However, "dmesg" shows:
[421877.145969] usb 1-1.3: USB disconnect, device number 23
[421901.952654] usb 1-1.2: new full-speed USB device number 28 using xhci_hcd
[421902.089712] usb 1-1.2: New USB device found, idVendor=054c, idProduct=09cc, bcdDevice= 1.00
[421902.089735] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[421902.089753] usb 1-1.2: Product: Wireless Controller
[421902.089771] usb 1-1.2: Manufacturer: Sony Interactive Entertainment
[421903.003267] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[421903.102672] usb 1-1.4: new high-speed USB device number 30 using xhci_hcd
[421904.013294] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[421904.013955] usb 1-1-port4: attempt power cycle
[421905.263268] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[421906.173319] usb 1-1-port4: Cannot enable. Maybe the USB cable is bad?
[421906.173986] usb 1-1-port4: unable to enumerate USB device

Which doesn't look good.

Ekos doesn't seem to find it at all, so I'm guessing either I don't have a proper driver for this device, or it's simply not going to work. Does anyone have any clue?
8 months 19 hours ago #95272

Please Log in or Create an account to join the conversation.

  • Posts: 91
  • Thank you received: 17
HI,
2 years ago, I had achieved that with USB cable connection and Bluetooth too. If I remember well, I used this tutorial to do it.

But I had found out that even it worked well the first time I set up the controller, I faced issues then after a reboot or shutdown. I had also tried with a cheap and non PS4 controller and it worked way better. But I no longer use any controller now, I just pick up a target using the kstars planetarium (and a few times with the mount manual controller in Ekos)

Valentin
150P and 72ED with ASI 071 MC pro
Guiding with qhy 5L-II-m and ASI 178MC
HEQ5 pro with EqMod
Kstars Ekos on lenovo thinkcenter with Linux Mint 21
8 months 17 hours ago #95275

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
Thanks - I'll take a look at that link. In the meantime, yes, I'm aiming with Kstars but I was hoping to be able to use the buttons and stuff for other things. Sort of like my own hand controller. Focus in/out, turn stuff on/off, that kind of thing. Is that not possible? Does it only control mount movement?

And, truth be told, it's a Walmart knock-off, so it's not a real Sony DS4. :-)
8 months 15 hours ago #95283

Please Log in or Create an account to join the conversation.

Time to create page: 0.179 seconds