Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable USB API in Android Things for Raspberry Pi 3

I am working on a project which involves a Raspberry Pi 3 Module B Board with Android Things OS on it. My android application running on Raspberry Pi3 needs to communicate with an external hardware over USB. But,it has been mentioned in the Known Issues - https://developer.android.com/things/preview/releases.html that the USB API is currently disabled.

Is there any way for enabling the USB APIs in Android Things? Any help or guidance for the same will be highly appreciated! Thanks in advance!

like image 356
Kishan Avatar asked Feb 01 '17 05:02

Kishan


3 Answers

This API has been added to the Developer Preview 3, see the release notes

like image 169
shalafi Avatar answered Nov 20 '22 22:11

shalafi


May be this post helps. Needs to be some tricks on ttyUSBx.

like image 31
ierturk Avatar answered Nov 20 '22 21:11

ierturk


Currently the Peripheral HAL doesn't recognize USB serial based UART peripherals. However, if your USB serial device (ie Raspberry PI) exposes individual UART TX & RX pins, you can communicate with it using the UART Peripheral API.

Note:

  • TX and RX must be crossed while connecting the peripheral to the UART board of your development board .

enter image description here

  • On Raspberry Pi 3, the console needs to be disabled : UART peripherals on Android Things for Raspberry Pi 3
like image 2
OBX Avatar answered Nov 20 '22 22:11

OBX