Enable g_serial USB OTG console Orange Pi on Armbian

2

There are a lot of things I like about the Next Thing Co’s C.H.I.P. One is that the usb port works as a USB serial console. This is a little tutorial of how to setup the USB OTG g_serial console on all Allwinner H3 boards including the Orange Pi, Nano Pi, and Banana Pi variants of this chipset.

This may work with other OSs, but it is designed for Armbian. Armbian is amazing when it comes to these Allwinner H3 core boards. Nothing else even comes close.

All of these codes need to be run as root, so well enter super user mode.

First thing you need to do is add the g_serial to the modules. Run the following command.

We may or may not need to add a directory, the following code will do that for you if it doesn’t exist

now we need to create a file in that directory

In that file, add the following lines.

exit that by pressing Ctrl+x, the tap y, then press enter. Run the following commands.

That is it. Just give it a reboot.

Now, if you are connected to a computer via USB through the OTG port, a serial port will appear which will allow you to access the console without having to have a usb/serial converter.

That’s all folks.

Share.

About Author

I love to tinker, code, and create electronics. I primarily focus on Raspberry Pi (and other linux SBCs) and Arduino (and other microcontrollers that run on the Arduino platform).

  • Clinton

    This is perfect. Thanks!

  • yalcinemre kaya

    Hi could you please tell me how to enable g_hid usb otg gadget on Orange pi zero?