문제

Can anyone give me an idea on how to read the values from the OBD II Bluetooth adapter in an android application.

I want to start with scanning for the bluetooth devices from my android application, then after bluetooth device is found, how would I interact with it and get the values from it?

도움이 되었습니까?

해결책

You should start by reading this http://developer.android.com/guide/topics/wireless/bluetooth.html it contains step by step procedure .

add required permissions, make a bt adapter, then find paired/unpaired devices

다른 팁

I used the BluetoothChat Application and was able to get some basic communications, I am not moving into data logging. You can use this application to have a sort of instant messenger conversation with your ECM.

  1. What particular dongle are you using?
  2. Do you know what protocols are in use within your vehicle?

Download the BluetoothChat sample application -

  1. They will have already handled the intricacies of the connection for you, you will have to change the UUID in order to connect with your device - 00001101-0000-1000-8000-00805F9B34FB
  2. Read up on your particular dongle, some require the return character to be sentat the end of every command "\r"

This should get you started!

Once you have made the Bluetooth connection using the android bluetooth api, use the transport to send and receive data via the Bluetooth channel.

This is new developer resource document: https://developer.android.com/guide/topics/connectivity/bluetooth.html

The general workflow of the application functionality should go like this:

1) connect to the OBDII adapter through Bluetooth;

2) initialize OBDII adapter with AT commands;

3) continuously get data from the vehicle through issuing the corresponding PID codes.

This article also may be helpful. http://blog.lemberg.co.uk/how-guide-obdii-reader-app-development

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top