Giter Site home page Giter Site logo

Comments (7)

jimwhitelaw avatar jimwhitelaw commented on July 22, 2024

I see this similar issue that occurred with an older version of ESP IDF. What version of ESP-IDF are you building with? From what I've been able to find, arduino-esp32 for Arduino IDE is using an older version (4.4.6) than the PlatformIO espressif32 framework (ESP-IDF 5.1.2). That might have an impact on your project.

from elmduino.

suoivilbo2 avatar suoivilbo2 commented on July 22, 2024

Indeed, I am running the latest version of Arduino (2.3.2) which uses ESP-IDF 4.4. It's weird, because this bug shows up only when querying for batteryVoltage(). Other PIDs, e.g., rpm() run fine.

from elmduino.

jimwhitelaw avatar jimwhitelaw commented on July 22, 2024

If there's a way to use a newer version of ESP-IDF in Arduino IDE, that looks to be worth a try for you. (Or you could patch your local ESP-IDF with the change in (espressif/esp-idf@b43e777).

I don't know exactly what is happening and it could be completely irrelevant, but the batteryVoltage() request is bit different from other PID requests. It uses the "AT RV" command and the ELM327 returns the voltage it reads at its own power supply pin. There's no communication to the vehicle ECU for that request.

from elmduino.

Fichte79 avatar Fichte79 commented on July 22, 2024

Hello The Problem is in the ELMduino.cpp in the function "float ELM327::batteryVoltage(void)".

If you uncomment the "payload = start + 4;" the error is gone.
Or Copy the complet function fron Ver. 3.2.0 in the 3.2.5

Is not the best way, but works ;)

from elmduino.

jimwhitelaw avatar jimwhitelaw commented on July 22, 2024

Reverting to v3.2.0 will re-introduce a bug where if the ECU returns "ATRV" as part of the response (as some do), then the value will not be parsed correctly. So be careful if implementing that solution. I believe that the payload = start + 4; code triggers the bug in ESP-IDF, but is not the root cause of the crash.

from elmduino.

Fichte79 avatar Fichte79 commented on July 22, 2024

It may not be the root cause, that's why I said it's not the best way.
But it was only an update from 3.2.0 that caused the error and it is exactly this function that is responsible for it for me.
I use the programming as an emulator and on an ELM327 Bluetooth (China plug).
And things work fine in both systems.

from elmduino.

jimwhitelaw avatar jimwhitelaw commented on July 22, 2024

@Fichte79 or @suoivilbo2 are you able to test the PR I have just committed? I think it may be a fix, but I don't have hardware that exhibits the crash, so I can't test thoroughly. I can only test that the new code has not introduced a regression. Thx

from elmduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.