Shall my app receive fault codes from a car through bluetooth?

373 views
Skip to first unread message

Ggaayi Abraham

unread,
Apr 4, 2019, 8:28:23 AM4/4/19
to MIT App Inventor Forum
Hello guys...
I am designing an app that reads fault codes from the Electronic Control Unit through using a Bluetooth vehicle interface. 
Unfortunately, the app is unable to receive fault codes but it shows device is connected to the Bluetooth interface.
Attached is the picture of the blocks I setup. 
Please help!!
Abraham, Uganda.
mit app.PNG

Chris Ward

unread,
Apr 4, 2019, 10:33:51 AM4/4/19
to MIT App Inventor Forum
Hi Ggaayi

Can you post details of the "Bluetooth vehicle interface". Minimum we need to know is the manufacturer, model, part number and exact Bluetooth version.

This post is related to:

hamil cooper

unread,
Apr 4, 2019, 10:39:21 AM4/4/19
to MIT App Inventor Forum
I did not see in your pic where you sent a request code. To get the RPM, for example, you have to send 01 0C.

On my OBD module, all of the data is in Ascii.

After a connection, what I do is to send 01 0C and then get the response as you are doing.

TimAI2

unread,
Apr 4, 2019, 11:56:27 AM4/4/19
to MIT App Inventor Forum

ABG

unread,
Apr 4, 2019, 3:03:30 PM4/4/19
to MIT App Inventor Forum
@TimeAI2,
That's the best manual I have read in years!

It is both descriptive and prescriptive.

Special page to note: page 31,
about automatic text to hex detection and conversion.

Also, note that the AI2 code for Carriage Return is \r

ABG


TimAI2

unread,
Apr 4, 2019, 6:38:48 PM4/4/19
to MIT App Inventor Forum
and probably just as useful:

Chris Ward

unread,
Apr 4, 2019, 7:08:31 PM4/4/19
to MIT App Inventor Forum
...and probably already referenced in the other posts :)

ABG

unread,
Apr 5, 2019, 10:35:38 AM4/5/19
to MIT App Inventor Forum
From what I see in the ELM327 manual, the first thing you should send
might be 'AT z\r' (see attached.0

Does that get you a response?

ABg



mit app.png

TimAI2

unread,
Apr 5, 2019, 11:10:42 AM4/5/19
to mitappinv...@googlegroups.com
I have been having a play with this effort in the gallery:


and have anglicised, remixed it and simplified (no output conversion)
Will save all output to a text file on sdcard for later review


Tested on a Mazda and it works and gives correct results when doing the conversions by hand

Gives a useful example of how to connect and send commands

Example output:
+CONNECTING<<80:01:84:9A:F3:78
?

>NECTED
?

>ATZ
010C
41 0C 0E 82

>0105
41 05 5A

>01 0B
41 0B 1A

>01 10
41 10 00 F4

>01 13
41 13 03

>01 20
41 20 80 15 B0 11

>01 40
41 40 FA D0 00 00

>


OBDIIAI2.aia

ABG

unread,
Apr 5, 2019, 11:23:02 AM4/5/19
to MIT App Inventor Forum
Reply all
Reply to author
Forward
0 new messages