Ethereal-dev: [Ethereal-dev] Ethereal and ISO 9141 or 14230 (KWP2000 / OBD) ?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Philip Christian <philip.christian@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Oct 2004 14:36:33 +0100
Hi there,

I am trying to sniff packets (or maybe more accurately frames) that run between an EOBD test tool and my car. I have been playing with freediag (on sourceforge) a bit but it looks too complicated for my purposes. Basically freediag tries to connect to the car and do init/wakeup cycles and keep alives and stuff. I already have a scantool on the bus doing that stuff, and what I really want to do is just sit there and quietly listen. Then I can see maybe why the scantool works but freediag doesn't and get freediag to work. I am thinking that a GUI OBD listener tool might be useful to other folks too.

ISO 9141 and 14230 both work the same way at a low level. Packets are sent and received on the same serial bus at 10400baud. The packs are NRZ coded (i.e. "1" is +volts and "0" is -volts). There is a start of packet(frame) byte, a source address byte and destination address byte and way of indicating length. Overlayed onto this is a defined messaging system such as codes for requests and a code for positive or negative response and fail codes etc. Electrically the bus is held at +12V through a resistor and any device can pull it low and the other devices all hear it.

In other words it is a networking protocol.

I already have a box that converts the voltages to RS232 and I have already proven that at an electrical level that the 1s and 0s are there and readable. 1s and 0s both from the scantool and from the car are presented to the Rx line of the RS232 port. No handshaking lines are used so the 10400 baud stuff I guess must be done in software.

My thought is that I could right something that allows pcap to capture and understand these bytes and that Ethereal could then display them on a nice graphic interface. I could nick bits of code from freediag if necessary like the baud rate control stuff.

Is this a good idea / stupid idea ? Where should I look in the pcap / Ethereal code to start off ? I know next to nothing about Ethereal.

Thanks for any help or suggestions, Philip