How to change OTG mode from serial to HID keyboard on the Orange pi zero?


Recommended Posts

Armbian is a community driven open source project. Do you like to contribute your code?

Just now, MitchD said:

Which kernel are you using? If you are using mainline, I understand than the OTG options aren't there yet.

 

If on legacy, you can try: modprobe -r g_serial

followed by: modprobe g_hid

 

From there, see if any new devices are created.  Full documentation is here: https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt

Thanks for  replying.

I'm using the latest from here https://www.armbian.com/orange-pi-zero/ marked as legacy stable.  Not sure what kernel it's using.

I tried `modprobe -r g_serial`  and got: `modprobe: FATAL: Module g_serial is in use.` I tried with the otg port plugged in and unplugged.

`modprobe g_hid` returned `modprobe: ERROR: could not insert 'g_hid': No such device`
 

Link to post
Share on other sites

Try toggling: https://github.com/armbian/build/blob/master/config/fex/orangepizero.fex#L504

 

3 hours ago, MitchD said:

Not sure why this hasn't been patched yet. 

 

Afaik it should work. Perhaps unloading is not working as it should. This kernel is from some other times ... removal from /etc/modules and reboot might be needed.

 

Nobody is working on H3 legacy kernels anymore :( Modern kernel will be here soon.

 

@Abdullah Seba Technical support is our free will. Our expense and we tend to rest on Sundays.

Link to post
Share on other sites

Hello, i have been looking into this subject lately but couldn't find something useful. I want to be able to act as a mouse and keyboard with opi zero. I have some experience with programming and a bit of linux ecosystem so i i think i can look into/follow some stuff if you guide me. Also i know its off-topic but does gpio pins have any latency on them? I want to share data in real time between opi zero and rpi zero. Thank you for your attention. Sincerly

Link to post
Share on other sites
Guest
This topic is now closed to further replies.