Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth class isn't changed properly #20

Closed
JuanPotato opened this issue Apr 11, 2020 · 8 comments · Fixed by #21
Closed

Bluetooth class isn't changed properly #20

JuanPotato opened this issue Apr 11, 2020 · 8 comments · Fixed by #21

Comments

@JuanPotato
Copy link
Contributor

JuanPotato commented Apr 11, 2020

At first joycontrol wouldnt work on my laptop (running an xps 13 9370) so I tried to figure out what was wrong. My phone showed a "pro controller" but with a laptop icon so I checked the class with hciconfig and it was set to 0x0c010c for Laptop. I changed it to 0x002508 for Gamepad, ran joycontrol, but joycontrol seemed to revert it back to Laptop. I ran joycontrol and changed the class while it was running which worked. The switch connected and I was able to send inputs.

@mart1nro
Copy link
Owner

mart1nro commented Apr 11, 2020

Interesting... It seems like the device class is reset when registering the SDP record. The Switch still connects fine for me though.

I created a pull request where I set the device class after registering the SDP record. Please check if that works for you.

@JuanPotato
Copy link
Contributor Author

I don't think this is needed since it was working in the end after enabling pairing

@Ruoruo-0v0
Copy link

@JuanPotato Sorry I think I might have a similar problem:

sudo python3 ./run_controller_cli.py PRO_CONTROLLER
[13:29:29] joycontrol.device set_name::69 INFO - setting device name to Pro Controller...
[13:29:29] joycontrol.device set_class::61 INFO - setting device class to 0x002508...
[13:29:29] joycontrol.utils run_system_command::75 DEBUG - ['hciconfig hci0 class 0x002508' exited with 0]
[13:29:29] joycontrol.server create_hid_server::84 INFO - Advertising the Bluetooth SDP record...
[13:29:29] joycontrol.server create_hid_server::94 INFO - Waiting for Switch to connect... Please open the "Change Grip/Order" menu.

Is this due to the same issue? How do I change the bluetooth class while it was running? Thanks!

@MasonLaney
Copy link

@Ruoruo-0v0 I had the same issue and think I just got it working. I used sudo hciconfig hciX class 0x002508 and then ran joycontrol and it worked. Running joycontrol reset it though so I had to run the command first each time I wanted to start joycontrol.

@JaredEzz
Copy link

Changing the default class to 0x002508 in /etc/bluetooth/main.conf seems to be necessary to connect after the 12.0.0 update

@l0nkDev
Copy link

l0nkDev commented Apr 28, 2021

Changing the default class to 0x002508 in /etc/bluetooth/main.conf seems to be necessary to connect after the 12.0.0 update

How do you do that exactly

@nfp0
Copy link

nfp0 commented Dec 4, 2023

I'm also affected by this problem where joycontrol does not seem to set the 0x002508 class value correctly.

@nfp0
Copy link

nfp0 commented Dec 4, 2023

@l0nkDev I think it's the Class setting in that file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants