I'm using Atmel sama5d3x serials. I implement device to USB HID device (as keyboard). Already try the configuration of kernel for both USB HID to g_hid.o(built-in_ or g_hid.ko module), then Windows can identify as keyboard, event device has interface (/dev/hidg0) there.
How can I transmit data via this interface?
Kernel version : 3.14
I guess your question is "how can i transmit data via the interface from the Linux".
From Linux userspace, you can open /dev/hidg0 with mode wb and then simply write to this file descriptor.
For instance in Python:
with open('/dev/hidg0', 'wb') as fd:
fd.write(data_to_sent_over_hid)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With