5

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!

Kishan
  • 231
  • 1
  • 11

3 Answers3

3

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

ierturk
  • 452
  • 6
  • 22
  • 1
    Since `AT DP3` `USB/Serial connection` directly supported via peripheral manager as `UART` interface. Useful information can be found at [this](http://nilhcem.com/android-things/usb-communications) post. So no need to use `USB API`. However `USB API` also was enabled with `AT DP3`. – ierturk Apr 22 '17 at 21:04
3

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

shalafi
  • 3,926
  • 2
  • 23
  • 27
2

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

Community
  • 1
  • 1
OBX
  • 6,044
  • 7
  • 33
  • 77
  • Thank you @OBX for your prompt reply. I just checked the I/O Pinout diagram of Raspberry Pi 3. It has just one UART. But my devices needs minimum 2 UARTS. Any way out for this? – Kishan Feb 01 '17 at 05:31