Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BinaryMercenary opened this issue Oct 3, 2024 · 0 comments
Open

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

BinaryMercenary opened this issue Oct 3, 2024 · 0 comments

Comments

@BinaryMercenary
Copy link

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."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant