I am wondering how an Ethernet-to-CAN converter works. CAN is a multi-master broadcasting network where messages are associated with IDs. Each message type has a unique ID. Devices listen to all messages on the bus and decide whether an ID is of interest. Ethernet, however, uses point-2-point addressing, meaning that sender and receiver are specified. These information cannot be mapped on CAN, because there is not sender or receiver field.

Let's say, device A sends message m to device B. Device B is connected via CAN to the converter. Device A communicates over Ethernet.

  1. How does the CAN-to-Ethernet converter select the message ID when converting an Ethernet frame to a CAN fame? Are the same CAN IDs used for packets to the same recipient?

  2. How does the CAN-to-Ethernet convert a CAN message to an Ethernet frame? A CAN message has no recipient, but an Ethernet frame knows the recipient address. How does the mapping work?

  • 2
    \$\begingroup\$ It doesn't convert them directly in the MAC layer, Most likely, it encapsulates the CAN packet inside a TCP packet and acts as a gateway. A link to a specific product would help. \$\endgroup\$ – Lior Bilia Nov 5 '18 at 15:16
  • \$\begingroup\$ This was a more general question without focusing on a specific product. \$\endgroup\$ – null Nov 16 '18 at 13:45
  • 1
    \$\begingroup\$ That is the generic answer. The PHY and MAC layers are incompatible. Conversion has to be made on a higher layer. \$\endgroup\$ – Lior Bilia Nov 16 '18 at 16:19

It varies as per product manufacturer but generally speaking,

CAN-to-ETH converter reads all the messages from CAN Bus, packs every message as payload of ethernet datagram and sends it to computer. This payload contains CAN message ID, DLC and data.

On Computer, you can configure to filter out messages as per your requirements. Usually a DLL is provided and you can build your own application. Some even provide application where you can monitor the bus.

We use CAN-ETH converter from ProconX. Their user manual contains this simple diagram which will help you to understand: CAN-ETH Protocol description

Again, it depends on manufacturer and you can find details in the manual.

  • \$\begingroup\$ CAN-to-ETH: I am wondering what recipient is set in the Ethernet frame that contains s CAN message. CAN is a broadcast protocol, but Ethernet is point-to-point. Does this mean that such Ethernet frames are broadcasted as well? \$\endgroup\$ – null Nov 16 '18 at 13:54
  • \$\begingroup\$ What I use is UDP based which is a broadcast protocol. For TCP-IP, probably some configuration is required at start-up where a connection is established first and then communication over CAN is started. \$\endgroup\$ – Swanand Nov 16 '18 at 14:04

Software application programs that are setup to operate to CAN devices over an Ethernet connection will package the CAN protocol (including the IDs) into the data payload of the Ethernet connection. An intelligent processor in the Ethernet to CAN converter knows both CAN protocol and how unpack/pack that protocol into the Ethernet data payload. That device simply acts as a bridge between the Software application programs and the target CAN devices using the Ethernet as a convenient delivery service.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.