Matteo Fouquer
Matteo Fouquer

Reputation: 11

Python OBD issues

I'm trying to get this cable to work but unfortunately impossible to use the OBD python library here is the error returned someone

would have any idea ?

or tell me if this cable is accountable? and if it is possible to do it from my pc.

Thank a lot

The code

import obd

connection = obd.OBD() # auto-connects to USB or RF port

cmd = obd.commands.SPEED # select an OBD command (sensor)

response = connection.query(cmd) # send the command, and parse the response

print(response.value) # returns unit-bearing values thanks to Pint
print(response.value.to("mph")) # user-friendly unit conversions

The error:

[obd.obd] ======================= python-OBD (v0.7.1) =======================
[obd.obd] Using scan_serial to select port
[obd.obd] Available ports: ['\\.\\COM2']
[obd.obd] Attempting to use port: \.\COM2
[obd.elm327] Initializing ELM327: PORT=auto BAUD=auto PROTOCOL=auto
[obd.elm327] Response from baud 38400: b'\x7f\x7f\r'
[obd.elm327] Response from baud 9600: b'\x7f\x7f\r'
[obd.elm327] Response from baud 230400: b'\x7f\x7f\r'
[obd.elm327] Response from baud 115200: b'\x7f\x7f\r'
[obd.elm327] Response from baud 57600: b'\x7f\x7f\r'
[obd.elm327] Response from baud 19200: b'\x7f\x7f\r'
[obd.elm327] Failed to choose baud
[obd.elm327] closing port
[obd.elm327] write: b'ATZ\r'
[obd.elm327] Failed to set baudrate
[obd.obd] Closing connection
[obd.obd] Cannot load commands: No connection to car


Upvotes: 1

Views: 493

Answers (1)

Damon Earl
Damon Earl

Reputation: 344

That’s a counterfeit VAG-COM cable, the library is built for ELM327 command set cables.

Upvotes: 1

Related Questions