Android CAN Monitoring App

Mitsubishi i-MiEV Forum

Help Support Mitsubishi i-MiEV Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

garygid

Well-known member
Joined
Oct 5, 2012
Messages
187
Location
Laguna Hills, CA 92653
This thread is a place to discuss the development and use of
Android CAN-monitoring applications, usually requiring a
Bluetooth connection from an OBD CAN Reader device,
similar to the OBDLink Bluetooth device from ScanTool.

Some people are building DIY OBD BT interfaces, so
there should be more choices available "soon".

Our friend "priusfan" has constructed an Android App
using the B4A (Basic4Android) programming system.
 
edit 21/06/2013

there are 2 applications there : https://drive.google.com/folderview?id=0B8dQaQF7N-koZ2tYWWRFOTV4a3c&usp=sharing

one is btion.... .apk
the other is trpviewer. .apk

thx to me168, there are many changes:

Release 75: add Screen Altitude History
Release 74: add Screen Speed History (the last 3 minutes)
Release 73: minor bugfix on bad values in odometer
Release 72: Rpm added
Release 71: 80 cell support
Release 67: adapt textsize for big screens
Release 62: integration 4 screens , battery cells infos are now in main application
Release 56: start communication bugfix for OBDLINK
Release 53: special trick for galaxy tab

here are links to get 2 apk
one allows to check the balance between the cells.
batt_status.png

the apk is in the folder object

the other one allows to see & log parameters
bt_can.png

the apk is in the folder object

the logs are in small SQLite database located in /sdcard/bt_can
it is easy to explore this db on a pc using firefox and the extension for sqlite.

these 2 apps are working well with my car and it was tested on 4 different android devices:
GALAXY Note
Nexus 7
Asus Transformer Prime
a chinese 7" tablet

the interface used is a very good quality BT dongle (forget chinese low cost, it will not work).

here in France, 5 guys will receive soon their dongle and start testing...
 
Wow, very nice, splendid work.

To obtain the Cell Voltages, is it necessary to write a Request
to the CAN bus, or were you able to get the voltage data by
just "listening" to the CAN bus messages?

I wish that I could get the cell-pair voltage data from the LEAF.

Again, VERY GOOD WORK!
 
Is this "OBDLink Bluetooth Scan Tool" the device that you are using?

http://www.scantool.net/scan-tools/obdlink-bluetooth.html

Maybe it would be possible to put a 2 pole 3 position slide
switch on the hood of the OBD connector (on the cable
that connects this OBDLink Bluetooth device to the car)?

(For use with the LEAF to read all three of its CAN buses,)

-----
I have the OBDLink SX device that has a USB cable that
will connect to a PC, looking like a virtual Comm Port to
my CAN-Do program.

Do you know of any Bluetooth client adapter device that
would host the OBDLink SX USB client?
 
hello,
this error is strange, it means 2 records have the same timestamp....
a timer is used each 1000mS to do some logging...
at this time the timestamp is rounded to second, I will change that : no rounding, keep mS.

with the above programs, what is your experience with BT connexion?
normally, it connects fully automatically with the last used device. (it can take 3 to 5 sec, but it should start)

also the next release includes an export to flatfiles from the DB.

edit:
next release is here
changes:
a) avoids bug with BT on first use.
b) time stamp is now to mS : avoids duplicate entry in log.
c) Stop Button generates 2 txt files in the BT_CAN folfer with logs. (easy to use with excel).

necessary to emply the folder BT_CAN (only once) before the first use, because the timestamp's content is not the same.
 
Since the iMiEV CAN bus might make 1600 messages per second,
it is quite possible that two messages will have the same
millisecond time stamp, right?

Are you setting the OBDLink to filter only some messages?

What baud rate are you using from the OBDLink?

Very nice work.

Maybe add a one-time message asking the user if
they want to clear the BT_XXX Directory?

Or, include a version number in the files., and auto-detect
obsolete file or database structure?

Also, best to include an application version number
in the app where the user can see it, even where it
will show on a screen shot, because it will make it
much easier for you to debug when people give
you input. They can say "version XXX did... ".
 
Nice that you named this version 41 as a new App name,
so that it does not over-write the older version 40 app.

One version previous to 40, I think you had the application
start with sample data being displayed, even when there
is no BT available. That was a very nice feature, to be able
to show other people what nice work you are doing with
this application. Maybe that sample-data feature could
come back?

The sample data in the cell-voltage application is also
very nice. Thanks.
 
Since I, and many other people, do not have the
BT OBDLink device, but we do have iMiEV logs now,
I would like to add a function to CAN-Do that would
send out the OBDLink format messages to a BT
Comm Port, at the right baud rate and message
timing to emulate the car.

If I can send essentially the original message stream,
then you (and we) would have a very nice way to
demonstrate and test your Android apps.

So, baud rate of 500000, and the
MMMD1D2D3D4D5D6D7D8<LF>
string of characters at the correct intervals?

Will that work for your Android Apps?

I would really like to see your Apps in operation.
 
@gary your idea to send frames via BT should work if we can establish the link.
you should send only:
346
373
374
412
with the original timing.

on my side, I will prepare a release without the init sequence: it will just listen.


following gary's suggestion, I made a change to the app checking the cells's balance.
now, just by touching the screen (on the graph) , we switch between Volt & Temp in °C.
there are only 66 battery temp sensors in my car.
btemp.png


bvolt.png


the full app is there
 
@john: the error you get when starting the app is "normal" :mrgreen: , I have the same...
I will correct it some day (it tries to show a graph before reading any data)
 
Did batt2 lose the ability to show sample data when no BT
is available?
Batt1 would show sample data.

What baud rate are you using?

For your BattN app, should I send ONLY the 6E1,2,3,4 log messages?
 
I am getting data from the PC through BT to the Android tablet,
and I can see the data with a terminal emulator.
However, the Apps seem to be getting garbage data.
I am using 500000 baud in CAN-Do when I open the
Comm Port, but I do not know if that makes any
difference.

I will try the newest versions of the Apps.
 
Sending OBDLink format Log Messages to
the Android Apps is still not working correctly.

Here is Can-Do v199, with an OCX file to use if you want
to open Comm Ports 17 - 99, in addition to the usual 1 - 16.
You rename the OCX file by removing the "-99" and then you
replace the existing OCX file, usually found in C:\Windows\System32\

This v199 of CAN-Do should work both with, or without, the modified OCX,
which has just a one byte change, 0x10 (16) to 0x63 (99).

http://www.wwwsite.com/puzzles/cando/CAN-Do-v199.zip

This addition on the Output logs page, sends the selected
messages from the Log Messages in menory, so you need
to read in an existing Log file to have something to send.

Since you know your programs better, and have more
experience with BT, perhaps you can make this work.

I see the Cell voltages, and the temperatures in the 6Ex messages.

With 88 cells, there might be 22 modules, each with 4 cells?
Then, each module has three temperature sensors?

Any suggestions are welcome.
Cheers, Gary
 
What are the yellow numbers / letters at the center bottom of the
screen, that are only half visible?

Do your Apps expect some delimiter other than <LF>?
(chr(13))

Just MMMD1D2D3D4D5D6D7D8 and one line-feed character?

Is there some other attribute of the data stream that
your Apps require?

I THINK that CAN-Do v199 is sending the above
"expected" OBDLink message format.

Cheers, Gary
 
Back
Top