Comments (5)
Start by toggling on the debug printing here.
If possible and you have the hardware, attach a logic analyzer, compare with another OBD reader.
from obd9141.
Before magic 5 baud.
Before setting port.
After setting port.
Timeout on read 0x55.
init_success:0
Looping
Before magic 5 baud.
Before setting port.
After setting port.
Timeout on read 0x55.
init_success:0
I am reading buffer[0] = 57 instead of 55 and buffer[1] = 0
from obd9141.
No, you're getting a timeout; this line returns false.
Are you sure this is the correct initialisation procedure for this ECU? Does it need the 5 baud init or KWP? Ideally confirm with another OBD reader what initialisation is necessary for this ECU.
Check if your software serial port actually works, can you receive anything on this serial port? Does it need pullup resistors?
from obd9141.
Yes, I agree, [this line] returns false. basically my ECU is a simulator and I can set the modes using switches to KWP and ISO9141-2. So I am trying with init() and initKWPSlow(). both needs the 5 baud init. I tested it with another obd reader it detect the KWP and ISO9141-2. Also I compared the wakeup signal from obd reader and what I am getting. Its similar, but after that it doesn't show any data signals (like 1st byte which should be 0x55).
I checked the serial port signal on Rx (its same as on K-line with voltage level 5v).
from obd9141.
Hmm, well that's an intriguing setup.
I wonder what the timing looks like with another OBD reader. A wild guess is that the simulator responds very quickly, effectively responding with the 0x55
in between these calls, so perhaps the 0x55
is sent while we are still in the delay(200)
and the serial port is not yet enabled?
You could try to remove that last delay, it shouldn't affect the initialisation procedure since the line is already high, but it may just setup the bus fast enough to be able to catch the 0x55
?
If at all possible, hook up a logic analyser and record a handshake from another OBD reader and compare it with what the handshake from your microcontroller & this library looks like, that is by far the easiest way to diagnose any issues around it.
from obd9141.
Related Issues (20)
- KWP Slow init with v1 != v2 HOT 4
- ESP32 support HOT 7
- problem 'serial_port' was not declared in this scope HOT 14
- For ESP32 HOT 3
- k-line speed study HOT 18
- How to make it work.... HOT 20
- How can I know if I'm doing everything right? HOT 5
- esp32 with OBD9141 not work HOT 19
- A special kind of communication with the ECU HOT 6
- ESP32 Serial1 crash... HOT 2
- KWP71 Compatibility HOT 2
- The example for esp32 does not work. HOT 3
- PIDS HOT 8
- None of the examples is working HOT 3
- mitisuibishi MUT 2 (kline 5 baud init) HOT 1
- Usage with MCP2025 HOT 2
- LiquidCrystal_I2C problem. HOT 1
- sharing of your OBD9141 project HOT 1
- OBDII fault code names HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obd9141.