Monitoring Vehicle Parameters via Android Accessory Application

As a part of R&D work, I had got an opportunity to monitor certain vehicle parameters via android accessory application. To enabling communication between USB hardware and Android device, I had implemented Android Open Accessory protocol(AOA) in LPC1768 development board.

Before explaining about the work, lets check what is AOA? The AOA is a USB based protocol used by Android powered devices to interact with any external USB hardware (USB Accessory). Android supports this USB protocol, when it goes into a special mode called Accessory mode. In this mode, the Android device acts as a USB device and the accessory acts as a USB Host. The Accessory interface provides 2 bulk endpoints for communicating with an Android application.

Here The NXP LPC1768 Board is programmed as USB Host accessory to communicate with android device. Since the accessory is Host, it will power the android device. USB Accessory acts as bridge between OBDII monitoring android accessory application and ECU Simulator/vehicle. It is illustrated in the block diagram


The major stages of project is the following.

  • Accessory hardware reads the android app requests

  • Send request to ECU Simulator/Vehicle.

  • Sends the reply from Simulator/Vehicle to Android device.

The project can be divided into two sections –

    • Between LPC1768 (USB Accessory) and Android Device

      • USB device enumeration

      • Starting Device in android accessory mode

      • Enable communication

    • Between LPC1768 and Vehicle/Simulator

      • Baud rate and Acceptance filter settings

      • Enable communication

How I implemented AOA?

We had gone through PIC32 Basic accessory source code and ported its USB Host state machine to LPC1768. Based on this, we had developed Android accessory protocol on LPC1768.

Supported Android Devices

  • Nexus

  • Motorola

  • Samsung

  • Sony

Lets see its working,

  • Power-on the LPC1768 board.

  • Connect android device to the board via USB cable (within 1min).

  • Connect the board to Vehicle or ECU simulator.


  • Android device detects the LPC1768 board as usb accessory.

  • Automatically launch an associated EasyOBDApp in the android phone, then it will start monitoring the OBDII parameters.

  • If the USB accessory is not attached to your device, it will display a message – “No accessory attached”.

  • If your USB accessory is connected to ECU simulator or vehicle, you are able to monitor the OBDII parameters.

IMG_20150603_142427 IMG_20150529_140242 EASYOBD_1



Parvathy Ayyappan.R
Software Engineer

Leave a Reply