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
Joystick app #349
Comments
Hmm. That's a hard one. We could do something like:
Then we could make the type of HID device optional - and apps and then easily check if it's set to the right one? Otherwise I guess we could store the actual descriptor in settings if it's non-standard, which could be more flexible... |
After some more testing I would actually prefer option #1, since the Bluetooth hosts does not always seem to react well to the descriptor change: Sometimes I had to to restart the host for the new service to get recognized. Also extending the descriptor should not be a problem to the two exiting profiles. Obviously it hardly scales with every new Bluetooth app..The next person wants to add a mouse descriptor...
Flexible yes, but I think harder to manage. We would need some kind of interface for the user to select which services he wants out of (keyboard, multimedia, joystick) and build the descriptor accordingly. |
Ok then, sounds like a plan. Do you have the descriptor that you'd like me to add? |
Sure, this one:
So the complete descriptor becomes in base64: |
Not sure if the base64 is right... the length of that is 179, but the array above it is only 52? I'll stick the actual array contents in |
Thats the complete base64 descriptor including the other two keyboard and multimedia. |
Ahh, wow. I was thinking we'd just make it change to be just a Joystick? I just pushed some changes in 517c35a that should make this work nicely for you (I hope!) |
One minor change please. if it is "just a joystick" please exclude the report id in the hid descriptor. The text in hid_info.txt already has it excluded, but not the base64 in boot0.js, it should become:
Keyboard works fine with the unpatched Linux/bluez, but you should be aware that on Linux I had to restart bluetoothd everytime I switched the HID setting. On Android I had to disable and enable bluetooth. This might produce a lot "it does not work" bug reports because of the required bt restart on the host. This is the full test matrix:
|
That's odd - I generated the base64 right from it - but sure, I'll stick the new one in. Thanks for doing that testing. Honestly I find myself restarting bluetoothd pretty often on Linux anyway, so I don't think this is really anything new :) |
Looks good, I'm closing this ticket, thank you. |
Hi,
I'm currently working on a simple Joystick App using the accelerometer as stick input, but it does need an extra hid descriptor. If you are interested in adding the app there are basically two options:
Any preference?
The text was updated successfully, but these errors were encountered: