Hello there,
I am having trouble finding concrete information on this subject.
I have a project in which I need to support a 3rd party software that communicates with my device over the serial port. The trouble is that I also need to communicate with my device at the same time. I thought that using raw HID would be the best solution so I am thinking of this:
The device is to act as a joystick while receiving data over serial and performing other data exchange through what I imagine to be Raw HID.
I've been trying to get this working on an Arduino Leonardo but I'm having a very hard time understanding the structure of the HID report descriptors and how to add Raw HID support on top of the joystick functionality.
When I try to add this functionality I either cause the input from the HID joystick to stop being registered in Windows or I break the ability of hidapi (https://github.com/signal11/hidapi) to send data to the device. It either returns "there is a device connected to this system that is not functioning" or "incorrect function". This leads me to believe that having Raw HID, Serial and a Joystick at the same time is simply not supported at the OS level but I'm not sure if that's case or if I'm messing something up. I can't find any code samples that do that. I'm assuming because it's so specific.
I wanted to buy a Teensy because of the availability of Teensyduino. Primarily, I saw that it supports several configurations:
Essentially what I would need is Raw HID + Serial + Joystick.
[1]Is that something that is even possible?
That's my primary question, but for further elaboration:
I have considered that alternatively I could just use the Dual Serial option and in that case I guess my question would be "[2]Is Dual Serial + Joystick possible?" but opening the USB through the VID/PID/SERIAL# and talking that way seems like a much cleaner solution to me than opening every serial port on the system and trying to do a handshake with each one.
I haven't been able to get Raw HID working on the Leonardo because I can't find any info on how to use USB_Send/Recv and NicoHood's HID-Project appears to have a broken RawHID implementation in which sending data back the PC doesn't work for some reason I can't get it to work or find much info on why it could possibly not work.
I am having trouble finding concrete information on this subject.
I have a project in which I need to support a 3rd party software that communicates with my device over the serial port. The trouble is that I also need to communicate with my device at the same time. I thought that using raw HID would be the best solution so I am thinking of this:
- Two-way raw HID for some data exchange from our software.
- Serial port to receive input from the 3rd party software.
- HID Joystick device for the OS to interpret.
The device is to act as a joystick while receiving data over serial and performing other data exchange through what I imagine to be Raw HID.
I've been trying to get this working on an Arduino Leonardo but I'm having a very hard time understanding the structure of the HID report descriptors and how to add Raw HID support on top of the joystick functionality.
When I try to add this functionality I either cause the input from the HID joystick to stop being registered in Windows or I break the ability of hidapi (https://github.com/signal11/hidapi) to send data to the device. It either returns "there is a device connected to this system that is not functioning" or "incorrect function". This leads me to believe that having Raw HID, Serial and a Joystick at the same time is simply not supported at the OS level but I'm not sure if that's case or if I'm messing something up. I can't find any code samples that do that. I'm assuming because it's so specific.
I wanted to buy a Teensy because of the availability of Teensyduino. Primarily, I saw that it supports several configurations:
Essentially what I would need is Raw HID + Serial + Joystick.
[1]Is that something that is even possible?
That's my primary question, but for further elaboration:
I have considered that alternatively I could just use the Dual Serial option and in that case I guess my question would be "[2]Is Dual Serial + Joystick possible?" but opening the USB through the VID/PID/SERIAL# and talking that way seems like a much cleaner solution to me than opening every serial port on the system and trying to do a handshake with each one.
I haven't been able to get Raw HID working on the Leonardo because I can't find any info on how to use USB_Send/Recv and NicoHood's HID-Project appears to have a broken RawHID implementation in which sending data back the PC doesn't work for some reason I can't get it to work or find much info on why it could possibly not work.