-
Notifications
You must be signed in to change notification settings - Fork 276
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
Switch cant find the emulated controller when using vmware #11
Comments
Make sure the bluetooth adapter was set up correctly. The 'hciconfig hci0 name "Pro Controller"' command in the output changes the device name. Can you check if the device name was actually changed? |
I used the bluetooth signal scanning software lightblue on the iphone to monitor the correct Bluetooth signal. It looks like joycontrol has not successfully created or modified the Bluetooth device name. |
Is it possible to use your code directly under macos? Though many libs were incompatible when I tried last time. |
The code relies on the linux bluetooth implementation bluez to set up the adapter and advertise the service record. Also a few linux system commands are used. Those need to be ported. |
Does bluetooth work generally in the VM? You could try to set the device name manually. |
The device name has to be Pro Controller? |
Yes |
I've run into the exact same issue.
So it seems like VM approach would be hard (not sure about other virtualization engines). I also spent around a day trying to create a OSX Bluetooth HID server with no luck. This is primarily due to macOS uses IOBluetooth which is entirely different from bluez system. If anyone knows how to create a HID server on Mac, that would be a great beginning step for porting this code to Mac. |
@thisiscam |
@inksong my take is that this will also be hard. An emulator is just another virtualization engine. The current problem seems to be that macOS uses its own Bluetooth API that there isn't many existing libraries to work with. So it will be unlikely that an Android emulator will be able to get around this issue. I could be wrong tho. My current solution is to use a Ubuntu machine and that is working for me now. |
Due to the failure to quickly set up the environment under macos, I installed ubuntu 18.04 in the vmware fusion in my macbook macOS 10.15.3 (19D76) and installed the relevant dependencies.
run_test_controller_buttons.py appears to run successfully, with the following output:
[02:18:34] asyncio init::54 DEBUG - Using selector: EpollSelector
[02:18:34] joycontrol.server create_hid_server::31 INFO - Restarting bluetooth service...
[02:18:34] joycontrol.utils run_system_command::23 DEBUG - ['systemctl restart bluetooth.service' exited with 0]
[02:18:35] joycontrol.device set_name::38 INFO - setting device name to Pro Controller...
[02:18:35] joycontrol.utils run_system_command::23 DEBUG - ['hciconfig hci0 name "Pro Controller"' exited with 0]
[02:18:35] joycontrol.device set_class::34 INFO - setting device class to 0x002508...
[02:18:35] joycontrol.utils run_system_command::23 DEBUG - ['hciconfig hci0 class 0x002508' exited with 0]
[02:18:35] joycontrol.server create_hid_server::52 INFO - Advertising the Bluetooth SDP record...
Ubuntu shares Bluetooth with the macbook, but "Pro Controller" is not found on the switch. Is there anything wrong with my setup?
I look forward to running this program under macOS, and I am willing to help.
I just want to automate fishing in animal crossing new horizons.
THX.
The text was updated successfully, but these errors were encountered: