0

Hi this OBD BLE device (https://www.amazon.com/LELink-Bluetooth-Energy-OBD-II-Diagnostic/dp/B00QJRYMFC) is the one I'm using to connect over bluetooth my own iPhone. I have been able to find the right service and the characteristic to write to and to set notify value to true. However, I'm very confused as to what kind of commands I'm supposed to be sending to it. There's a list of mixed instructions online about how ELM327 devices are supposed to receive "PIDs" but also I'm confused if I should be using the list of AT commands.

First time I sent "DP\r" (an AT command) to the write characteristic and got back "DP ?" so I'm guessing it was not understood by the device. Second time, I was following one PDF which said I should send in Mode followed by PID number so I sent in "01 00\r" which was replied with "NO DATA". I'm guessing this second command might have been better because at least I received something back instead of "?".

Would anybody know what to do in this situation? Thank you

Terry Bu
  • 889
  • 1
  • 14
  • 31
  • See the **Standards documents** section on https://en.wikipedia.org/wiki/On-board_diagnostics – Ken White Jan 11 '21 at 01:28
  • 1
    Can you show a communication log? Are you (incorrectly) really only sending `DP\r` or (correctly) sending the whole `ATDP\r`? – DrMickeyLauer May 03 '21 at 07:27
  • @DrMickeyLauer Hi Dr.M, what did you mean by a communication log? I only get back what I mentioned above in the console in XCode while using its CoreBluetooth functions ... i'm only sending in DP\r as the whole string i believe. Am I supposed to send in the whole "ATDP\r"? – Terry Bu May 03 '21 at 18:51
  • 1
    @TerryBu Yes, absolutely. ELM327 commands start with `AT`, so you need to send `ATDP\r`. Actually there is a whole sane init sequence necessary, before printing the current protocol will usually succeed (https://github.com/mickeyl/LTSupportAutomotive/blob/7d731693a2e44fefe718ac8f02715d26e8ee4c73/LTSupportAutomotive/LTOBD2AdapterELM327.m#L73), but that's another story. See https://www.elmelectronics.com/wp-content/uploads/2016/07/ELM327DS.pdf for more details on the ELM327 command set. – DrMickeyLauer May 04 '21 at 08:28
  • @DrMickeyLauer Drmlauer, i was able to get back response "ISO 15765-4 (CAN 11/500)" from sending ATDP\r ... I am guessing I now need to read up on what kind of commands are available under ISO 15765-4 (CAN 11/500) ... where can I find these?? thanks so much in advance, – Terry Bu Jun 07 '21 at 15:09
  • 1
    @TerryBu Good, you're making progress! The actual OBD2 communication is pretty much documented in SAE J1979_201408 and SAE J1979DA_201406 (unfortunately both being standard documents you have to pay for) – the most relevant portions of it (the PIDs) being reflected in https://en.wikipedia.org/wiki/OBD-II_PIDs. – DrMickeyLauer Jun 08 '21 at 15:59
  • @DrMickeyLauer I really appreciate it again :) you are a savior – Terry Bu Jun 08 '21 at 19:39

1 Answers1

0

I'm also searching for information regarding the same thing. While surfing on the internet I got a PDF with the command list to be sent to ELM327 devices and another site with info on how to use those commands in simple. So as for the details in this site "DP\r" would not work instead you would need to send "ATDP\r" as every command starts with "AT".

and I suppose that this also will be a useful PDF.

AVDiv
  • 11
  • 7