0

I am going to connect a USB device to Android mobile phone, using Android ICS 4.0 USB OTG.

Can I connect this device to smartphone through USB hub and connect the phone through USB hub to PC in order to deploy apps at the same time (using a male-male USB cable)? Will it be safe solution for both phone and my device?

2 Answers 2

1

I think you're saying you want the PC to be the host for the USB hub (so that it can connect to your phone) but for the phone to also be the host for the USB hub (so that it can connect to this other device). No, that won't work. USB connections are based on a tree structure. Given this:

PC----Hub----OtherDevice
       |
       |
     Phone

Phone can't be the parent of OtherDevice unless it is also the parent of Hub and therefore the PC.

You should connect the phone directly to the other device, and access the phone over the network from the PC as Ryan says in his answer.

2
  • The only reason I didn't say that was I couldn't find any info that says the USB can only "run" in one mode at a time. I know that a usb port can support up to 127 devices (at least according to the spec) but I wasn't sure if they can go in to multiple modes on android hardware/software Commented Feb 24, 2012 at 16:34
  • @Ryan Page 16 of usb_20.pdf from http://www.usb.org/developers/docs/ :P. They call it a "tiered star" topology. I suppose it might be possible to hack around the spec to enable this, but both the phone and the hub would need to be doing it, and I don't see why anyone would bother. Now if the phone had two interfaces, and you could connect one to the PC and one to the other device without the hub, that would be fine. Commented Feb 24, 2012 at 16:47
1

According to this page, if you need to connect to the device with adb then you will have to connect to adb via tcp.

to enter adb tcp mode enter adb connect <device-ip-address>:5555

to go back to adb over usb enter adb usb

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .