How to install and use NXBT (Switch 1 and Switch 2 supported)

TheStonedModder

Well-Known Member
Member
Joined
Dec 25, 2022
Messages
2,613
Reaction score
3,713
Trophies
2
Age
29
XP
8,032
Country
United States
This guide explains how to setup and use a premade and fixed version of the nxbt library since the current github release is long since unmaintained and unuseable at the time of writing due to an incompatibility issue with Python 3.12. (context: https://github.com/Brikwerk/nxbt/issues/181)

(More context: https://github.com/Brikwerk/nxbt/issues/87)

Downgrading to Python 3.11 avoids the dbus-python build errors and allows it to work again. But this thread is a much easier install process thanks to typenoob doing the work for us!

Goal?
The goal of this thread is to successfully install NXBT so that we can begin to use and make macros for games like Pokemon Legends ZA on either a modded(CFW) or unmodded(vanilla) system. This even works on Nintendo Switch 2!

These instructions are based on a successful setup on a raspberry pi. If you are using another linux distro you will need to adjust the wget instructions and download the proper binary from Typenoob here. Afterwards the rest of the steps should be same. Even if using a virtual machine

First you will need to verify what version of linux you're running. If aarch64 you can continue following this guide like normal! If its another you need to swap out the aarch64 part of the commands with your proper binary like the orange note at the top of the thread suggests!

Code:
uname -m

Next download the NXBT binary from typenoob
Code:
wget https://github.com/typenoob/nxbt/releases/download/Build_2023.10.29/nxbt-gnu-aarch64

Verify that it downloaded
Code:
ls

you should see something like

Code:
nxbt-gnu-aarch64

Now make it executable

Code:
chmod +x nxbt-gnu-aarch64

Now move this binary to your system path and then test it

Code:
sudo mv nxbt-gnu-aarch64 /usr/local/bin/nxbt

Test it with

Code:
sudo nxbt webapp

if the webapp launches, great job! You are now done and can begin using the app by visiting your systems IP:PORT in a browser. For example my webapp is available at http:macrosnx.local:8000

If you get any errors in regards to bluetooth, you can fix them with the following command. Afterwards the nxbt webapp command should work!
Code:
sudo apt-get update<br>sudo apt-get install bluez libdbus-glib-1-dev libdbus-1-dev
sudo systemctl start bluetooth

If the nxbt binary expects the Bluetooth service file at /lib/systemd/system/bluetooth.service, but on Xubuntu, it’s typically at /usr/lib/systemd/system/bluetooth.service. Create a symlink to fix this:

Code:
sudo ln -s /usr/lib/systemd/system/bluetooth.service /lib/systemd/system/bluetooth.service

image (2).png
 
Last edited by TheStonedModder,
Hello. I was unable to install the nxbt. I followed the instructions until the test part but when I run the command "sudo nxbt webapp" I get the error: "sudo: nxbt: command not found". I went back from the start a few times to make sure I wasn't doing anything wrong. Is there another step in between maybe?
Thanks for the big help!

I am using a raspberry pi 4 with raspberry OS.
 
Hello. I was unable to install the nxbt. I followed the instructions until the test part but when I run the command "sudo nxbt webapp" I get the error: "sudo: nxbt: command not found". I went back from the start a few times to make sure I wasn't doing anything wrong. Is there another step in between maybe?
Thanks for the big help!
It sounds like you may have missed these steps

You can also cd to this location and than do an ls command to confirm if the file is there. That would be the next troubleshooting step
IMG_9540.jpeg
 
1761442294471.png

I'm sure I ran these commands. I also checked if the file was indeed moved to the destination.
 
Never used linux like this before, im using mint and got my ip from the settings but still the page refuses to load.
 
Do you know how I could do that?
Post automatically merged:

Just completly lost right now, im on linux mint and i do not know if I did this correctly.
 
Last edited by Lilycovezzz,
I think I see the issue! I have a typo in the instructions

That chmod -x command to make it executable? That should be +x instead!

Please try that

-x revokes perms
+x grants
That was it! Thank you. I was able to install and use the webapp now.
 
EDIT: I fixed that one, now it just wont connect to my switch 2

The WebUI Starts all fine, but when i click create controller it says crashed on the ui
 
Last edited by Louid,
EDIT: I fixed that one, now it just wont connect to my switch 2

The WebUI Starts all fine, but when i click create controller it says crashed on the ui
That can happen from time to time especially if it doesn’t like your Bluetooth adapter and not on the change order screen of the controller menu first

The CLI is more stable. That being said make sure your still always on the change controller screen first or it will never connect
 
Last edited by TheStonedModder,
That can happen from time to time especially if it doesn’t like your Bluetooth adapter and not on the change order screen of the controller menu first

The CLI is more stable. That being said make sure your still always on the change controller screen first or it will never connect
i manually connected my switch via bluetoothctl, so everything works as expected now!
 
  • Like
Reactions: TheStonedModder
i manually connected my switch via bluetoothctl, so everything works as expected now!
Hi, could you share your procedure step-by-step? I can try Pi4/Pi5/Zero2W and even with another 2 different models USB bluetooth dongle. I never successfully connect my Switch (even no any errors on my console, everything looks working)
 
Hi, could you share your procedure step-by-step? I can try Pi4/Pi5/Zero2W and even with another 2 different models USB bluetooth dongle. I never successfully connect my Switch (even no any errors on my console, everything looks working)
To better troubleshoot please also share your procedure step by step

Including your process on the switch to connect
 
To better troubleshoot please also share your procedure step by step

Including your process on the switch to connect
Hi, the last time I tried was just following your steps without any errors. but just cannot connect to the Switch 2.
I follow the web description. Turn to "Change Grip/Order" from Home screen. But not connected even once.

1761522224868.png



As you can see, it stuck here.

I think it's same as: https://github.com/Brikwerk/nxbt/issues/182

I have tried my Switch 1 and 2:

Code:
luffy@raspberrypi:~ $ bluetoothctl devices
Device 5C:52:1E:xx:xx:xx Nintendo Switch            // my Switch 1

luffy@raspberrypi:~ $ bluetoothctl devices
Device E0:EF:BF:xx:xx:xx Nintendo Switch            // my Switch 2
luffy@raspberrypi:~ $

Code:
luffy@raspberrypi:~ $ sudo nxbt test
[1] Attempting to initialize NXBT...
Successfully initialized NXBT.

[2] Checking for Bluetooth adapter availability...
1 Bluetooth adapter(s) available.
Adapters: ['/org/bluez/hci0']

[3] Please turn on your Switch and navigate to the 'Change Grip/Order menu.'
Press Enter to continue...
Creating a controller with the first Bluetooth adapter...
Successfully created a controller.

[4] Waiting for controller to connect with the Switch...
Connection timeout is 120 seconds for this test script.
Timeout reached, exiting...
luffy@raspberrypi:~ $ sudo nxbt test
[1] Attempting to initialize NXBT...
Successfully initialized NXBT.

[2] Checking for Bluetooth adapter availability...
1 Bluetooth adapter(s) available.
Adapters: ['/org/bluez/hci0']

[3] Please turn on your Switch and navigate to the 'Change Grip/Order menu.'
Press Enter to continue...
Creating a controller with the first Bluetooth adapter...
Successfully created a controller.

[4] Waiting for controller to connect with the Switch...
Connection timeout is 120 seconds for this test script.
Timeout reached, exiting...
luffy@raspberrypi:~ $
 
Last edited by Mike72,

Site & Scene News

Popular threads in this forum