Hello there.
I'm owner of nano pi m1 board. I want use hid usb gadget on this board, but no success.
First I use prebuild image from download section. I fugured out, that the image contains android_usb gadget and it's works (i didn't go deep, but i see, that after some manipulations with files my computer see nano pi as mass storage). Ok, this shows that nanopi board can be used as device. Go next.
I need to load g_hid module, but there is no such module in the default image.
Ok, time to compile custom kernel (with Igor's script this is easy). I included hid usb gadget via menu.
Booting and "modprobe g_hid". Failed. "No such module" turns into "No such device". Hm...
"modprobe -v -v -v g_hid" says that problem is "could not open '/sys/module/g_hid/initstate': No such file or directory". Nothing i can do with this.
Whats next? I read about gadgetfs and configfs. Trying to create new images with this modules. No luck. Armbian working, usb gadgets - no.
Another try - compile dev kernel, not legacy.
"modprobe libcomposite" works! Oh... There is /sys/kernel/config/usb_gadget here!
May be this time it will be work?
Nope.
Last step of using configfs is "echo [something] > UDC". This [something] must be from /sys/class/udc, but this dir is empty.
On legacy kernel there is sunxi_usb, if i remember correct.
So, what can i do to? Any ideas to activate HID?