lemberg / obd2-swift-lib

car onboard diagnostic swift library
MIT License
143 stars 39 forks source link

Handling BUS INIT: ...ERROR #11

Open tropicdome opened 6 years ago

tropicdome commented 6 years ago

When I connect to the ELM327 device it sometimes gives me a bus init error like this BUS INIT: ...ERROR. This means I am connected to the device but the ECU will not accept commands. How do I handle this error state? The ignition is of course on.

Here is the full log

ELM327 v2.1
Write to OBD Optional("AT E0\r")
Wrote 6 bytes
Read 11 bytes
Read complete
AT E0
OK
Write to OBD Optional("AT I\r")
Wrote 5 bytes
Read 14 bytes
Read complete
ELM327 v2.1
Write to OBD Optional("01 00\r")
Wrote 6 bytes
Read 10 bytes
Read 1 bytes
Read 1 bytes
Read 1 bytes
Read 8 bytes
Read complete
BUS INIT: ...ERROR    <----------------------------------------
Set new pid group 0
Set new pid group 0
Write to OBD Optional("AT DP\r")
Wrote 6 bytes
Read 13 bytes
Read complete
ISO 9141-2
Set OBD protocol to Optional(OBD2.ScanProtocol.CAN29bit250KB)
------------------------------------
Successfully connected to OBD device
------------------------------------
beseder42 commented 6 years ago

Same for us:

isExecuting true
Input stream opened
Output stream opened
isExecuting false
isFinished true
isFinished true
open operation completed without errors
Write to OBD Optional("AT WS\r")
Wrote 6 bytes
Read 16 bytes
Read complete

ELM327 v1.5
Write to OBD Optional("AT E0\r")
Wrote 6 bytes
Read 11 bytes
Read complete
AT E0
OK
Write to OBD Optional("AT I\r")
Wrote 5 bytes
Read 14 bytes
Read complete
ELM327 v1.5
Write to OBD Optional("01 00\r")
Wrote 6 bytes
Read 10 bytes
Read 8 bytes
Read complete
BUS INIT: ERROR
Set new pid group 0
Set new pid group 0

Write to OBD Optional("AT DP\r")
Wrote 6 bytes
Read 25 bytes
Read complete
ISO 14230-4 (KWP FAST)
Set OBD protocol to Optional(ScanProtocol.CAN29bit250KB)