Worklog Xperia Play Bluetooth Controller

Joined
Mar 8, 2017
Messages
13
Likes
37
I've been working on a project for a little bit now that I wanted to show off and remembered the bitbuilt forums! The xperia play is an old gaming phone that runs android 2.3. It has a discord dedicated to archiving its games and I've been having fun playing on it. I wanted to look into a tv docking experience and for that it needs a good wireless controller. Being pre-ics mean it doesn't actually support bluetooth controllers yet and its unique touchpads wouldn't map easily to a traditional analog stick. This means I can put my 3d printer to good use designing my own!

1756143773252.webp


Features:
Full controller support including android navigation buttons
Rumble
2500 mah battery (estimated 18 hour battery life)
Open source
Easily available components
120hz tick rate

In the xperia play, the analog sticks are just a single synaptics touchpad and the buttons are keyboard keys. In order to map to these we need to hook into the key events using root. The software half is an app that starts a service and injects input into the correct device. The controller hardware is an esp32 that communicates over bluetooth serial (ble is too new for the play). For our touchpad pad I used a ps4 controllers touchpad with a really nice pinout shown below. This supports 2 point multitouch we need for the analog sticks.

1756143933341.webp

Source

The buttons will also be connection using 2 mcp32008 i2c gpio expanders. This means the touchpad and buttons will all communicate over i2c utilizing interupt events instead of constant polling.

Current progress:
Esp32 connects to the play and sends packets which are injected properly for regular keys.

1756144081251.webp
1756144094122.webp
1756144347458.webp
1756144721998.webp


To do:
Monitor android vibration events and repeat it to controller
Send touchpad inputs to android
Actual UI for injection app
Key remapping functionality
Sleep mode for controller
Look into haptics for touch events and connection

Github page(WIP): https://github.com/nachoz12341/Xperia-Play-Controller
 
Damn man,I really like this slide controller,looks crazy!Good luck for finish it :)
 
I've managed to get the buttons working. I'm using two mcp23008 ic's to expand the gpio on each half of the controller communicating with the esp32 over i2c. I've also changed to a different driver board for the rumble motor hoping to get some more functionality out of it. Maybe some indicating rumble or even look into haptic feedback with the touchpad.

20250901_182511.webp


Demo:






At the moment I'm having a really hard time getting good latency from the esp32's serial bluetooth. At best getting latency in the realm of 1s. If anyone has any ideas on how to improve this I would appreciate it.
 
Not too much to show off. Ive been through a few new revisions of the controller model though all small adjustments. I went back to my old approach for rumble the driver board was overkill for what I needed. I have been working much more on the software side. I massively improved the latency and cpu utilization on the xperia play itself. As well as more accurate input injection.


This was a good learning experience for basic android app development outside of game dev.

Basic interface:
1000050833.webp


Ive also discovered the bluetooth serial protocol im using is exactly how the old moga controllers used to communicate in "A mode." I've added compatibility with my app so you can use either the custom 3d printed controller or a moga controller.

 
Back
Top