Read raw hid data natively on windows.

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
federico.massimi
Posts: 4
Joined: Mon Jan 11, 2021 2:19 am

Read raw hid data natively on windows.

Post by federico.massimi » Mon Jan 11, 2021 2:56 am

Hi, I just bought a SpaceMouse pro for integration into my custom application.
I wanted to ask if anyone had any simple example code to read HID raw data from the device. For now what I need is just a simple code that can print the raw data to the console. I found a python library that can do it, the pywinusb but I would like to do it in C/C ++ natively on windows, possibly without third party libraries. I searched on the internet and it seems that this is possible, but I haven't found complete source codes, can anyone help me?

ngomes
Moderator
Moderator
Posts: 2440
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Read raw hid data natively on windows.

Post by ngomes » Mon Jan 11, 2021 5:43 am

Hi federico.massimi,
federico.massimi wrote:
Mon Jan 11, 2021 2:56 am
I wanted to ask if anyone had any simple example code to read HID raw data from the device.
Have a word with the API Support team (contacts in the "software developer programme" web page here). They should be able to find something for you.
Nuno Gomes

starstar
Posts: 2
Joined: Sun Jan 17, 2021 12:45 am

Re: Read raw hid data natively on windows.

Post by starstar » Sun Jan 17, 2021 12:50 am

Have you found it? Can you send me a copy? Thank you

starstar
Posts: 2
Joined: Sun Jan 17, 2021 12:45 am

Re: Read raw hid data natively on windows.

Post by starstar » Sun Jan 17, 2021 12:50 am

Have you found it? Can you send me a copy? Thank you

federico.massimi
Posts: 4
Joined: Mon Jan 11, 2021 2:19 am

Re: Read raw hid data natively on windows.

Post by federico.massimi » Mon Jan 18, 2021 8:43 am

Unfortunately I have not found it, but I am very close to a code that works. When I finish I'll send you a copy of my code. Do you need it for C / C ++ or for java?

federico.massimi
Posts: 4
Joined: Mon Jan 11, 2021 2:19 am

Re: Read raw hid data natively on windows.

Post by federico.massimi » Tue Jan 19, 2021 4:29 am

SpaceMousePro_HID.zip
Space Mouse Pro HID reader
(3.42 KiB) Downloaded 35 times
I wrote this code which should help you.

federico.massimi
Posts: 4
Joined: Mon Jan 11, 2021 2:19 am

Re: Read raw hid data natively on windows.

Post by federico.massimi » Tue Jan 19, 2021 4:30 am

I wrote this code which should help you
SpaceMousePro_HID.zip
Space Mouse Pro HID reader
(3.42 KiB) Downloaded 20 times

ruevs
Posts: 1
Joined: Sun Feb 14, 2021 1:47 pm

Re: Read raw hid data natively on windows.

Post by ruevs » Sun Feb 14, 2021 2:21 pm

Just implemented what you are looking for yesterday.
https://github.com/FreeSpacenav/libspnavdev/pulls

Post Reply