OBD9141 icon indicating copy to clipboard operation
OBD9141 copied to clipboard

initKWP not completing initialization

Open FlippedBench opened this issue 1 year ago • 3 comments

Hello, I am attempting to use this library to communicate with a Denso ESC that uses fast KWP initialization. However, I have been unable to get the readerKWP example program to work. Probing it with an oscilloscope just shows a single pulse every time it attempts the initialization.

Enabling the debug gets me the following readout: Looping Before 25 ms / 25 ms startup. Enable port. init_success:0

I am using an RP2040 based Arduino if that could cause any compatibility issues?

Thanks!

FlippedBench avatar Aug 16 '24 20:08 FlippedBench

Single pulse makes sense, there's one pulse at the start of initKWP, but after that you should see the bytes listed there on line 481. If you don't see that, something is either wrong with the hardware, or with the serial port on your board.

Are you using the tx_pin that is associated to the correct serial port you are providing in the begin method?

iwanders avatar Aug 17 '24 22:08 iwanders

I am assigning them to GPIO pins 10 and 11, which corresponds with how they are physically connected. I tried swapping them in case I mixed up RX and TX but no dice. When you specify what pins to use for the serial port, can it be any GPIO pins, or does it have to be UART TX and RX pins specifically?

FlippedBench avatar Aug 17 '24 23:08 FlippedBench

does it have to be UART TX and RX pins specifically?

Depends on your hardware, practically all hardware has only a few pins that can be used as a serial port though. The Tx and Rx passed to the begin function must match the Tx and Rx that are used for the serial port that is also passed in.

Edit; simple answer: Not any GPIO pin, they need to match the uart's pins.

iwanders avatar Aug 18 '24 00:08 iwanders