Skip to content

write: '0100\r' results in read: b'BUS INIT: ERROR\r\r>' or b'NO DATA\r\r>' #187

@LVMJohnson1996

Description

@LVMJohnson1996

Previously I had my Raspberry PI 3B+ hooked up to my 2008 Toyota Yaris and was receiving data just fine. The SD card died and I reinstalled python OBD on my new SD card and haven't been able to get it to work since. Running the debug it seems that when 0100 is sent to the adapter while trying different protocols I either get "NO DATA" or "BUS INIT ERROR".

I have specified the portstr="/dev/ttyUSB0", baudrate=38400, protocol="1-A", fast=False, timeout=1, check_voltage=False. I have also added a delay to "r0100 = self.__send(b"0100",delay=1)" just to see if it was an error in reading.

This is the result that I get when attemting the protocol that should work with my vehilcle ("3" ISO_9141_2):

import obd
connection = obd.OBD(portstr="/dev/ttyUSB0", baudrate=38400, protocol="3", fast=False, timeout=1, check_voltage=False)
[obd.obd] ======================= python-OBD (v0.7.1) =======================
[obd.obd] Explicit port defined
[obd.elm327] Initializing ELM327: PORT=/dev/ttyUSB0 BAUD=38400 PROTOCOL=3
[obd.elm327] write: 'ATZ\r'
[obd.elm327] wait: 1 seconds
[obd.elm327] read: b'\xfc\r\rELM327 v1.5\r\r>'
[obd.elm327] write: 'ATE0\r'
[obd.elm327] read: b'ATE0\rOK'
[obd.elm327] write: 'ATH1\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: 'ATL0\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: 'ATTP3\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: '0100\r'
[obd.elm327] wait: 1 seconds
[obd.elm327] read: b'BUS INIT: ERROR\r\r>'
[obd.elm327] Connected Successfully: PORT=/dev/ttyUSB0 BAUD=38400 PROTOCOL=3
[obd.obd] querying for supported commands
[obd.obd] Sending command: 0100: Supported PIDs [01-20]
[obd.elm327] write: '0100\r'
[obd.elm327] read: b'BUS INIT: ERROR\r\r>'
[obd.OBDCommand] 0100: Supported PIDs [01-20] did not receive any acceptable messages
[obd.obd] No valid data for PID listing command: 0100: Supported PIDs [01-20]
[obd.obd] finished querying with 7 commands supported
[obd.obd] ===================================================================

and this is the result when using the protocol that is used first from the auto detect ("6" ISO_15765_4_11bit_500k):

import obd
connection = obd.OBD(portstr="/dev/ttyUSB0", baudrate=38400, protocol="6", fast=False, timeout=1, check_voltage=False)
[obd.obd] ======================= python-OBD (v0.7.1) =======================
[obd.obd] Explicit port defined
[obd.elm327] Initializing ELM327: PORT=/dev/ttyUSB0 BAUD=38400 PROTOCOL=6
[obd.elm327] write: 'ATZ\r'
[obd.elm327] wait: 1 seconds
[obd.elm327] read: b'\xfc\r\rELM327 v1.5\r\r>'
[obd.elm327] write: 'ATE0\r'
[obd.elm327] read: b'ATE0\rOK'
[obd.elm327] write: 'ATH1\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: 'ATL0\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: 'ATTP6\r'
[obd.elm327] read: b'OK'
[obd.elm327] write: '0100\r'
[obd.elm327] wait: 1 seconds
[obd.elm327] read: b'NO DATA\r\r>'
[obd.elm327] Connected Successfully: PORT=/dev/ttyUSB0 BAUD=38400 PROTOCOL=6
[obd.obd] querying for supported commands
[obd.obd] Sending command: 0100: Supported PIDs [01-20]
[obd.elm327] write: '0100\r'
[obd.elm327] read: b'NO DATA\r\r>'
[obd.OBDCommand] 0100: Supported PIDs [01-20] did not receive any acceptable messages
[obd.obd] No valid data for PID listing command: 0100: Supported PIDs [01-20]
[obd.obd] Sending command: 0600: Supported MIDs [01-20]
[obd.elm327] write: '0600\r'
[obd.elm327] read: b'NO DATA\r\r>'
[obd.obd] finished querying with 7 commands supported
[obd.obd] ===================================================================

Like I said before, I had this USB OBD2 module working with before with Python OBD and was able to get Coolant, Load, Voltage and Throttle Position. Of course none of those commands are working because none of the commands are supported.

Any help would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions