Code Monkey home page Code Monkey logo

Comments (7)

Dreamsorcerer avatar Dreamsorcerer commented on June 6, 2024

If it's listed as paired host, and you're connected to the laptop, then there should definitely be something in hid-recorder on the host. Admittedly, I've only tried on a Linux machine myself. This suggests that the host will not receive anything from the hub (or maybe you just forgot to connect the hub in BT settings?)...

The 2 things we are working with is the big long number in sdp_record.xml and the corresponding number after R: in the hid-tools output. Basically, you need to copy the latter number (removing the spaces and ignoring the first number, so starting from 0501) into the number in sdp_record.xml.
I really need to see the hid-tools output to figure out where (and I have 0 paired hosts to test it myself right now...). But, the output would show what part is currently mapped to a mouse (it would be somewhat similar to your other output, so we'd probably be looking a section starting with 0902). That section of the number would be removed and replaced with the other one.

As your device already has multiple report IDs, you'd also need an additional change to the mouse filter code. I think your filter code would just end up as a single line:
return b'\xa1' + msg

Hopefully, if @ruundii comes back around to fix up some things, then we can look at making this whole process completely automatic (#23).

from bthidhub.

Dreamsorcerer avatar Dreamsorcerer commented on June 6, 2024

If I were to take a guess from the info above, I'd say remove:
05010902a1010901a100850305091901290815002501950875018102950081030600ff0940950275081581257f8102050109381581257f750895018106093009311601f826ff07750c95028106c0
And at exactly the same place, add:
05010902a10185020509190129021500250195027501810295017506810305010901a1001581257f09300931750895028106c00506092085471500256475089501b1a20602ff09558555150026ff0075089540b1a2851315002501750195010601ff090a81020601ff090c8122750195068101c0

from bthidhub.

Dreamsorcerer avatar Dreamsorcerer commented on June 6, 2024

If that doesn't work, it'll be pretty much impossible to debug without comparing hid-tools output on the host..

from bthidhub.

robgmills avatar robgmills commented on June 6, 2024

Thank you for your response! You've given me some direction to dig in and debug further.

It seems like macOS treats HID devices a bit differently than hid-tools expects. I'll try to find the Report ID for the track pad on my macOS host a different way.

I'll attempt to update the sdp_record.xml as you suggested and will report back.

from bthidhub.

robgmills avatar robgmills commented on June 6, 2024

I tried replacing the string recommended. While it didn't exactly work, I'm now seeing Bluetooth packets that resemble the track pad events on the macOS host:

Screen Shot 2021-08-02 at 9 19 02 PM

I hadn't previously seen these packets until I changed the string in the sdp_record.xml and restarted my Pi. I'm capturing these packets on the macOS host using the PacketLogger.app found in Additional Tools for XCode.

Here's an example of me pressing Command + Tab on the keyboard paired with the hub and captured on the macOS host:

Screen Shot 2021-08-02 at 9 25 14 PM

The image above shows four packets that represent, in order:

  1. Pressing Command
  2. Pressing Tab
  3. Releasing Tab
  4. Releasing Command

And here's the first captured packet from me scrolling on the track pad:

Screen Shot 2021-08-02 at 9 26 12 PM

I'm still not sure why the keyboard works but the track pad doesn't but this is promising! Tomorrow I'll try to capture the packets when the connection is made between the hub and host. I hope this will tell something about how macOS is registering the Bluetooth device.

Thank you again for pointing me in a direction!

from bthidhub.

robgmills avatar robgmills commented on June 6, 2024

Last update for the day:

I changed the Report Filter for the track pad from Mouse to Default. That resulted in the captured packets appearing like so:

Screen Shot 2021-08-02 at 9 41 47 PM

The three red/brown/orange(?) packets are from when I attempted to three-finger scroll. The rest of the packets appear to be recognized as a different type of packet that matches the working keyboard packets. Unfortunately, the keyboard does not work anymore.

from bthidhub.

Dreamsorcerer avatar Dreamsorcerer commented on June 6, 2024

Yes, stick to the modified Mouse filter. When you run hid-recorder on the Pi, it will show events from the mouse. Do the events look similar to the ones you are sniffing on the host? If so, compare some events (like a mouse click) and check exactly what the differences are.

from bthidhub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.