What this model is
This is a CAN bus simulation model built for OMNeT++. It was prepared to support research and education on in-vehicle networks, timing behavior, and mixed CAN/Ethernet communication.
The model was used as a practical research tool when studying automotive communication systems and simulation environments based on OMNeT++. The source code is available on GitHub, and the experimental CAN-Ethernet gateway model is published separately on GitHub.
Main features
- Simulation of CAN message transmission and arbitration behavior
- Support for experiments on in-vehicle network timing and latency
- Use in mixed CAN-Ethernet network studies and related evaluations
- A foundation for research prototypes and classroom demonstrations
- A CAN message router model is included so that CAN-CAN gateway behavior can also be simulated
- Error frames of the CAN protocol were not supported in the released beta version
Tested environment (at original release)
- OMNeT++ 4.4.1 or later; versions 4.4.1 and 4.6 were confirmed at the time
- INET Framework 2.3.0 or 2.5
- INET 2.6 and 3.x were reported to cause compile errors
- OMNeT++ 5.x was unsupported in the released version
Useful external references: OMNeT++ · INET Framework
Installation instructions (archived)
The original project page included concrete setup steps, preserved here for reference. These steps describe the initial release structure and specific OMNeT++/INET versions, so treat them as historical instructions.
- Download and install OMNeT++ and the INET Framework, typically under a directory such as `~/program/`.
- Extract the downloaded archive and copy the distributed files into the INET tree.
0.1.0/src/* -> ~/program/omnetpp-4.4.1/inet/src/
0.1.0/example/* -> ~/program/omnetpp-4.4.1/inet/example/
$ cp -r 0.1.0/src/* ~/program/omnetpp-4.4.1/inet/src
$ cp -r 0.1.0/example/* ~/program/omnetpp-4.4.1/inet/example/ - Move to the OMNeT++ root directory and set the environment.
$ cd ~/program/omnetpp-4.4.1
$ . setenv
$ ./configure - Build inside the `inet` directory.
$ cd inet
$ make clean
$ make makefiles
$ make Example configurations
The following example directories were provided under `omnetpp-4.4.1/inet/examples/can/`. Each example can be run with `./run` (you may need `chmod +x run` first).
- `bus1`
- `bus2`
- `messagerouter1`
- `messagerouter2`
Screenshots
Simple CAN bus example with one sender and one receiver.
CAN bus example with two senders and one receiver.
CAN message router example for gateway-style communication.
Larger CAN message router configuration used in the original examples.
Distribution notes
The distributed source code was released as a beta version and may contain bugs. An experimental CAN-Ethernet gateway model is available separately on GitHub: can-for-omnet and can-ethernet-gw-for-omnet.
Related work
- Keigo Kawahara, Yutaka Matsubara, Hiroaki Takada, “A Simulation Environment and Preliminary Evaluation for Automotive CAN-Ethernet AVB Networks,” OMNeT++ Community Summit 2014.
- Jun Matsumura, Yutaka Matsubara, Hiroaki Takada, Masaya Oi, Masumi Toyoshima, Akihito Iwai, “A Simulation Environment Based on OMNeT++ for Automotive CAN-Ethernet Networks,” WATERS 2013.
Contact
Feedback on the simulation model is welcome. If you have questions, please contact the author by email.