Can gateway controller detect all controllers present on CAN Network?

Jul 19, 2013 6 Replies

Our PC Application is connected to Embedded Gateway Controller over USB. Gatewary controller is connected to several embedded controllers over CAN bus.



PC Application needs to know what embedded controllers are present on the CAN Network because



PC Application needs to exchange information with these embedded controllers through the Gateway Controller.


How can Gateway Controller find out which embedded controllers are present on the CAN bus?


--------------------------------------- Posted through

formatting link


It asks.

The gateway controller sends out a poll message asking all the embedded controllers to reply. Each of the embeded controllers then sends a reply to the gateway controller identifying itself.

Grant Edwards grant.b.edwards Yow! I own seven-eighths of at all the artists in downtown gmail.com Burbank!

seven-eighths of

downtown

Thank you for the reply! Could you please describe poll message and reply message in detail?

--------------------------------------- Posted through

formatting link

There is no general answer to this question other than "It depends." CAN mostly resides in the ISO model's transfer layer. What the higher level application layer does with the packets is not specified.

If you know nothing about the network except that it's 'CAN', you could just check every address. If there is a node listnening, it should assert the ACK bit. But this can be a bit time consuming for CAN 2.0.

If you you want a better answer, you will have to know more about the network.

Integrally quoting Rich Webb: "There is no general answer to this question other than "It depends." CAN mostly resides in the ISO model's transfer layer. What the higher level application layer does with the packets is not specified."

Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) What is a magician but a practising theorist? -- Obi-Wan Kenobi

You're designing the system, so it's up to you to define the messages.

Grant Edwards grant.b.edwards Yow! I am a traffic light, at and Alan Ginzberg kidnapped gmail.com my laundry in 1927!

The only thing that the gateway can reliably detect, if the gateway connected to a network with at least one other powered up device. When a CAN device sends a message, every other node will listen for the bus and if _any_ node receives a message with correct CRC, it will pull down the Ack bit (no matter if the message is addressed to this node). Thus, the sending node knows, that there is at least one active node (i.e. not in Listen Only mode e.g. autobauding).

If the Ack bit remains high after transmission, the transmitter knows that there are no other stations on the bus.

However, if something is known about the protocol, for example with CanOpen, look for Node Guard messages, which will also reveal the node ID.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required