mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.85k stars 1.59k forks source link

OTG PD(Power Delivery) issue #546

Open siri2677 opened 10 months ago

siri2677 commented 10 months ago

I'm currently using a USB device connected to my Android device through an OTG cable. However, when I plug USB-C into the PD port on the OTG cable, the USB device is not detected by USB Manager. Do you happen to have any information on this issue?

kai-morich commented 10 months ago

maybe that port is only for power, not for data

siri2677 commented 10 months ago

I didn't provide enough information in my previous question. To be more specific: When connecting a USB device to the USB 3.0 port via an OTG cable, it is possible to detect the device using the UsbManager and establish serial communication through your library. However, if a USB-C type charging connector is plugged into the PD port while a USB device is connected to the USB 3.0 port, it becomes impossible to detect the USB device via the UsbManager.

ckdo8008 commented 9 months ago

Tablet information.(version. Etc)

I had the same symptoms with a cheap Chinese device. In some cases, charging and use at the same time may not be possible due to the USB version or chipset of the tablet.

Jai-GAY commented 9 months ago

However, if a USB-C type charging connector is plugged into the PD port while a USB device is connected to the USB 3.0 port, it becomes impossible to detect the USB device via the UsbManager.

anything to do with this, same issue as this user? It is also better that you provide an image.

ckdo8008 commented 9 months ago

There is no image.

The following products had the same symptoms. Teclast P25

Symptoms are the same as in the link. However, it does not seem to be the same phenomenon. In the case of Teclast P25, it did not work with three types of USB hubs.

Jai-GAY commented 9 months ago

In the case of Teclast P25, it did not work with three types of USB hubs.

P25T, I doubt is even an OTG-enabled device.

siri2677 commented 8 months ago

The device experiencing this issue is the Samsung Galaxy A51 with Android version 12. The issue did not occur during testing on a Samsung Galaxy S9 with Android version 10.

kai-morich commented 8 months ago

Not a library issue. Different Android devices with different USB chip set have different power supply capabilities. You have to try.

ckdo8008 commented 8 months ago

usbhub

This is not a problem with the library. However, it is written for the purpose of sharing the content.

In the Lenovo TB-J607F product, depending on the USB Hub, it may operate as a USB host while charging or may only charge. (Android 12) Both products worked well on the Samsung SM-T720 product. (Android 11)

The two hubs above used the same chipset. ID 05e3:0610 Genesys Logic, Inc. 4-port hub

However, products that can only be recharged Bus 001 Device 003: ID 05e3:0751 Genesys Logic, Inc. microSD Card Reader Bus 001 Device 127: ID 05e3:0751 Genesys Logic, Inc. microSD Card Reader Bus 001 Device 126: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 001 Device 125: ID 05e3:0610 Genesys Logic, Inc. 4-port hub Various functions are included.

If you are experiencing the above problem, my advice is to test a product that only has the USB Hub function. In the case of products that have other functions in addition to the USB Hub, the host function appears to be excluded for reasons of power-related stability.

You must purchase a USB Hub that matches your device. Also, I would like this compatibility information to be shared.