stelian42 / HarleyDroid

Harley Davidson J1850 Data Analyser for Android
https://github.com/stelian42/HarleyDroid/wiki/HarleyDroid-!
GNU General Public License v3.0
33 stars 17 forks source link

HarleyDroid: Harley Davidson J1850 Data Analyser for Android.

Introduction:

This Android application captures, decodes and analysed the J1850 stream coming from the data bus of a Harley Davidson bike.

Some of the decoded information (RPM, speed, odometer etc) is shown on the screen and can be saved on the external storage (SDcard) for later usage.

Hardware requirements:

To use this application you will need:

Harley J1850 protocol:

The J1850 stream contains the following commands (found by trial and error, no official Harley Davidson documentation was used):

28 1b 10 02 xx xx : rpm, xxxx = rotations/minute * 4
48 29 10 02 xx xx : speed, xxxx = km/h * 128
48 3b 40 xx       : gear in neutral if (xx & 0x20),
                  : clutch engaged if (xx & 0x80)
48 da 40 39 xx    : turn signals, xx = 1,2,3 for left/right/both
68 88 10 03       : check engine indicator off
68 88 10 83       : check engine indicator on
a8 3b 10 03 xx    : current gear, xx = 1,3,7,15,31,63 for gears 1-6
a8 49 10 10 xx    : engine temperature, xx = degrees Fahrenheit
a8 69 10 06 xx xx : odometer, xxxx = ticks, each tick = 0.4 meters
a8 69 10 86 xx xx : same as above, but a wraparound occured
a8 83 10 0a xx xx : fuel consumption, xxxx = ticks, each tick = 0.000040 liters
a8 83 10 8a xx xx : same as above, but a wraparound occured
a8 83 61 12 dx    : fuel gauge, x = level (0-15)

... any several unknown ones

Contributions to the above are welcomed !

HarleyDroid log format:

The logs generated by HarleyDroid are in CSV format:

timestamp,type,value,longitude,latitude,altitude,date

The timestamp format is YYYYMMDDhhmmss.

The different type/value combination are (depending on the metric/imperial HarleyDroid settings):

RPM,xxx : rpm in rotations/minute
SPD,xxx : speed in mph or km/h
GER,xxx : 1 - 6 (current gear)
NTR,xxx : 0 (not in neutral) - 1 (in neutral)
CLU,xxx : 0 (released) - 1 (engaged)
TRN,xxx : L (left), R (right), W (both)
CHK,xxx : 0 (going off) - 1 (going on)
ETP,xxx : engine temperature in C or F
ODO,xxx : current trip odometer, in miles or km * 100
FUL,xxx : current fuel consumption, in ml or fl oz
FGE,xxx : fuel gauge 0 (empty) - 6 (full)
CRC,xxx : bad J1850 message
UNK,xxx : unknown J1850 message

-- Stelian Pop stelian@popies.net