Home Interests Raspberry Pi

How to Use an Xbox One Controller on the Raspberry Pi

Get a grip and control your Pi!
howchoo   (467)
September 11, 2023
10 minutes


You'll Need 3

What you'll need
Howchoo is reader-supported. As an Amazon Associate, we may earn a small affiliate commission at no cost to you when you buy through our links.
Posted in these interests:
gaming • 85 guides
pi • 92 guides
xbox • 3 guides

The Raspberry Pi works with many controllers—Xbox controllers are no exception. From wireless Xbox 360 controllers to Bluetooth Xbox One controllers, if you’ve got an Xbox controller it will most likely work with a Raspberry Pi.

This guide focuses on how to set up an Xbox controller with Raspberry Pi OS. RetroPie is a little bit different—most of these steps will work, but be sure to check out our Ultimate RetroPie Controller Guide for details on setting up a controller with RetroPie.

The Ultimate RetroPie Controller Guide
Press A! Press A! No no no…not B!

How to Install Raspberry Pi OS on Your Raspberry Pi
Get the new official Raspberry Pi OS on your Pi.

1 – Install or update to the latest version of Raspberry Pi OS

Before we begin, be sure you’ve got the latest version of Raspberry Pi OS installed on your Pi. Visit our guide on how to update Raspberry Pi OS for details on this process.

How to Install Raspberry Pi OS on Your Raspberry Pi
Get the new official Raspberry Pi OS on your Pi.

2 – Install the xboxdrv driver

Xpad drivers are included with the latest version of Raspberry Pi OS—so this step is technically optional. We still recommend installing it in case you come across an application built around the old xboxdrv driver.

Run the following command to install it:

sudo apt-get install xboxdrv

3 – Connect a wireless Xbox controller

Wireless Xbox controllers use a USB wireless adapter. Connect the USB adapter to the Raspberry Pi. It should recognize and respond to the input as a normal USB controller.

4 – Connect an Xbox controller via USB cable

If you’re using a wired USB controller, plug the controller into a USB port on the Raspberry Pi. The Pi should detect the controller as a usable device.

5 – Connect a controller with Bluetooth

To connect an Xbox controller using Bluetooth, you’ll need a terminal window. Open one on Raspberry Pi OS or remote into the Pi using a terminal application of your choice.

1. Disable Enhanced Re-Transmission Mode (ERTM)

If ERTM is enabled, the controller won’t pair with the Pi. To disable the ERTM, run the following command:

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

Restart the Pi.

2. Start Bluetooth Tools

After the Pi reboots, start Bluetooth Tools with the following command:

sudo bluetoothctl

3. Search for the Xbox controller

Now we need to search for the Xbox controller. Don’t put the controller into pairing mode just yet. We have a few settings to adjust first. Enable agent with the following commands:

agent on

Next, we’ll start scanning for available Bluetooth devices. Run this command to start scanning:

scan on

4. Connect to the Xbox controller

Put the Xbox controller into Pairing mode. It should appear in the list of devices with a unique MAC address and the words “wireless controller” at the end. Take note of the MAC address, we’ll need it to connect the controller. In the terminal window, enter the following command, replacing MAC_ADDRESS with the Xbox controller MAC address.


After connecting the controller, make sure it’s listed as a trusted device with this command—again replacing MAC_ADDRESS with the one for the Xbox.


Close the bluetoothctl application by typing quit

5. Test the connection

We’ll use the joystick toolset to make sure everything is working. Install it with this command:

sudo apt-get install joystick

When it finishes installing, run this command to start the test:

sudo jstest /dev/input/js0

You will see a screen of numbers. If everything is working properly, pressing buttons on the controller will cause them to change.

6 – Use an Xbox controller to replace mouse functions

Now that your controller is connected, you may want to use it in place of a mouse. Run the following command in a terminal window to enable this feature:

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

If you need a specific mouse button, check the chart below for a corresponding button on the Xbox controller. It also includes a few keyboard functions.

FunctionXbox Controller Button
Move CursorLeft Joystick
Scroll WheelRight Joystick
Left ClickA
Right ClickB
Middle ClickX
Arrow KeysD-Pad
Page UpLB
Page DownRB

7 – You’re all done!

Next, learn how to use your Xbox One controller on your PC.

How to Connect Your Xbox One Controller to PC
Use your Xbox One controller with your favorite PC games.


Top 10 Enchantments in Minecraft

howchoo   (467)
March 25, 2024

The longer you play Minecraft, the more you realize that early-game tools just won’t cut it. Exploring the enchantment feature of Minecraft can be exciting, but also intimidating. Rather than worry about researching enchantments, below are the best enchantments in Minecraft! To learn how to enchant items, check out this guide! In this guide, you’ll see

Continue Reading


 467 guides

Introducing Howchoo, an enigmatic author whose unique pen name reflects their boundless curiosity and limitless creativity. Mysterious and multifaceted, Howchoo has emerged as a captivating storyteller, leaving readers mesmerized by the uncharted realms they craft with their words. With an insatiable appetite for knowledge and a love for exploration, Howchoo's writing transcends conventional genres, blurring the lines between fantasy, science fiction, and the surreal. Their narratives are a kaleidoscope of ideas, weaving together intricate plots, unforgettable characters, and thought-provoking themes that challenge the boundaries of imagination.

Discover interesting things!

Explore Howchoo's most popular interests.