Do Android devices need USB power to support custom USB accessories?

In various guides for creating Android accessories using a USB connection, the first step is to "Choose a hardware platform that supports USB host mode." Most of these guides claim that this means getting a device running> Android 3.1 (or one that is embedded, or a tablet, etc.).

In my testing, it seems that in order to support the phone in USB host mode, it must work not only> Android 3.1, but also must supply power through the USB cable. Can anyone confirm or deny this?

Most tablets seem to supply power via USB, but many phones DO NOT. I can’t find a single place that will explicitly state that the phone must supply power via USB in order to be able to launch the accessory, since they all seem to freely state that everything works> 3.1 will work (for now, at least the device you are connecting to the power source). However, in all the USB libraries I tested, I can connect to my USB device, just different from my tablet (which supplies power via USB), but I can't get them to work with my phone (which does NOT supply power via USB ) Both versions work> Android 3.1.

Please note that I am not trying to connect my accessory to USB. My accessory has its own 5V power supply and can even supply power via USB. I just want to create an application that will allow my phone to be able to connect to it, change its settings, receive data, etc., but I can not make my phone recognize if the device is connected. I don’t know, because my phone disconnected USB, or if it is connected with another problem with my phone and / or software. Unfortunately, I do not have another phone number 3.1 for testing.

, , FTDI/Arduino, , ( ) , ( ) , USB- ( FTDI ).

+4
2

Android OTG, , OTG Samsung Galaxy, USB-, USB-, OTG, 5 GND, OTG, . - USB, Arduino, .

, , FTDI/Arduino, > , , , ( ) , ( ) , USB- ( FTDI ).

, - OTG, - .

+1

, , , USB.

. , , + 5 , , -USB . , , Android- ( - , ) ; OTG . /USB-, USB/ADB. , 7- , USB 2.x , , OTG .

// - OTG , , USB- / - " ), .

0

Source: https://habr.com/ru/post/1530267/


All Articles