简体   繁体   English

Android平板电脑无法通过USB端口找到USB设备,但可以通过OTG电缆

[英]Android Tablet can't find USB device via USB port but can via OTG cable

I have an Android tablet which has a mini-USB port and a USB port, and I want to write an app communicate with a USB key. 我有一个Android平板电脑,它有一个迷你USB端口和一个USB端口,我想写一个应用程序与USB密钥通信。 I have written a demo to find out the USB key, but there is no response. 我写了一个演示来找出USB密钥,但是没有回复。

What disturbs me is that if I run this demo on my another tablet which only has a mini-USB port but support USB OTG, it can find the key via an OTG cable. 令我不安的是,如果我在另一台只有迷你USB端口但支持USB OTG的平板电脑上运行此演示,它可以通过OTG电缆找到密钥。 When I insert the USB key into the USB port, there is no response. 当我将USB密钥插入USB端口时,没有响应。 I want to know what the difference is. 我想知道区别是什么。

Can't I use the USB Host API to find the key in USB port? 我不能使用USB Host API在USB端口中找到密钥吗? And what's the difference between communication with USB device in the mini-USB port via OTG cable and in the USB port directly? 通过OTG电缆和USB端口直接与迷你USB端口中的USB设备通信有什么区别?

Well OTG cables have certain pins shorted out inorder to tell the device that it should switch to USB Host Mode (the tablet provides the power). 好的OTG电缆有一些引脚短路,以告诉设备它应该切换到USB主机模式(平板电脑提供电源)。 The USB port may be OTG capable but only if you have the OTG cable. USB端口可能支持OTG,但仅限于您使用OTG电缆。 Typically the USB ports on tablets are set up as accessory ports, meaning that they draw power, not provide it. 通常,平板电脑上的USB端口设置为附件端口,这意味着它们会提供电源,而不是提供电源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android通过OTG电缆将文件写入USB - Android write files to USB via OTG cable 通过OTG线缆从USB设备向Android平板电脑提供电源 - Drawing power from USB device to android tablet through OTG cable 在Android中通过OTG线连接USB播放视频? - Play Video using connected USB via OTG cable in Android? Android 6无法通过OTG访问USB - Android 6 can't access USB with OTG Android应用程序,通过USB端口与设备通信 - Android apps, communicating with a device via USB port android studio无法通过usb调试 - android studio can't debug via usb 是否可以将Android OS编程为通过mini-USB端口与外部设备接口? - Can Android OS be programmed to interface with a external device via the mini-USB port? 通过USB电缆连接获取Tablet.input - Getting Tablet.input via USB-cable connection 有可能通过 usb 电缆访问胡椒平板电脑,或者有一种方法可以尽快从 Android Studio 构建应用程序吗? - There is a possibility to access pepper tablet via usb cable or a way to build the app from Android Studio as fast as possible? 我们可以通过简单的USB电缆将android数据传输到桌面应用程序吗? - Can we transfer android data to desktop app via simple USB cable?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM