Hello i want to ask is the raw reading of space mouse wireless possible ? I want read space mouse wireless from USB HID in Android, is this possible without API or SDK just with datasheet ?
Thanks for any reply.
Raw reading Space Mouse Wireless
Moderator: Moderators
Re: Raw reading Space Mouse Wireless
Yes, it is possible. The firmware device descriptors describe how it works. The number of axes, range, buttons. Everything you need is delivered by the firmware of USB devices.
You give up a lot of functionality by not using our driver. This is mostly, though, to support MCAD apps.
You give up a lot of functionality by not using our driver. This is mostly, though, to support MCAD apps.
Re: Raw reading Space Mouse Wireless
Thanks for reply. I read space mouse in raw format, it sends 12 (maybe 13 i don't remember) bytes. What does these bytes mean ? How can i get datasheet or data format information for these ?
Re: Raw reading Space Mouse Wireless
The device descriptor should tell you what the number format is, but, true, it doesn't tell you what the axes mean.
This snippet show how to extract the Tx, Ty, Tz, Rx, Ry, Rz axes from a recent device:
This snippet show how to extract the Tx, Ty, Tz, Rx, Ry, Rz axes from a recent device:
Code: Select all
Tx = (((short)pRpt[2]) << 8) | (unsigned char)pRpt[1]; // pan left right (MouseX)
Ty = (((short)pRpt[4]) << 8) | (unsigned char)pRpt[3]; // pan to and fro (MouseY)
Tz = (((short)pRpt[6]) << 8) | (unsigned char)pRpt[5]; // pan up toward ceiling / down toward desk
Rx = (((short)pRpt[8]) << 8) | (unsigned char)pRpt[7]; // Rotate like a motorcycle throttle
Ry = (((short)pRpt[10]) << 8) | (unsigned char)pRpt[9]; // Rotate like a door knob
Rz = (((short)pRpt[12]) << 8) | (unsigned char)pRpt[11]; // Rotate like opening a jar of peanut butter
Re: Raw reading Space Mouse Wireless
I believe we have a libusb sample that shows how to decode the raw data.
If you're interested, send a note to the API Support team. The contact details can be found here (registration is required).
If you're interested, send a note to the API Support team. The contact details can be found here (registration is required).
Nuno Gomes
Re: Raw reading Space Mouse Wireless
Thanks for reply