1

I've implemented a USB Host CDC protocol structure on STM32L4 controller which I want to connect to an Android Phone. I want Android to run in Device Mode (Not in Host mode which UsbSerial library uses!) CDC class so that it's USB protocol Class Code can match to the STM32's USB Class Code but when I connect it phone my phone do not provide me any option as CDC/ACM. It only shows:

  1. Charging only. (Class Code: 0xFF)
  2. MTP. (Class Code: 0x8)
  3. PTP. (Class Code: 0x6)

So, is there any way I can switch Android to CDC as Device mode by writing an app?

Also, can implementing AOA protocol on my Host side solve this problem?

  • read https://android.googlesource.com/kernel/common/+/android-3.10/Documentation/usb/gadget_serial.txt and https://android.googlesource.com/kernel/common/+/android-3.10/Documentation/usb/functionfs.txt – Alex P. Jul 15 '17 at 21:49
  • It needs to build the kernel. I am that good to build and install the kernel.. Can you provide any tutorial links for this?? – krushna ratnaparkhi Jul 18 '17 at 06:36

1 Answers1

0

Yes In order to communicate with the host when android is acting as device mode you should implement AOA protocol on your host microcontroller to communicate with android phone. alternatively you can check for this option http://www.ftdichip.com/Products/ICs/FT311D.html