LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trying to work with libusb-gadget and HID emulation (https://www.linuxquestions.org/questions/linux-software-2/trying-to-work-with-libusb-gadget-and-hid-emulation-4175543450/)

Iskuri 05-24-2015 05:34 AM

Trying to work with libusb-gadget and HID emulation
 
Hi Guys,

This is my first post on this forum so if it's in the wrong place please let me know.

I am currently working on emulating an HID device using my Beaglebone Black and have run into a bit of trouble using the libusb-gadget library I found to do this:

https://github.com/ueno/libusb-gadget/

I found some resources based on the example test code provided by this and found that you could create a struct to provide an HID interface that will appear when you run lsusb on the device, as shown in this example where the person has written code emulate a Wii-U controller so he can use any game controller he wants:

https://gist.github.com/ToadKing/a5edb237cb3e4433c3f3

I have currently got this working and have even got what I was working on running using the same structs and basic layout as this person is using, but cannot find the function to read from the HID interface. I can still do it from the interrupt endpoints but can't find any way to do it from the HID one, which I need to receive data for my device. If anyone knows about this library or about gadgetfs please let me know, I'd really appreciate it. Thanks.


All times are GMT -5. The time now is 06:52 AM.