How to connect the Xbox One controller to the Raspberry Pi

Are you a retro gaming fan wishing to connect the Xbox One controller to the Raspberry Pi? Thanks to the automatic configuration tools in RetroPie and Recalbox, you can control games using Xbox controller.

But what is the specific implementation? Need an adapter to connect the Xbox One controller to another computer? This is what you need to know.

Instructions for connecting the Xbox One controller with Raspberry Pi

  1. Raspbian configuration for the Xbox One controller
  2. How to connect the Xbox One controller to Raspberry Pi via USB
  3. How to connect the Xbox One controller to Raspberry Pi via Bluetooth
    1. Method 1: Use Microsoft's Xbox wireless adapter
    2. Method 2: Pair directly via Bluetooth tool
  4. Check out the Xbox One controller

Raspbian configuration for the Xbox One controller

If you plan to use the Xbox One controller with a Raspberry Pi, start by updating your operating system. In the terminal, enter the following command:

 sudo apt update sudo apt upgrade 

Wait for these commands to complete, notice any prompts that appear to confirm the installation.

How to connect the Xbox One controller to the Raspberry Pi Picture 1

In most cases, you don't need a driver for the Xbox One controller on Raspbian. Support for controllers built on the operating system. However, the emulator and the old game do not recognize this controller. This feature is also useful for connecting via Bluetooth (details are in the following section).

If you have a problem when the Xbox One controller works with certain games, install the driver with the command:

 sudo apt install xboxdrv 

As always, wait for the installation to complete before proceeding to the next step.

How to connect the Xbox One controller to Raspberry Pi via USB

The advantage of USB is that you only need to plug and use. Although the convenience of the Xbox One controller comes from the flexibility of wireless connectivity, but if you are disappointed when using it, try USB. Xbox One charging cable can be used for this, but if not available, you'll have to buy it yourself. The 2.7-meter version is best for playing games on retro systems.

Don't forget, you can also buy the Xbox One controller version with the included cable. Simply plug this cable in and save your Bluetooth configuration time.

How to connect the Xbox One controller to Raspberry Pi via Bluetooth

If you plan to connect your Xbox One controller to a Raspberry Pi, it's best to choose to connect via Bluetooth. However, it should be noted that older Raspberry Pi models may have processing speeds (or WiFi and Bluetooth connectivity) that do not meet the needs of wireless controllers. Please use USB if you are restricted by the old Pi version.

For new Raspberry Pi models (from Pi 3 and above), you have two options for wireless connectivity:

  1. Dongle wireless adapter
  2. Integrated Bluetooth tool

One of these two methods will be much easier than the other option.

Method 1: Use Microsoft's Xbox wireless adapter

The easiest way to connect the Xbox One controller to the Raspberry Pi is to use Microsoft's official Xbox wireless adapter.

(Note that this adapter is different from what is used by the Xbox 360 wireless controller).

With the wireless adapter connected to the Raspberry Pi, start and then wait for the device to light up. Keep the pairing button on the adapter and the Xbox One controller at the same time, then wait for the light to go on. When they stop flashing, you're ready to use!

Method 2: Pair directly via Bluetooth tool

Before continuing, make sure you have installed the xboxdrv driver as the article explained earlier.

Synchronizing the Xbox One controller requires you to disable ERTM (short for Enhanced Re-Transmission Mode, a key feature of Bluetooth). With ERTM enabled, devices cannot be synchronized. Disable ERTM with the following command:

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

Next, restart the Raspberry Pi:

 sudo reboot 

The rebooted Raspberry Pi is now available for Bluetooth connectivity. Start the Bluetooth tools with:

 sudo bluetoothctl 

You will see a 'Agent registered' response and a new prompt [Bluetooth] #. At the prompt, activate the agent as follows:

 agent on 

Then set it as the default option:

 default-agent 

The next step is to start scanning for identifiable Bluetooth devices. Use the 'scan on' command to start scanning:

 scan on 

How to connect the Xbox One controller to the Raspberry Pi Picture 2

Immediately, you will see a list in the terminal, including the available devices. However, the Xbox One controller will not be among these items. Instead, you will need to make the controller recognizable. Turn it on, then hold the sync button on the front of the device, next to the microUSB port.

How to connect the Xbox One controller to the Raspberry Pi Picture 3

When the light on the Xbox button starts flashing, it can be detected. You will see a string of numbers and descriptions appear in the terminal. They will look like this:

 [NEW] Device 5C:BA:37:4D:1D:95 Xbox Wireless Controller 

6 pairs of letters and numbers separated by colons are the MAC addresses of the Xbox One controller. This address is used to connect the controller to the Raspberry Pi with the connect command :

 connect 5C:BA:37:4D:1D:95 

( Note : Your MAC address will be different).

How to connect the Xbox One controller to the Raspberry Pi Picture 4

The connection will be confirmed in the Command Prompt with a row of lines following the message 'Connection successful'.

To ensure an easy connection in the future, guide Raspberry Pi to 'trust' the controller:

 trust 5C:BA:37:4D:1D:95 

When done, exit the Bluetooth tool with Ctrl + D

Check out the Xbox One controller

At this stage, you have completed all setup operations. To confirm if the Xbox One controller works correctly, install the joystick software :

 sudo apt install joystick 

With this setting, use the jstest tool to check your Xbox One controller input:

 sudo jstest /dev/input/js0 

A new window will open in the terminal, including a list of buttons and axes. Each will display different values ​​when pressing and moving. Moving around the buttons and thumbstick on the Xbox One controller will make values ​​appear. If the feedback is different and takes place immediately, then it means everything is set up and working correctly.

Until now, you're ready to start playing games with the Xbox One controller on the Raspberry Pi. Whether you use RetroPie, Recalbox or some other retro games for Raspberry Pi, profile controllers will also be available. This means that when you connect your controller, you can not only navigate the look of the retro game platform, but also play games!

Remember, you have 3 ways to connect the Xbox One controller to the Raspberry Pi:

  1. Use a USB cable
  2. Sync via Xbox wireless adapter
  3. Sync with the built-in Bluetooth tool (Raspberry Pi 3 and above)

Hope you are succesful.

3.9 ★ | 67 Vote

May be interested

  • The best controllers for playing PC gamesThe best controllers for playing PC games
    here are the best pc controllers, selected based on criteria such as comfort, control and how they are compatible with pc games.
  • Instructions for connecting PS5 and Xbox Series X controllers to smartphonesInstructions for connecting PS5 and Xbox Series X controllers to smartphones
    the ps5 and xbox series x series have finally arrived. along with the machine are two new types of controller ps5 and xbox series x. a lot of people ask the question can they connect these two controllers to their smartphones to play games?
  • How to connect the PS4 controller to a computerHow to connect the PS4 controller to a computer
    how to connect the ps4 controller to a computer. ps4 controller (dualshock 4) gives you a more enjoyable and engaging gaming experience. however, connecting the ps4 controller to a computer is not as simple as you think, but must go through some of the steps presented in the following article.
  • How to connect directly to a Raspberry Pi without InternetHow to connect directly to a Raspberry Pi without Internet
    the versatility of raspberry pi means that at some point you may have to use it outside or out of range of wireless networks. so how can you use it without plugging in the keyboard and screen?
  • How to Connect Two TVs to an XboxHow to Connect Two TVs to an Xbox
    if you have an xbox 360 or xbox one, you can project images on two tv screens without using a cable splitter. the methods in this article only show the same image, but this is ideal if you want to game elsewhere in the house with your xbox 360 connected to multiple tv screens or on your xbox one streaming to any computer that uses windows 10. the basic xbox cannot play on two tvs without a cable splitter.
  • How to Connect Xbox One to the InternetHow to Connect Xbox One to the Internet
    xbox one is the newest addition to microsoft's xbox family. more powerful than the xbox 360, but the xbox one's internet connection process is quite simple and technically basic.
  • How to connect the Raspberry Pi Zero to a TV without HDMIHow to connect the Raspberry Pi Zero to a TV without HDMI
    the standard raspberry pi has an alternative to hdmi, but the raspberry pi zero doesn't. here's what you need to know about connecting the raspberry pi zero to the tv using hdmi and rca composite.
  • How to set up Spotify Connect on Raspberry PiHow to set up Spotify Connect on Raspberry Pi
    spotify connect allows you to play all your favorite tunes through any compatible wireless product. in this tutorial, you'll learn how to set up your raspberry pi as a cheap, portable spotify connect device.
  • Steps to Connect a Mouse and Keyboard to XboxSteps to Connect a Mouse and Keyboard to Xbox
    want to connect a mouse and keyboard to your xbox so you can play games, use apps, and navigate the dashboard in the same familiar pc-like way? not all games are supported, and not all bluetooth keyboards are compatible.
  • How to connect Raspberry Pi remotely to a Windows computerHow to connect Raspberry Pi remotely to a Windows computer
    perhaps you need to check your email or some other application that you can only access on your pc. therefore, you will need to configure a remote connection for your raspberry pi.