Question

Android allows the development of USB accessories using USB Host mode and USB Accessory mode. If I connect a peripheral using accessory mode, would that make the phone unable to connect to other peripherals or to a desktop computer until the aforementioned HW is unplugged?

Usually there is only one USB port on the phone, but please assume the use of a hub.

Was it helpful?

Solution

Connecting a peripheral in USB Accessory mode would prevent you from using any other accessory at the same time, and no, a hub will not help.

This is because in Accessory mode, the peripheral is the USB host (while the phone is a USB device), and a USB bus can only have one host. Therefore the Accessory mode restricts you to one accessory at a time.

If instead you used the USB Host APIs to make a (capable) phone the USB host, then there is some possibility that you might be able to use multiple USB device peripherals downstream of a hub - at least, the bus topology supports it, though I don't know for an absolute fact that the Android stack will.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top