Im trying to make a camera mouse and i need to know how to actually make it work. I need the udoo board to be recognized by a pc as a standard usb mouse and i have to use the hid gadget driver. I am pretty much a noob and i dont really know what to do. Does anybody have any suggestions?
How do you want to make a camera mouse out of a Neo? It has ample video input capabilities. If you are clever enough to make a camera mouse of a Neo I have no doubt you will also succeed to make it successfully act it as a USB hid with the usb gadget driver. But it could conflict with the current USB Direct connection configuration that Udoobuntu is using to act the Neo as network device through USB.
The camera is connected to the board through the usb 2.0 port. I am using OpenCV to track gestures, but i still havent found something to help me implement this mouse interface.
@Todd, I would look for a forum that aims for creating USB devices. For Windows you can check their articles: https://msdn.microsoft.com/en-us/library/windows/hardware/hh706187(v=vs.85).aspx , for Linux you might want to look at https://www.linuxjournal.com/article/7353. Technically your question has little to do with the Neo per se, more with 'how to create drivers for USB devices'. Once you know how to do that I'm sure that at his forum we might be able to help you out with some design ideas or other stuff.
You would need to enable usb gadget support in the linux kernel and probably implement a driver (unless there's something you can reuse) to link to your gesture tracking. Refer to Linux-USB Gadget API, the link to the Windows article won't be that useful as it partly depends on the imx6 usb hw support. The HID gadget (g_hid) may already provide some of the support you need, refer this to this link. BTW how fast is the gesture tracking on the neo?
I've been struggling with this issue for some time now and I just can't seem to find the answer. Every piece of documentation that I've read related to my problem either talks about USB.c or g_hid.ko, but no one talks about the actual implementation. The most approachable solution seems to be to insert the module in the kernel. The thing is that I found this module in the kernel modules directory, but when I type insmod g_hid.ko (with the path included) in the terminal I get the error "g_hid no such file or directory"). Apparently I have to unmount g_multi, but I can't seem to achieve that. About the USB.c file, I cannot figure out what to do with it. Should I compile it? Is there a USB.c file that I should edit in the kernel? Should I cross compile it from an Ubuntu PC? I honestly don't understand if I should program all of this on a PC or directly onto the board. I'm sorry for being such a noob, but I just cannot find a proper solution. If you guys know something that could help, please let me know!