I have a I.MX6UL custom board, we are using one OTG port as Host with ID pin configured to charge the Android tablet connected to that port. Here my Android Tab USB acts like Device and IMX6UL usb port acts as Host. So i have emulated the USB as gadget serial and I am able to communicate to a Ubuntu machine via Serial read and write.
Now I have to do the same thing with Android tab connected to IMX6UL board. Both charging and communication should happen as a Virtual com?