-
Notifications
You must be signed in to change notification settings - Fork 50
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
How to write a filter for a Kensington Orbit trackball #45
Comments
You don't need to figure out those details, actually. And the existing mouse filter is not actually a general filter, it fails with most devices I've personally used. Can you try out the process of updating the sdp_record.xml as described at: #31 (comment) |
Also: #11 (comment) |
Thanks @Dreamsorcerer ! So per your suggestion , I swapped the big long hex number in sdp_record.xml to the one in the report description for my trackball. I think I only have one report id and so I assume there's nothing else to change? (btw, i only want to use a mouse; no keyboard necessary). The result feels somewhat like progress in that x/y movement is sort of coming through to the host if I use "default" filter, but the moment jumps around all over the place. It's definitely not usable . So next I will try to get hid-tools running on the host (Windows) as well and if I succeed i'll post the two outputs here. But, if the SDP record is the same and bthidhub is just forwarding the data through to the host, i don't understand where the problem could be. |
ok, i'm struggling to work out how to run hid-tools or similar on Windows. Any tips? |
I've just realised that @ruundii changed the mouse filter code. So my other comment about the mouse filter should be to change the filter code to just:
But, sdp_record.xml was also changed, so not sure if there are other changes needed. I still don't have anything running to retest with the new code. |
No. I don't use Windows and am only familiar with hid-tools in so far as I have run it to see the output from my own devices. Sorry. |
Download an Ubuntu disk and just boot Ubuntu off a USB drive? You can just test it from there without installing anything on your machine. |
Good idea re: usb drive ubuntu. |
Per @Dreamsorcerer 's excellent suggestion i ran hid-tools from an Ubuntu USB drive. The difference between the HID events from the mouse directly versus via bthidhub is somewhat illuminating. Direct:
Via bthidhub:
Now i'm no computer scientist, but via bthidhub the x and y coordinates seem to be multiples of 256, which I think must mean that the x and y bytes are 8-bits out of alignment . So how do I fix that? |
So, I see in the first one: Appears there is an extra 0x01 being added. Have you updated the mouse filter code as I mentioned? Maybe try printing out the msg going through that function to confirm exactly what is happening. |
This is a great project . I have been looking for something like this for ages.
But it looks like my mouse sends data in a funny format which doesn't fit the standard mouse filter. The output from hid-tools says:
I thought i could maybe make an appropriate filter by adjusting the mx510 filter.
My interpretation of the hid-tools output is that we have
5bits for buttons + 3 bits padding
12 bits for x (-+2047)
12 bits for y (-+2047)
8 bits for wheel (-+127)
8 bits for ac pan (-+127)
8 bits for Vendor Usage 0x168 (-+127)
am I right?
if so, how do I turn that into a filter?
any help would be appreciated
The text was updated successfully, but these errors were encountered: