I made an Android app to communicate with an ELM327 OBD-II dongle via bluetooth. When I test the app with a bluetooth serial terminal (CoolTerm / macOS) the app is receiving and sending data without an issue.
Using my app to transfer commands to the ELM will result in broken and splitted answers.
Output:
DataReceivedHandler: 9V
DataReceivedHandler: 9V>
DataReceivedHandler: 11.
DataReceivedHandler: 9V>
The example above should show the result of the AT RV
command which queries the battery's voltage of the vehicle (I sent the command multiple times).
Expected (good) result should look like this: >11.9V
Before I send the first command to query OBD values the ELM is initialized by these AT-commands:
AT D
AT Z
AT E0
AT L0
AT S0
AT H0
AT SP 0
If you have any idea how to get clear answers from the ELM, please let me know.
Thanks in advance!
Found the solution..
The terminal program was sending \n
and the ELM sends \r
for the termination of the statement.