Hello:
I'm working on a obd2 project and need some help:
With the "at ma"
I get:
8A EA 29 20 A7 00 30
AA EB 60 20 A7 00 E7
E8 FF 10 03 B3
88 25 29 07 00 97
68 49 10 10 56 90
E8 FF 60 03 98
88 3B 10 43 80 0D
48 FF 40 06 03 AC
8A EA 40 A0 9E 50 26
AA EB 60 A0 9E 50 2E
8A EA 10 A0 8C 00 65
8A EA 10 20 8C 00 A5
88 53 10 04 C4
8A EA 10 A0 8C 00 65
4A EA 40 20 91 00 6B
48 FF 40 06 03 AC
What I need to do is find out which is the pid, data etc.
I have been looking at the " en.wikipedia.org/wiki/OBD-II_PIDs"
Can't make heads or tails :-(
Can you please HELP ?
Thank you for the help Terry:SoyEli,
The ATMA command is "monitor all", meaning it will read all raw data on the bus. It relies on a lot of other parameters and I think you need to know which type of bus you are connected to to interpret it correctly.
I suggest you take a look at the ELM327 data sheet
http://elmelectronics.com/DSheets/ELM327DSH.pdf
This takes quite a lot of study. I hope you have enough time.
Terry
Thank you for the help:SoyEli,
I insert the commands that I want to send, into a list and use a thread in a class to send from the list. The same thread has a "NewData" event sub which notifies the main thread of incoming data. When data is received on the main thread, it is interpreted in a long Select sub and displayed by the guages.
Each command must be sent one by one because it is only a serial connection but on most vehicles it is so fast that it looks continuous.
The maximum delay should only be 200ms.
I find this works OK with minimum delay to the UI.
Terry
Three days is a mear blink of the eye, I spent six months searching, studying and experimenting. I am on version 24 and still nowhere near finished.I have been on the computer for 3 days
THANK YOU !!!I sympathise with you because I was in the same position about a year ago.
Three days is a mear blink of the eye, I spent six months searching, studying and experimenting. I am on version 24 and still nowhere near finished.
I have included the full INCOMPLETE project. The code is very scatty and may be hard to follow but you could use the OBDService module without much modification.
I think you might have a busy weekend ahead!
Please compile and test the project before using any of the code because I have'nt worked on this for a while and may have inadvertantly changed something.
Terry
I sympathise with you because I was in the same position about a year ago.
Three days is a mear blink of the eye, I spent six months searching, studying and experimenting. I am on version 24 and still nowhere near finished.
I have included the full INCOMPLETE project. The code is very scatty and may be hard to follow but you could use the OBDService module without much modification.
I think you might have a busy weekend ahead!
Please compile and test the project before using any of the code because I have'nt worked on this for a while and may have inadvertantly changed something.
Terry
Hi terryn,
I tested this program, it is work.
But I have a problem:
In OBDService:
BT.ConnectInsecure(Admin,Device,1), this code can connect a smart phone (4.4.2) and work, but can't connect Idea TabA1000-A tablet (4.1.2)
so, I change this code to BT.Connect(Device), and it is work.
Why?
Thank you.
Dale
Hi terry,Hi Dale,
I think it is a bit hit and miss with either connect method but there is a good explanation here http://www.b4x.com/android/forum/threads/serial-bluetooth.37964/
The best way to connect would be :-
Try BT.Connect
If that fails
Try BT.ConnectInsecure and iterate through say the first five ports
Terry
Sub Process_Globals
Dim Admin As BluetoothAdmin
Dim BT As Serial
Dim Step As Int
Dim Device As String
End Sub
Sub Activity_Resume
Step = 0
BT.Connect(Device)
End Sub
Sub BT_Connected(Success As Boolean)
If Success Then
'Start communication
Else
Step = Step + 1
If Step > 4 Then Return
BT.ConnectInsecure(Admin,Device,Step)
End If
End Sub
Hi Terry,Hi Dale,
You could try something like this.
B4X:Sub Process_Globals Dim Admin As BluetoothAdmin Dim BT As Serial Dim Step As Int Dim Device As String End Sub Sub Activity_Resume Step = 0 BT.Connect(Device) End Sub Sub BT_Connected(Success As Boolean) If Success Then 'Start communication Else Step = Step + 1 If Step > 4 Then Return BT.ConnectInsecure(Admin,Device,Step) End If End Sub
Terry
Hi Terry,Dale,
I have read that there are up to 60 ports for use in RFCOMM.
The device will allocate the lowest port first so unless your device is using many ports in other coonections, it is unlikely to be more than four or five.
It would also be a very slow process to try more than a few ports.
Terry
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?