If the fourth pin microUSB of the connector is snapped to ground, then the device will operate in mode OTG. With the help of library felUsbSerial, I exchange data with the microcontroller. If the fourth pin microUSB of the connector is left unconnected, data exchange does not work. How can I simultaneously exchange data and charge an Android device?
When I work using OTG, I am in USB host mode.
Can I exchange data with the microcontroller in USB peripheral mode?
Is there an example or library for this?