When the power supply from the microcontroller to ML2 is disabled, communication is possible without any problem, but when it is enabled, communication is not possible.
Is there any way to perform serial communication with the power supply from the microcontroller to ML2 enabled?
The microcontroller and ML2 are connected via Type-C, supplying about 50W when powered, but no PD is used.
The microcontroller side is running a PCDC application, and the ML2 side is connected as a host.
By the way, when the ML2 is connected to a device via USB, does the ML2 ever switch between accessory mode and host mode depending on whether the device is powered from USB or not?
If the device is switched between accessory mode and host mode, we recognize that this method of implementation would make it difficult to communicate with the microcontroller while charging.
In contrast, if we use Android Open Accessory to run the ML2 as an accessory and the microcontroller as a host, can the ML2 always be charged while communicating?
Finally, I will call the library from unity applications.
We should be able to support what AOSP support, have you tested your implementation on other devices that run Android 10? Are you able to provide more information about the USB deive?
Android device does not automatically switch between USB Host and Accessory modes based solely on whether it is being powered from the USB connection. Instead the switch between USB Host and Accessory modes is determined by the roles the devices take during the connection process.
Note that accessory device may send a special protocol request to the Android device to switch it into accessory mode.
are you using the FEATURE_USB_ACCESSORY feature that is available via adb?
I am using usb-serial-for-android and I recognize that this library does not use FEATURE_USB_ACCESSORY.
We should be able to support what AOSP support, have you tested your implementation on other devices that run Android 10?
We have not yet been able to test it on other devices.
Are you able to provide more information about the USB deive?
The USB device is RX65N-2MB.
If power is supplied from the USB device, ML2 OS does not recognize the USB device; if power is not supplied, ML2 OS recognizes the USB device.
What could be the cause of this?
The USB device and ML2 are connected via Type-C, supplying about 50W when powered, but no PD is used.
The USB device side is running a PCDC application, and the ML2 side is connected as a host.