Android设备中的OTG路径 [英] Path of OTG in Android device

查看:659
本文介绍了Android设备中的OTG路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 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列表面孔和他们的终点。等等...



看github的例子


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...

see github example

这篇关于Android设备中的OTG路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆