Skip to content

Make elm327.py able to talk to ELM327 clones #282

@BinaryMercenary

Description

@BinaryMercenary

Fix: Wrap the buffer.decode in a try and set bogus string.
This increases compatibility by 5-10x with post elm327 made after 2022.
(I've tested this)

The change is in ./obd/elm327.py
near the last few lines,
# convert bytes into a standard string
string = buffer.decode("utf-8", "ignore")

    # convert bytes into a standard string
    try:
        string = buffer.decode("utf-8", "ignore")
    except:
        string = "Null response. Possibly an elm327 clone - try to connect anyway."

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