brendan-w / python-OBD

OBD-II serial module for reading engine data
GNU General Public License v2.0
1.02k stars 360 forks source link

I have some problem in using obd package. #157

Closed JanghoChu closed 4 years ago

JanghoChu commented 4 years ago

I had used two ECU Protocol " '5': ISO_14230_4_fast " and "'3': ISO_9141_2". ('portstr': '/dev/tty.usbserial')

Could you tell me how to fix it ?

source 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

log message

python3 testOBD.py
[obd.elm327] Failed to retrieve current protocol
[obd.elm327] Connected to the adapter, but failed to connect to the vehicle
[obd.obd] Cannot load commands: No connection to car
[obd.obd] 'b'010D': Vehicle Speed' is not supported
alistair23 commented 4 years ago

It looks like the car isn't on or the adapter isn't connected to the vehicle. Have you checked your connection?