On Mon, May 10, 2021 at 11:26 PM Jonas Malaco via pyusb-users <pyusb-users@lists.sourceforge.net> wrote: > > On Mon, May 10, 2021 at 02:45:56PM +0100, Bruno Rocha wrote: > > Hello, > > > > I'm developping a solution that needs to read raw data from 3DConnexion > > SpaceMouse Wireless and then send it via sockets to another application. I > > was able to do it with the SpaceMouse cabled but I've been unable to do it > > via the wireless receiver. > > > > I seeked help on 3D Connexion forums but everything I managed to get was > > the following info: > > > > The Universal Receiver (UR) can pair up to five wireless devices, each on a > > separate USB interface. Within each interface, you will find a set of > > top-level collections (as per the HID specification; these are also known > > as "application collections"). There's one top-level collection if the > > interface has no pairing, two if the pairing is for a SpaceMouse and three > > for a CadMouse type. You're interested in the second case. The two > > top-level collections (all in the "generic" desktop usage page) consist of > > a "multi-axis controller" usage collection (ID 0x08) and a "vendor-defined" > > collection. You want to use the former. > > > > Meanwhile, I've managed to read the data with pywinusb. Pywinusb detects > > 6/7 devices and one (only one) of them is able to read the data. But I > > would like to do it with pyusb as I'd also want to be linux supported. Any > > help will be very appreciated, thank you` > > Since those are HIDs, and apparently also (at least partially) compliant > with that spec, I suggest that you take a look at hidapi before trying > to recreate it with PyUSB. > > https://github.com/libusb/hidapi/ > https://github.com/trezor/cython-hidapi
There is an existing project already. It should work under Windows and Linux. https://github.com/smartavionics/RawMouse It already uses cython-hidapi. It may have some issues with MacOS now. https://github.com/libusb/hidapi/issues/212 -- Xiaofan _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users