-
Notifications
You must be signed in to change notification settings - Fork 72
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
Unable to initialize obd.init() #49
Comments
Start by toggling on the debug printing here. If possible and you have the hardware, attach a logic analyzer, compare with another OBD reader. |
Before magic 5 baud. I am reading buffer[0] = 57 instead of 55 and buffer[1] = 0 |
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? |
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). |
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 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 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. |
Hi @iwanders Thanks for your sharing. https://github.com/iwanders/OBD9141
I am trying example code 'reader_softserial' but unable to init the obd as defined here in obd.init().
Please suggest~ Thanks.
17:54:21.677 -> init_success:0
17:54:25.191 -> Looping
17:54:31.178 -> init_success:0
17:54:34.677 -> Looping
17:54:40.687 -> init_success:0
17:54:44.166 -> Looping
17:54:50.169 -> init_success:0
17:54:53.671 -> Looping
The text was updated successfully, but these errors were encountered: