android - How do I expose a USB device to the Java API through HAL? -
background:
i'm trying integrate new sensor android platform. development purposes, using nvidia jetson-tk1 dev board , spark core. spark core communicates sensor , outputs data serially through usb.
at high level, needs are:
- to able read/write serial data spark core on usb
- to handle data android service written api
- accomplish @ high speeds
in future when become more experienced @ working hal, may eliminate spark core , use gpio pins on jetson control sensor ic.
onto details:
i can read data through command cat /dev/ttyacm0
, i'm looking more low-level approach. want use hal communicate device. specifically, want spark core show when cat /proc/bus/input/devices
.
want able read data using getevent /dev/input/eventxx
.
the main question:
here approach:
- find or develop usb device driver in native c code
- use jni compile driver within android source code
- create hal module (.so binary) hal definition
- compile android source code kernel
- flash onto jetson
- profit
is correct? can point me in direction of take first step? i'm confused because know android built on linux kernel , linux kernel should have usb device drivers built (right?)
Comments
Post a Comment