0
votes

So I am looking into communicating and transferring data between my android phone and a linux server running OpenWRT via USB. I've been looking into Android's USB Host. So here are my questions.

1) Is that possible? Am I mistaking the USB host/ accessory feature for android?

2) If not possible, what direction can I take to transfer data via USB between android phone and OpenWRT

3) If possible, do I need to write a program on the OpenWRT side as the client (for USB Host on android) or server (for USB Accessory on android)

Thanks

1
Many current Android devices can be either a host (with an adapter cable) or a device (where the external accessory is the host). Of those that can't be both, they are much more likely to be able to be devices in accessory mode than hosts. Which role can your openwrt box play? You might also look into if some tethering mode would give you what would be recognized as a USB network interface. - Chris Stratton
@FettFrank Did you ever get anywhere with this? I'm looking at doing something similar (android app talking to an arduino via USB) and I'm having trouble finding a coherent explanation of how. I've read the USB docs mentioned in xoska74's answer, I'm looking for more information. - Steven J Owens

1 Answers

1
votes

It is possible, just refer to below link.

Before use the USB API, you should check the spec regarding USB Device like Universal Serial Bus Device Class Definition for Audio Devices.

And the below link is a web page for you about USB. http://www.beyondlogic.org/usbnutshell/usb6.shtml#SetupPacket