Dinones / Nintendo-Switch-Pokemon-Shiny-Hunter

Search for shiny pokémon on your Nintendo Switch while sleeping!
Other
78 stars 4 forks source link

Controller Not Pairing #9

Closed ReZeroPlat closed 1 month ago

ReZeroPlat commented 1 month ago

when starting the Shiny_Hunter.py command the screen remains stuck at the pairing screen where im able to read current state: WAITING_PAIRING_SCREEN but im there and no idea

Dinones commented 1 month ago

Please, can you answer the following question:

  1. Does the controller connect to the Nintendo Switch?
  2. Are you using any Nintendo Switch theme? Like dark mode or any other one (custom/animated themes) that is not the light mode?
  3. Can you please provide a screenshot of the program?
ReZeroPlat commented 1 month ago

when I run the command python3 Switch_Controller.py it doesnt ask me to pair then it crash and in the terminal this appear: Option 1 selected: Testing Switch Controller... Restarting bluetooth systems... Bluetooth restarted successfully! Releasing 3 thread(s)...

im in light mode and at the moment i cannot provide a screenshot

Dinones commented 1 month ago

Just to be sure,

  1. Did you connect your bluetooth card to the virtual machine?
  2. Did you follow all the steps of the installation guide for the virtual machine?
  3. If yes, what step did you get stuck on?
ReZeroPlat commented 1 month ago

yes the card is connected to the vm yes i have followed all the steps excluded some "extra"

ReZeroPlat commented 1 month ago

just one thing, I haven't configured the shiny colors because I don't understand how to do it

Dinones commented 1 month ago

Hi! The newest version automatically detects the shiny pokémon so you don't need to configure the shiny colors anymore. Regarding the controller connection, it is related to the nxbt library. Can you please follow these steps in order to identify the issue:

  1. Run sudo pip3 install nxbt.
  2. Navigate back to the "Change Grip/Order Menu" of the Nintendo Switch and make sure any joycon is connected to it.
  3. Run sudo nxbt demo and provide me the console output.

You may also find a solution to the problem in the NXBT repository itself. Please, also try to follow the instructions of https://github.com/Brikwerk/nxbt.

ReZeroPlat commented 1 month ago

This is what I get

Traceback (most recent call last): File "/usr/local/bin/nxbt", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/dist-packages/nxbt/cli.py", line 325, in main demo() File "/usr/local/lib/python3.8/dist-packages/nxbt/cli.py", line 154, in demo raise OSError("Unable to detect any Bluetooth adapters.") OSError: Unable to detect any Bluetooth adapters.

Dinones commented 1 month ago

You are encountering the issue "No Available Adapters" explained in the nxbt repository (https://github.com/Brikwerk/nxbt?tab=readme-ov-file#no-available-adapters). It seems the virtual machine is not detecting your bluetooth card.

  1. Is your Bluetooth adapter appearing and checked in this menu (your adapter may have a different name)? ㅤ image

  2. Can you see the bluetooth icon at the top-left corner of the virtual machine as shown in this image? ㅤ image

  3. Run the following commands:

a. Make sure BlueZ is installed:

  sudo apt update
  sudo apt install bluez 
  sudo apt install bluez-tools

b. Check the Bluetooth service is enabled:

sudo systemctl start bluetooth
sudo systemctl enable bluetooth
sudo systemctl status bluetooth

You should see the words "active (running)" in green

c. If your Bluetooth is working, run:

bluetoothctl list
hciconfig -a

If your Bluetooth adapter is working, you should see details about it, including its MAC address and other information.

ReZeroPlat commented 1 month ago

It doesn't seem to work, the bluetooth is running but the controller gives to me the same problem. Using "sudo dmesg | grep Bluetooth" seems that the file "rtl_bt/rtl8761bu_fw.bin" is missing and idk where to find it

ReZeroPlat commented 1 month ago

ok i have found a solution:

cd /usr/lib/firmware/rtl_bt sudo ln -s rtl8761b_fw.bin rtl8761bu_fw.bin

If you are missing the original file, you can download it from a GitHub repository. For Realtek devices it would be https://github.com/Realtek-OpenSource/android_hardware_realtek/tree/rtk1395/bt/rtkbt/Firmware/BT