-
Notifications
You must be signed in to change notification settings - Fork 190
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
Been trying to get BLE communication functioning with an ESP32 and an Oculus Quest through a Unity app. #187
Comments
Could look at using an idea of #111, but I think it's a hack and more than likely not going to work long run. I think the correct way to do this is use the BLE feature/output. I was investigating this for Player LEDs and forcefeedback, but your application would need to use the HID directly, unless exposed in a standard way that is supported by host OS. Think like how the A test example has was made - #43 (comment). Maybe it's a starting point. Still not use if the Host OS would expose this. I was thinking it might be easier to get support in SDL3 or maybe Linux. |
Thanks! I tried doing a custom BLE, but although the Unity app could connect to the ESP32, it couldn't find the BLE services. May try this or making it be a keyboard. Because those are fully allowed and that likely will continue to be that way. May use the caps lock light as a way to send an on signal to the emulated keyboard. |
Is there or do you have a public copy of the Unity App? I have seen, but never used the following - https://www.hackster.io/chuartdo/ble-haptic-dual-joystick-controller-31c2c2. I think it's basic serial. |
Saw now! Thanks for the recommendation! The Unity app is the example app in the Unity package called "bluetooth-le-for-ios-tvos-and-android". Talked with that software engineer and sent some code to him that should solve that, but the code it would be put into is inside of an android plugin that isn't exposed for editing. So he has to add it if using that, although sadly he said he has been too busy to do so. |
PS: Did find a page that seemingly has a full Unity BLE solution for ESP32, but couldn't get it to function. Did try though. Maybe missed something small on the page that was necessary. Sadly the sw engineer wasn't easily contactable and there wasn't a github or similar. Main thing seemingly is the Android BLE bridge. So that is a java plugin that bridges Unity to Android BLE. If that japanese plugin would function, then could add the code from the following page to that plugin to supposedly make it function reliably on a Quest. If any here are up for getting that functioning, that would be a GREAT Unity asset to make available to the community. (including if it was low cost commercial asset, as buying a reliable solution for 5 or 10 US DOLLARS to have a reliable solution for BLE on Quest seems tolerable) |
Not use that the Oculus has BLE support - https://stackoverflow.com/questions/51320721/ble-and-bluetooth-gamepad-options-for-oculus Looks like only Bluetooth v3, but can't confirm this. I was looking and thinking maybe you don't have admin/root access? On Android I have used Best of luck |
Thanks for explaining that. There definitely doesn't seem to be admin access on the Oculus Quest. So the issue has been either because of that, or because of the Unity app's Android BLE plugin bridge (although maybe was because I wasn't emulating a gamepad with some specific gamepad ID that I don't know about and thus the permissions didn't allow it). I plan to try this and possibly making an ESP32 emulate a keyboard also though. Thanks again for posting the library! |
Testing with a BLE keyboard or mouse would be a good test. |
Yes. I was thinking maybe there is a special UUID or similar that is reserved for BLE gamepads and keyboards and that maybe the Android OS on the Quest allows those, but not other BLE services. (or something such as that) |
I might be wrong about the Oculus. Have you seen #135 (comment) |
Ah. Saw now. Maybe it's some industry standard UUID for the services or something? |
Might be something usable here |
Thanks for mentioning that. Saw that now. Don't know how I missed that comment. Excuse the delay. |
Firstly, thanks for posting this library!
Been trying to get bi-directional BLE communication functioning with an ESP32 and an Oculus Quest through a Unity app.
Tried "Bluetooth LE for iOS, tvOS and Android" and that connected, but then the Unity app running on the quest couldn't find the BLE services.
So now looking at making it appear as a gamepad with BT serial with this library. Bi-directional communication is possible with this?
Thanks in advance for answering soon, if possible!
The text was updated successfully, but these errors were encountered: