You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was relatively easy to make, only gotcha was that using the zero-hid package was not straightforward, if I tried to use the "official" Python package it cratered the framerate from 70 -> 40fps, but I found out I can just write to the HID device like this:
@Ciantic Hey Jari, sorry I missed this before. This is really cool! Thanks for doing it. 🐁
I googled it long ago, and people swore up and down that using the Raspberry Pi as a USB gadget was impossible unless you specifically got the Raspberry Pi Zero hardware.
A couple of questions. First, how does it work? Again, everyone said it was impossible when I googled it.
But second, what if I close the lid of my laptop and it goes to sleep? Does that shut off the Raspberry Pi? Seems like that would be inconvenient (just thinking out loud). It takes minutes for the Raspberry Pi to boot up. I've also had multiple Raspberry Pi's brick out when I unplugged them suddenly, unfortunately.
I do wish there was a way to take my monstrosity -- held together with masking tape and rubber bands -- that needs an Ethernet cable or Wi-Fi connection, and turn it into into a little portable USB gadget.
Do you have further ideas how this could be done with much smaller and cheaper hardware that boots up in seconds over USB? I chose the Raspberry Pi because it has an infrared camera with a high enough frame rate for my liking.
I've been trying to reverse engineer the NaturalPoint TrackIR hardware. It requires a Windows DLL to run, plus their proprietary libraries in C/C++. I was thinking if I could reverse engineer it, then the TrackIR would essentially be the best hardware.
First, thank you both, great idea, great work! Thank you!
I just had a small problem with getting a camera to work, as Python could not access it. So I did: sudo apt install python3-libcamera python3-picamera2 This installed some 156MB of packages and now Python sees the camera.
Finally, could this (HID version) be modified to run on a host machine, using a modified USB camera and some IR LEDs? Most USB cams have LED, and it can be swapped with IR LED.
Some laptops and computers can be set to keep power on one USB, while the lid is down. Also, I guess we can use a USB-C dongle for powering both the laptop and this device?
Welcome @HRmeteohub 👋 Always fun to see others explore our pet projects!
tl;dr If you want to use a regular webcam on your laptop, you should really just use: https://smylemouse.com
I went through all the trouble with the Raspberry Pi specifically because I wanted very high frame rate and very high accuracy with very low latency. The truth is 99% of "normal" webcams are low frame rate and high latency. I haven't found a webcam that comes anywhere near the Raspberry Pi camera in terms of quality and speed.
But absolutely, yes. The answer to your question is you could indeed run it locally with any camera. (with minor changes like swapping python3-picamera2 for something else)
I've been trying to reverse engineer the NaturalPoint TrackIR hardware. It requires a Windows DLL to run, plus their proprietary libraries in C/C++. I was thinking if I could reverse engineer it, then the TrackIR would essentially be the best hardware.
@stedwick How is this going btw? Or does the TrackIR SDK make this unnecessary.
I’m about to pull the trigger on an IR tracker (or Tobii) for RSI reasons and was curious which one I should go for. You seem to be the SME that’s tried most all of them and you’ve even built a quality one from scratch. I’m looking for max precision and min latency over multiple monitors. It would be great if it works right out of the box so I can get it up a running quickly, but I also know I’ll eventually want full control of the telemetry so can throw Claude at it to handle custom behaviors and use cases.
I gave up on the TrackIR a year or two ago. With AI these days, I bet Claude or Codex might be able to reverse engineer it better than I was able to. It's on my list to get back to eventually because it would be nice to have such readily available hardware. Just haven't done it yet.
If you're on Windows, you don't need to reverse-engineer it, though; you can just use the TrackIR SDK. You'd have to build your own app, though. The reason I can't do that is I'm on Mac and Linux.
Shameless plug: my PhilNav is still the best on Mac/Windows/Linux if you're looking for "max precision and min latency": https://philipb.gumroad.com/l/philnav
Sweet! What a coincidence. I just picked up a TrackIR and was dabbling with the SDK and a custom app. So far, I’m not a fan of the SDK, hat clip or needing to have the TrackIR app running. Unless you were already planning on doing it, I might have Claude Code attempt a full port of your MacOS version to Windows.
@je-miller Go for it, man! Just put it into the ./win directory. The C library I wrote should be cross-platform. So C communicates with the TrackIR, and I used SwiftUI on Mac. I assume you'll use WinUI with XAML or whatever in Visual Studio. Send me a PR if it works 🌱
@stedwick
Oh yeah, this is way more precise and smoother than my 1st attempt I had working with the TrackIR SDK and the hat clip. Plus, it works across multiple monitors.
For my second attempt, a couple weeks ago I had Opus one shot a port to Windows and it came up with a C# MVP with the same Zadig workaround and a hideous WinForms UI. Surprisingly the core functionality worked really well. I wasn’t thrilled with the Zadig option, and did some research for alternative options. Your WINDOWS_ZADIG_FREE_INSTALL_PLAN.md indicates you have the exact same ideas in mind. Then I got busy with work and forgot about it. Pushed it here je-miller/OpenTrackIR at windows-port just to keep an archive but have since switched over to your latest version.
@je-miller that's great. Yeah, when the mouse override and absolute cursor positioning are in a good spot, I'll merge that into my repo as well. Here's the draft PR: stedwick/OpenTrackIR#1 just let me know when it's ready!
Let's pick up the conversation over there, and feel free to open more PRs as you add new features in the future.
Activity
stedwick commentedon Sep 21, 2025
@Ciantic Hey Jari, sorry I missed this before. This is really cool! Thanks for doing it. 🐁
I googled it long ago, and people swore up and down that using the Raspberry Pi as a USB gadget was impossible unless you specifically got the Raspberry Pi Zero hardware.
A couple of questions. First, how does it work? Again, everyone said it was impossible when I googled it.
But second, what if I close the lid of my laptop and it goes to sleep? Does that shut off the Raspberry Pi? Seems like that would be inconvenient (just thinking out loud). It takes minutes for the Raspberry Pi to boot up. I've also had multiple Raspberry Pi's brick out when I unplugged them suddenly, unfortunately.
I do wish there was a way to take my monstrosity -- held together with masking tape and rubber bands -- that needs an Ethernet cable or Wi-Fi connection, and turn it into into a little portable USB gadget.
Do you have further ideas how this could be done with much smaller and cheaper hardware that boots up in seconds over USB? I chose the Raspberry Pi because it has an infrared camera with a high enough frame rate for my liking.
OOOOoooooo @Ciantic one more thing, check out this other repository: https://github.com/stedwick/TrackIR-Python
I've been trying to reverse engineer the NaturalPoint TrackIR hardware. It requires a Windows DLL to run, plus their proprietary libraries in C/C++. I was thinking if I could reverse engineer it, then the TrackIR would essentially be the best hardware.
HRmeteohub commentedon Feb 14, 2026
First, thank you both, great idea, great work! Thank you!
I just had a small problem with getting a camera to work, as Python could not access it. So I did:
sudo apt install python3-libcamera python3-picamera2This installed some 156MB of packages and now Python sees the camera.Finally, could this (HID version) be modified to run on a host machine, using a modified USB camera and some IR LEDs? Most USB cams have LED, and it can be swapped with IR LED.
Some laptops and computers can be set to keep power on one USB, while the lid is down. Also, I guess we can use a USB-C dongle for powering both the laptop and this device?
stedwick commentedon Feb 14, 2026
Welcome @HRmeteohub 👋 Always fun to see others explore our pet projects!
tl;dr If you want to use a regular webcam on your laptop, you should really just use: https://smylemouse.com
I went through all the trouble with the Raspberry Pi specifically because I wanted very high frame rate and very high accuracy with very low latency. The truth is 99% of "normal" webcams are low frame rate and high latency. I haven't found a webcam that comes anywhere near the Raspberry Pi camera in terms of quality and speed.
But absolutely, yes. The answer to your question is you could indeed run it locally with any camera. (with minor changes like swapping python3-picamera2 for something else)
je-miller commentedon Feb 26, 2026
@stedwick How is this going btw? Or does the TrackIR SDK make this unnecessary.
I’m about to pull the trigger on an IR tracker (or Tobii) for RSI reasons and was curious which one I should go for. You seem to be the SME that’s tried most all of them and you’ve even built a quality one from scratch. I’m looking for max precision and min latency over multiple monitors. It would be great if it works right out of the box so I can get it up a running quickly, but I also know I’ll eventually want full control of the telemetry so can throw Claude at it to handle custom behaviors and use cases.
stedwick commentedon Mar 3, 2026
Hi Jeff! 👋 @je-miller
I gave up on the TrackIR a year or two ago. With AI these days, I bet Claude or Codex might be able to reverse engineer it better than I was able to. It's on my list to get back to eventually because it would be nice to have such readily available hardware. Just haven't done it yet.
If you're on Windows, you don't need to reverse-engineer it, though; you can just use the TrackIR SDK. You'd have to build your own app, though. The reason I can't do that is I'm on Mac and Linux.
Shameless plug: my PhilNav is still the best on Mac/Windows/Linux if you're looking for "max precision and min latency": https://philipb.gumroad.com/l/philnav
stedwick commentedon Mar 22, 2026
@Ciantic @je-miller @HRmeteohub FYI, I have successfully reverse engineered the TrackIR to work on macOS with no proprietary drivers or sdk: https://github.com/stedwick/OpenTrackIR 🐁🖱️🤗
je-miller commentedon Mar 23, 2026
Sweet! What a coincidence. I just picked up a TrackIR and was dabbling with the SDK and a custom app. So far, I’m not a fan of the SDK, hat clip or needing to have the TrackIR app running. Unless you were already planning on doing it, I might have Claude Code attempt a full port of your MacOS version to Windows.
stedwick commentedon Mar 23, 2026
@je-miller Go for it, man! Just put it into the ./win directory. The C library I wrote should be cross-platform. So C communicates with the TrackIR, and I used SwiftUI on Mac. I assume you'll use WinUI with XAML or whatever in Visual Studio. Send me a PR if it works 🌱
stedwick commentedon Mar 29, 2026
@je-miller FYI, I'm working on a Windows 11 port: https://github.com/stedwick/OpenTrackIR?tab=readme-ov-file#windows-11-download-app
je-miller commentedon Apr 4, 2026
@stedwick
Oh yeah, this is way more precise and smoother than my 1st attempt I had working with the TrackIR SDK and the hat clip. Plus, it works across multiple monitors.
For my second attempt, a couple weeks ago I had Opus one shot a port to Windows and it came up with a C# MVP with the same Zadig workaround and a hideous WinForms UI. Surprisingly the core functionality worked really well. I wasn’t thrilled with the Zadig option, and did some research for alternative options. Your WINDOWS_ZADIG_FREE_INSTALL_PLAN.md indicates you have the exact same ideas in mind. Then I got busy with work and forgot about it. Pushed it here je-miller/OpenTrackIR at windows-port just to keep an archive but have since switched over to your latest version.
I pushed a couple of new features to my fork that you may be interested in. je-miller/OpenTrackIR at new-features
Let me know if you want to pick this up on another thread.
stedwick commentedon Apr 8, 2026
@je-miller that's great. Yeah, when the mouse override and absolute cursor positioning are in a good spot, I'll merge that into my repo as well. Here's the draft PR: stedwick/OpenTrackIR#1 just let me know when it's ready!
Let's pick up the conversation over there, and feel free to open more PRs as you add new features in the future.