CAN Network Diagnostic Trick - Modules Not Sending a Message

Thread Starter

Thender21

Joined Jun 7, 2015
27
Hi, I am an automotive technician. Sometimes I have a CAN networking related problem where one module does not react to a message that another module is supposed to have sent.

Often there is data that can be accessed with a scantool that shows these types of things but sometimes there is not. I end up in a place where I have to pick either the sending module or the receiving module as having failed with some hundreds of dollars at stake.

I have thought of a solution that may potentially work. I can put a resistor in series with the CAN wires to a module I am suspicious is not sending the message. As long as the resistance value is low enough that it won't terribly affect the network.

The idea is that current flow changes direction when communication is going TO the module and when it is coming FROM the module, so a voltage drop across the resistor would change its polarity and this could be seen with an oscilloscope and used to indicate whether the module is sending or receiving.

What can be done then is to operate something, let's say press a window down switch, and look for a change on the scope at the same time. If there is no change, nothing is being sent.

To make this even easier, all non essential modules can be removed from the CAN network reducing traffic.

If the system is working a second scope channel can show the circuit that activates the window motor.

For extreme cases, the actual bitwise signature of a specific message could be saved as an image.

Will it work? What resistor to use? I would have to come up with a way to attach the resistor inline but this can be done with the aid of a scrap harness. Identifying the module connector at the CAN distributor splice is not that hard either.
 

Thread Starter

Thender21

Joined Jun 7, 2015
27
I can use a low amp inductive clamp on the CAN wire to the module instead but I am not sure how many mA the CAN network carries. My probe is only good to maybe 5mA though in this case a diredctional change should be enough.
 

Papabravo

Joined Feb 24, 2006
12,405
I don't think this is a very good idea. Here is what I would do.
  1. Take the module that produces messages, and get it to produce 1 message on a properly terminated network on which it is a lonely node. No reply will show up in the Ack Slot and the producing node will go into an infinite loop, continually retrying the transmission. You can easily see the sent data on an oscilloscope.
  2. Take this "golden" transmitter and construct a properly terminated 2 node network with the "golden" transmitter and a receiving node which may or may not be suspect. Get the "golden" transmitter to send a message and watch for the reply.
We actually built a tool like this to probe all kinds of nodes on a two note network, with an interactive keyboard and display.
 

bwilliams60

Joined Nov 18, 2012
1,179
When messages are sent out over CAN Bus networks, an address must be attached to the message identifying the source of the signal. When it is received, the receiver must send an acknowledgement back to the transmitter saying it has received the message. It also must contain an address. I am not sure why you are trying to create something that is already there. If you can intercept the data, you should be able to tell whether or not they are both doing their job.
As well, a code is usually generated indicating a problem. Most of what you are trying to do can be done by monitoring voltage values on the CAN bus.
 

Papabravo

Joined Feb 24, 2006
12,405
When messages are sent out over CAN Bus networks, an address must be attached to the message identifying the source of the signal. When it is received, the receiver must send an acknowledgement back to the transmitter saying it has received the message. It also must contain an address. I am not sure why you are trying to create something that is already there. If you can intercept the data, you should be able to tell whether or not they are both doing their job.
As well, a code is usually generated indicating a problem. Most of what you are trying to do can be done by monitoring voltage values on the CAN bus.
What you are saying is incorrect. Although the identifier field of a CAN message may contain an address, it is not required. It is also not required there should be a response message to every produced message. What IS required is that each node which correctly receives a message MUST send a dominant bit in the ACK SLOT for 1 bit-time only; AND each node which detects an error must send an ERROR FRAME consisting of seven dominant bits (ERROR ACTIVE) or seven recessive bits (ERROR PASSIVE).
 

bwilliams60

Joined Nov 18, 2012
1,179
If I am wrong, I can live with that. Always good to be more educated. I guess then I will rephrase this and turn it into a question for you. Are you referring to CAN bus in general or when related to the Motive Power industry?
I work with Heavy Trucks and every CAN bus message that I know of, contains an 8 bit identifier from the module which contains the source address.
If this is incorrect, can you supply some reference material to support your thoughts? I would like to learn more about CAN bus technology and I want to make sure that what I am throwing out there is correct and it sounds like you know what you are talking about.
Cheers.
 

Papabravo

Joined Feb 24, 2006
12,405
If I am wrong, I can live with that. Always good to be more educated. I guess then I will rephrase this and turn it into a question for you. Are you referring to CAN bus in general or when related to the Motive Power industry?
I work with Heavy Trucks and every CAN bus message that I know of, contains an 8 bit identifier from the module which contains the source address.
If this is incorrect, can you supply some reference material to support your thoughts? I would like to learn more about CAN bus technology and I want to make sure that what I am throwing out there is correct and it sounds like you know what you are talking about.
Cheers.
Any system which uses CAN for the physical layer and the MAC layer has to decide how to use the 11-bit identifier field for the standard frame format, or the 29-bit identifier field for the extended frame format. CAN itself has no concept of source and destination address. The only rule that applies to adding higher layers on top of CAN is that: "No two nodes may produce a messages with identical identifier fields". This rule is not often stated explicitly, but if violated would result in the inability of the network to arbitrate simultaneous transmissions. One way to guarantee that this rule is not violated is to assign some number of identifier bits to be unique to a node. In essence to build a source address into each message. My point was that although people may place address information in the identifier field, it is not a requirement. There are other methods of accomplishing the goal. What you must have is a method to prevent two nodes from transmitting messages with identical identifier fields.
 

bwilliams60

Joined Nov 18, 2012
1,179
Okay so I guess what you are saying is that I was incorrect in saying that it has to have an address, is that correct?
In our field, which is not the electronic field but a dumbed down version perhaps, we are taught that each module has an address and that it is an 8 bit code buried in the 130-150 bit message sent out from the module. This makes sense because how would you knkw who is talking unless you identified yourself?
Anyways, I get what you are saying, I stand corrected and always open to learning more about the CAN bus.
As for the OP's question though, is he not trying to do what has already been done? There are better diagnostic methods for CAN bus problems.
 
Top