How to hack the PS5 DualSense Controller in Python

preview_player
Показать описание


We're going to hack the PlayStation 5 DualSense wireless controller in Python to add it to a Raspberry Pi robotics project. There's no encryption, so all we need to do is find out how the DualSense communicates with our Pi, and from there, we'll decode the events and values.

This will work for an Xbox controller, and really any Bluetooth controller, too.

I'm really surprised at how easy it was!

Timestamps:
0:00 - intro
0:26 - customize the code
2:19 - how to hack the controller

Thumbnail Photo by Krzysztof Hepner on Unsplash
Рекомендации по теме
Комментарии
Автор

Great video and thanks for sharing the code! One note, for some reason on my DualSense some of the values were incorrectly labeled, therefor the outputs were incorrect. I was able to rework things and got the output I was hoping for. Thanks again!

davidmoffat
Автор

Great video thank you. I've started a 3D printed R2D2 and wanted to use a Raspberry-Pi/Arduino setup with the PS5 controller to control it. This program works fine with the controller from my PS5. I'll use the Raspberry Pi to send commands to an Arduino to do the actual control of servos, lights, motor controller, etc.

wlmckinnon
Автор

nice work man, i am not aa embedded progrmming expert but i understand, do i need to use specificaly a rasberry or i can just use a arduino or some random linux distro
(Sorry for bad english)

dankinel
Автор

Amazing brother, I love it :D this is awesome 😃

Yuenix
Автор

Awesome video. With the stock chipset on the DualSense, do you think it's possible to flash custom values to the controller? Example would be to change the value of R2 for a rapid fire mod on the controller

RyanM
Автор

This video was awesome. Do you think there is any what you be able to get the PS5 controller to work with the PS4?

TheRipper
Автор

Do you know if it's possible to control the adaptive triggers? Would be fun to program some feedback

filipforsstrom
Автор

Do you know about Xim. Device that you plug a ds4 controller in and then it lets you also plug keyboard n mouse in so you can use them on the PS4? It doesn't work on the PS5 with PS5 games they require you to have a PlayStation 5 controller. Do you think anything here could help them figure out how to get it to work? I've heard there's some decryption on the chip or something keeping this from working right now. There's a workaround going through your computer via Sony remote play and then you can use any controller on PS5 games.. just annoying and could be some lag issues. In my mind it should be easy if I have a dual shock 5 controller it has an authentic chip, I just need to mimic it.. But I'm sure it's a little more complicated. Any thoughts?

mkarns
Автор

Hey is it possible to remap buttons and make macros to play on the playstation itself? For example when pressing L1 + R2 the analog stick pulls 10 procent back?

danean
Автор

Awww I was sooo looking forward to trying this out on my Mac. But it turns out "evdev" is Linux-specific. :-( Thanks for sharing.

scotth.hawley
Автор

Is possible use firmware of Dualsense in RP2040 and use it in a PS5? Thank you very much for answer

lorvha
Автор

hi, does this also work on Android using Termux?

reyoktayhan
Автор

Hey man this video is very interesting do u have any social media Bc I would like to work with u on writing the code even better plus I have written my own code to be able to jailbreak the ps5

GhostGuyNGL