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:

  1. find or develop usb device driver in native c code
  2. use jni compile driver within android source code
  3. create hal module (.so binary) hal definition
  4. compile android source code kernel
  5. flash onto jetson
  6. 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

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -