androidusbraspberry-pi3android-thingsusb-otg

Usb Communication Android Phone to Android Things


I am trying to setup USB communication serially with an Android phone to a Raspberry Pi loaded with Android Things (USB OTG cable).

What does the code on the Android Things Raspberry Pi have to be to receive and react to USB serial communication from the Host Android phone? If possible, can you give a code example of how to react to a read command then provide specific information (say just a simply a string) back to the phone.


Solution

  • Raspberry Pi 3B cannot act as USB slave, only as USB host.

    Some references:

    However, RPi 3B has another capability which you may find of interest but, honestly, I am not sure if Android Things supports it.