How to Set/Read the MAC Id of a CANoe Simulation

Question:
How can I set/read the MAC Id of my CANoe Simulation?
Answer:
EthGetMacId gives the real MAC Id of the Interface/Adapter that is used. Each VN56xx has got its own set of MAC Id, one for each Adapter. EthGetMacId is only available if ETHERNET_IL.dll is configured as component in the node. In case of simulated bus there is no real MAC Id available, therefor CANoe uses a simulated MAC:
 
  • ID 02:00:00:00:00:01 (first simulated Adapter – i.e. Eth1)
  • ID 02:00:00:00:00:02 (second simulated Adapter – i.e. Eth2)
     

IpGetAdapterMacId gives the MAC Id set for the simulation node. It makes for this MAC Id no difference if real bus or simulated bus is used at Measurement Start. However, it is important to differentiate which TCP/IP stack shall be used for the simulation in the TCP/IP configuration dialog. CANoe Stack is always used for Diagnostic and XCP. It can also be used by the simulated node if configured, like indicated below.

  • If use shared CANoe TCP/IP stack has been selected for the simulated node, the Ethernet setting for CANoe are used.
  • If individual TCP/IP stack has been selected for the node, the individual Ethernet setting is used for each node.
     

These pictures illustrate all possible use cases.



Article ID: 1058
Last updated: 2018-05-17
Revision: 16
CANalyzer/CANoe -> Options -> Ethernet (IP) -> How to Set/Read the MAC Id of a CANoe Simulation
https://kb.vector.com/entry/1058/