sim1222 / haritorax-slimevr-bridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GX6 Adapter Question

foxboxpdx opened this issue · comments

Hiya,

I'm currently working on a fork to add support for the GX6 multi-bt adapter, and had a question for the maintainers here. It appears that currently the most popular Rust USB crate is 'rusb', which has been pretty decent to work with so far; however, I've hit a bit of a snag right at the start concerning drivers - the default driver Windows installs for the GX6 is not fully compatible with the LibUSB backend that rusb (or any Rust usb crate) uses, and in order to talk to the device at all, I had to install the WinUSB driver (via Zadig).

My question is this: Is it worth continuing to pursue adding this functionality, taking into consideration the experience levels of the end-users? Or do you intend for this project to target end-users with enough technical know-how to be able to install those drivers? It seems like anyone capable of installing the Rust toolchain and clone a Git repository should be capable of replacing USB drivers, but I wanted to get your opinion on it before continuing.

Thanks!

Sorry.
We don't have and don't use the GX6 adapter.
Currently, we use the normal Bluetooth adapter simply.
This software expects that visibily as a pairable Bluetooth Serial device.

I understand. I recently picked up the GX6 so I could help contribute to this project, by figuring out how to read from it in Rust. It requires specific drivers to work with, and I wanted to make sure it would be okay to expect users to install those drivers if they want to use it.

I haven't had time to work on it much yet, but I hope to have some rough code to test soon. There is another project on GitHub that reads from the GX6 using Python, and it uses the same math code as this one; with any luck, it will work the same in Rust.

Hey, person who made that Python (and Node.js) GX dongle interpreter here, yeah it should work the same in Rust. The GX2 also works exactly the same as GX6 with just one COM port being used so you wouldn't need to do much more to add support for that aswell.

Nice, thanks for the heads up. I was really barking up the wrong tree until I read through your notes (why the heck was I trying to read raw usb instead of the serial port? Ugh.)

I currently have a very rough bit of code that searches the USB bus for devices matching the GX dongle VID/PID (and assuming the GX2 is the same vid/pid as the GX6, just that in the latter case there are three of them). I'm doing my initial dev work on a Mac, so the actual serial device names are "/dev/tty.usbmodemXXXXXXX" where the Xs are the USB Device's serial number. I'm able to send the resulting data to the decode_imu_packet function and get what I'm looking for.

Just need to integrate all this into the existing code and work out a reliable way to pick up the COM ports in Windows.

I should probably be searching for the VID/PID devices instead of having the user specify the COM ports the dongles are using heh, I'll look into that

Let me know how it goes!