Comments (10)
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)
from bthidhub.
Also: #11 (comment)
from bthidhub.
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.
from bthidhub.
ok, i'm struggling to work out how to run hid-tools or similar on Windows. Any tips?
from bthidhub.
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:
def filter_message_to_host(self, msg):
return b'\xa1\x03' + msg
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.
from bthidhub.
ok, i'm struggling to work out how to run hid-tools or similar on Windows. Any tips?
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.
from bthidhub.
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.
from bthidhub.
Good idea re: usb drive ubuntu.
from bthidhub.
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:
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: 0 | Y: 0
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.000000 8 01 00 00 00 00 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: 0 | Y: -3
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.159625 8 01 00 00 d0 ff 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: 0 | Y: -1
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.163695 8 01 00 00 f0 ff 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: 0 | Y: -2
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.175529 8 01 00 00 e0 ff 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: 0 | Y: -4
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.179489 8 01 00 00 c0 ff 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: -2 | Y: -9
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.191567 8 01 00 fe 7f ff 00 00 00
# ReportID: 1 / Button: 0 0 0 0 0 | # | X: -6 | Y: -12
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.195507 8 01 00 fa 4f ff 00 00 00
Via bthidhub:
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: 256 | Y: 256
# | Wheel: 0 | AC Pan: 0 | 0x10168: 0
E: 000000.000000 9 01 01 00 01 10 00 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: 0 | Y: -256
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.028618 9 01 01 00 00 f0 ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: -1536 | Y: 2047
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.079712 9 01 01 00 fa 7f ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: -256 | Y: -257
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.109602 9 01 01 00 ff ef ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: -512 | Y: -769
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.149613 9 01 01 00 fe cf ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: -256 | Y: -257
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.201166 9 01 01 00 ff ef ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: -256 | Y: -257
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.231032 9 01 01 00 ff ef ff 00 00 00
# ReportID: 1 / Button: 1 0 0 0 0 | # | X: 0 | Y: -256
# | Wheel: -1 | AC Pan: 0 | 0x10168: 0
E: 000001.268584 9 01 01 00 00 f0 ff 00 00 00
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?
from bthidhub.
So, I see in the first one:
E: 000000.163695 8 01 00 00 f0 ff 00 00 00
And, in the second one:
E: 000001.028618 9 01 01 00 00 f0 ff 00 00 00
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.
from bthidhub.
Related Issues (20)
- Change Keyboard Layout HOT 3
- Integration with Bluetooth Midi ?
- Ipad HOT 2
- Installing bthidhub alongside pihole HOT 1
- No web interface after installation
- Installation procedure HOT 1
- Having trouble making it work HOT 2
- Is there a way to manipulate this to just send a keycode over bluetooth? HOT 2
- Looks like it's working but nothing is working. HOT 2
- Game controllers please reply
- Followed the instructions, I cannot connect via web interface HOT 3
- packages/pip + py import error HOT 4
- USB connection between Rasp Pi and Host? HOT 2
- Caps lock triggers Num lock in CM Storm Quickfire TK
- Cannot Control LED - Causes Crash HOT 5
- Does not working with keyboard with trackpad HOT 7
- Installation Instructions - Helpful Clarification (Adjust SH && BAT for Windows if any username change is made to defaults on Pi) HOT 2
- cant install, last code mypyc unknown command HOT 3
- What is the web page or port to access configuration? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bthidhub.