Android设备中的OTG路径 [英] Path of OTG in Android device
问题描述
我正在开发一个 Android
应用程序,在这个应用程序中,我必须通过 USB设备
code> OTG 。
当我使用 sys / bus / usb0 / devices
然后我得到所有设备的平板电脑列表,而我只想通过OTG端口获取设备名称。
是否有蚂蚁的方式来获取哪个设备建立和哪个设备连接到平板电脑。
当我使用路径 / storage / usb0 /
和 / storage / usbdisk0
/,然后我没有通过 OTG
端口连接任何设备whicle设备。
请任何人都可以告诉我如何通过 OTG
端口获取 USB
以下示例链接提供的数据类似于:
1 )设备类别
2)USB设备路径
3)供应商ID(VID)和产品ID(PID)。
4)A所有inter列表面孔和他们的终点。等等...
I am developing an Android
application in which I have to get details of USB device
connected to Tablet via OTG
.
when I use sys/bus/usb0/devices
then I am getting list of all devices of Tablet while I want to only fetch device name attached via OTG port .
Is there ant way to get which device is in built and which device is connected to Tablet.
When I used path /storage/usb0/
and /storage/usbdisk0
/ , then I didnt get any device whicle device is attached via OTG
port.
Please can anyone tell me how can I get the USB
details attached via OTG
port to Tablet
Below example link provides data like :
1)The Device class
2)The USB device path
3)The Vendor ID (VID) and the Product ID (PID).
4)A List of all interfaces and their endpoints. etc...
这篇关于Android设备中的OTG路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!