I am developing a android application which reads Obd data from vehicle's Obd adapter via bluetooth... I am facing issue while initializing the adapter. I have sent following Obd commands in sequence to initialize the obd :
Some times for this command i receive BUSINIT:ERROR.. And after that for every vehicle command (except AT commands) same error is repeated..
I want to know the Exact initialization sequence ?
It seems your obd initialization and obd protocol selection failed. You should follow these steps:
AT D
AT Z
AT E0
AT L0
AT S0
AT H0
AT SP 0
When protocol selection command response without any error like listed below, your connection is OK and you can request new commands like '0100' command.
Errors:
Command Explanation:
AT D -> Set all to defaults
AT Z -> Reset Obd
AT E0 -> Echo off
AT L0 -> Line feed off
AT S0 -> Spaces off
AT H0 -> Headers off
AT SP 0 -> Set Protocol to 0 "Auto", search all protocols and connect it with proper protocol for that obd
For AT SP command, if you know your vehicle's obd interface protocol, you can choose that specific protocol other than make Auto and search all possible protocols. You can use different inputs:
Protocol Parameters: Hex[0,1,2, ... ,B,C]
Auto select protocol and save. AUTO -> 0
41.6 kbaud SAE_J1850_PWM -> 1
10.4 kbaud SAE_J1850_VPW -> 2
5 baud init ISO_9141_2 -> 3
5 baud init ISO_14230_4_KWP -> 4
Fast init ISO_14230_4_KWP_FAST -> 5
11 bit ID, 500 kbaud ISO_15765_4_CAN -> 6
29 bit ID, 500 kbaud ISO_15765_4_CAN_B -> 7
11 bit ID, 250 kbaud ISO_15765_4_CAN_C -> 8
29 bit ID, 250 kbaud ISO_15765_4_CAN_D -> 9
29 bit ID, 250 kbaud (user adjustable) SAE_J1939_CAN -> A
11 bit ID (user adjustable), 125 kbaud (user adjustable) USER1_CAN -> B
11 bit ID (user adjustable), 50 kbaud (user adjustable) USER2_CAN -> C