Xbox Controller Raspberry Pi

By admin ·
1

Install or update to the latest version of Raspberry Pi OS

2

Install the xboxdrv driver

technically
sudo apt-get install xboxdrv
3

Connect a wireless Xbox controller

4

Connect an Xbox controller via USB cable

5

Connect a controller with Bluetooth

1. Disable Enhanced Re-Transmission Mode (ERTM)

echo 'options bluetooth disable_ertm=Y' | sudo tee -a /etc/modprobe.d/bluetooth.conf

2. Start Bluetooth Tools

sudo bluetoothctl

3. Search for the Xbox controller

agent on
default-agent
scan on

4. Connect to the Xbox controller

MAC_ADDRESS
connect MAC_ADDRESS
MAC_ADDRESS
trust MAC_ADDRESS
quit

5. Test the connection

sudo apt-get install joystick
sudo jstest /dev/input/js0
6

Use an Xbox controller to replace mouse functions

sudo xboxdrv --detach-kernel-driver --silent --mouse
7

You’re all done!