Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: mushketer888 on October 11, 2014, 11:58:00 PM

Title: How to use USB OTG on A20 as USB Serial?
Post by: mushketer888 on October 11, 2014, 11:58:00 PM
How to use USB OTG on A20 as USB Serial?
For example i want to use Olinuxino's USB OTG as usb-serial interface with PC
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: mushketer888 on October 12, 2014, 02:21:19 PM
Just some suggestions would be enough
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: JohnS on October 12, 2014, 03:49:37 PM
PC as host, so not using A20 as OTG but instead as device.  Sounds like USB CDC.

John
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: nn on October 14, 2014, 10:00:30 PM
Maybe you need the gadget_serial module. See:

linux-sunxi/Documentation/usb/gadget_serial.txt

It works for me to get a serial login on the USB.
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: jmss on October 28, 2014, 09:16:15 PM
Quote from: nn on October 14, 2014, 10:00:30 PM
linux-sunxi/Documentation/usb/gadget_serial.txt

Where is this file?

Thanks.
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: JohnS on October 28, 2014, 10:37:22 PM
google for it and then try the obvious Documentation/usb/gadget_serial.txt

John
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: jmss on October 28, 2014, 11:46:46 PM
Quote from: JohnS on October 28, 2014, 10:37:22 PM
google for it and then try the obvious Documentation/usb/gadget_serial.txt

John

I found this one:

  https://www.kernel.org/doc/Documentation/usb/gadget_serial.txt

but I thought it would be something specific.
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: jmss on October 28, 2014, 11:57:11 PM
Will this gadget_serial work for making A20 behave as a keyboard for an Android tablet on the other end of the USB cable?
Title: Re: How to use USB OTG on A20 as USB Serial?
Post by: MBR on November 02, 2014, 09:06:12 AM
Quote from: jmss on October 28, 2014, 11:57:11 PM
Will this gadget_serial work for making A20 behave as a keyboard for an Android tablet on the other end of the USB cable?

No, for keyboard (and any other "normal" USB input device) you will need the HID Gadget, see https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt (https://www.kernel.org/doc/Documentation/usb/gadget_hid.txt).