MeZmeriZe wrote:There might be another way.... J2534 specifies the overall API... but the underlying protocol is something else entirely.
I have an actual proper non OBD2 Can sniffer here... but I don't think Ford use CAN for this.. my understanding is that this stuff is J1850PWM and it's just a PWM signal from 0-5v 41kbps 12b length... could we listen in on that to see what is happening rather than at the higher level? a quick google shows people have been talking about sniffing pwm for a while now.. probably some libs I can use already.
I use ISO15765 via CAN for everything in my program, all the ford programming is done via ISO15765 via CAN. Some stuff is read back by standard CAN but I haven't needed it for anything yet. The OpenPort does not support J1850PWM and nor does the BA/BF/FG afaik.
You can put a plain CANbus sniffer on the line and listen in but good luck deciphering anything from the ~1000 CAN packets you get per second.
I use canbus (physical layer), ISO15765 (datalink layer eg how the packets are formed) and either OBD2 (J1939) or Unified Diagnostic Services (UDS ISO14229) as the application layer. All the flash read/write and DMR access is ISO14229.
I can sniff CAN packets or ISO15765 packets via J2534 using an OpenPort. The packets are different and ISO15765 via CAN packets are the ones I am interested in and do all my comms via.
Have a look at the log I posted a few post back as an example of the UDS commands. The log has a combination of CAN and ISO15765 packets, the CAN packets are just chatter that I ignore, the ISO15765 packets are the PCM communicating with another tester that I am sniffing.
Tazzi wrote:Think Im a little confused on what you mean with two testers? Do you mean two devices acting on the same ID? Ie.. having two ECU's hooked up onto the same CAN bus line?
I mean having two PCs devices hooked up to one PCM. Eg two J2534 devices, one programming a PCM and another trying to sniff the communications. You can do it but if they both have the same address weird stuff happens, hence the OpenPort has a proprietary connect command that effectively acts as a passive listen device, kind of like a normal CAN device with the ISO comms turned off.
edit: Here is the J2534 connect string I use to sniff comunications:
Code: Select all
J2534Status = J2534Interface.PassThruConnect(DeviceId, ProtocolID.ISO15765, ConnectFlag.SNIFF_MODE | ConnectFlag.CAN_ID_BOTH, BaudRate.ISO15765, ref ChannelId);
[Flags]
public enum ConnectFlag
{
NONE = 0x0000,
ISO9141_K_LINE_ONLY = 0x1000,
CAN_ID_BOTH = 0x0800,
ISO9141_NO_CHECKSUM = 0x0200,
CAN_29BIT_ID = 0x0100,
SNIFF_MODE = 0x10000000 //Only supported by OpenPort 2.0
}
public enum ProtocolID
{
J1850VPW = 0x01,
J1850PWM = 0x02,
ISO9141 = 0x03,
ISO14230 = 0x04,
CAN = 0x05,
ISO15765 = 0x06,
SCI_A_ENGINE = 0x07,
SCI_A_TRANS = 0x08,
SCI_B_ENGINE = 0x09,
SCI_B_TRANS = 0x0A
}