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
- Raspbian configuration for the Xbox One controller
- How to connect the Xbox One controller to Raspberry Pi via USB
- How to connect the Xbox One controller to Raspberry Pi via Bluetooth
- Method 1: Use Microsoft's Xbox wireless adapter
- Method 2: Pair directly via Bluetooth tool
- 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.
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:
- Dongle wireless adapter
- 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
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.
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).
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:
- Use a USB cable
- Sync via Xbox wireless adapter
- Sync with the built-in Bluetooth tool (Raspberry Pi 3 and above)
Hope you are succesful.
You should read it
- Fix Xbox One game console not working
- How to use the Xbox or PS4 game console with Raspberry Pi
- How to Connect Xbox Wireless Controller to Android Phone
- How to synchronize the Xbox One gaming controller
- How to power off Xbox controller while Bluetooth pairing
- How to Connect Xbox 360 Wired Controller to PC Windows 8
- How to update software for Xbox controller via PC
- How to connect a PS4 or Xbox One controller to a Mac
- How to Connect an Xbox 360 Game Controller
- How to pair the DualShock 4 or Xbox wireless controller with Apple TV
- The best controllers for playing PC games
- Instructions for connecting PS5 and Xbox Series X controllers to smartphones
Maybe you are interested
How to add additional storage to Xbox Series X
Tony Stewart's All-American Racing is now available on Xbox One
The new Xbox Discord update allows watching live streams from the console
Microsoft will add a cloud-based Xbox Game Pass option
How to use Xbox Game Pass for free
6 reasons why users stick with Xbox Game Pass