Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending data from a PC to an Android device using USB OTG

I want to send data between a host (Android) and a client (PC) using the Android USB OTG API.

Code to send data from the host to the client using the API exists. However, I'm having difficulty finding code to send data from the client to the host.

Is it possible to send data from a PC to Android using USB OTG?

like image 959
user2461391 Avatar asked Jun 27 '13 20:06

user2461391


1 Answers

It is not possible to send data that way. Android devices running the USB-OTG will act as a USB host. A PC only has USB host capabilities. So by connecting a USB cable directly from a PC's USB port to an Android device running USB OTG, you are attempting to connect two USB hosts together - which doesn't work!

That also means you won't be able to send data from the Android device to the PC using USB-OTG.

If you would like to communicate between an Android device and a PC, there are other methods. Serial through USB and Android ADK come to mind.

like image 63
user2461391 Avatar answered Sep 30 '22 17:09

user2461391