Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
internal:can-tcpsockets-parsing [2018/02/05 12:54] – [Forward CAN Frames over TCP Sockets (can-tcp-broadcast.are)] preisig | internal:can-tcpsockets-parsing [2018/02/06 08:04] – [Environment setup] preisig |
---|
{{:internal:can_environment.jpg}} | {{:internal:can_environment.jpg}} |
| |
The above graphic illustrates how the test environment was built and what data gets transmitted. First to be able to simulate a CAN bus in a local environment PC1 runs [[https://www.peak-system.com/PCAN-FMS-Simulator-2.246.0.html|Peak System PCAN-FMS Simulator]] to generate CAN Frames based on the FMS Standard (supports FMS v 1.0 – 3.0). The generated frames are transmitted over [[https://www.peak-system.com/PCAN-USB.199.0.html|Peak System PCAN-USB]] into a Netmodule Router (NB2800 used in this example). Two example scripts on the router work with the incoming CAN traffic and send it back out over TCP, where [[http://sockettest.sourceforge.net/|SocketTest]] runs an PC2 as a simple TCP server. SocketTest is a tool based on Java that allows testing of UDP and TCP client and server sockets. In our case SocketTest is configured as a TCP server that is listening on Port 2000. | The above graphic illustrates how the test environment was setup and what data gets transmitted. First to be able to simulate a CAN bus in a local environment PC1 runs [[https://www.peak-system.com/PCAN-FMS-Simulator-2.246.0.html|Peak System PCAN-FMS Simulator]] to generate CAN Frames based on the FMS Standard (supports FMS v 1.0 – 3.0). The generated frames are transmitted over [[https://www.peak-system.com/PCAN-USB.199.0.html|Peak System PCAN-USB]] into a Netmodule Router (NB2800 used in this example). Two example scripts on the router work with the incoming CAN traffic and send it back out over TCP, where [[http://sockettest.sourceforge.net/|SocketTest]] runs an PC2 as a simple TCP server. SocketTest is a tool based on Java that allows testing of UDP and TCP client and server sockets. In our case SocketTest is configured as a TCP server that is listening on Port 2000. |
| |
===== Setup the CAN Interface on the Router ===== | ===== Setup the CAN Interface on the Router ===== |
| |
===== Incoming RAW CAN Frames on the Router: ===== | ===== Incoming RAW CAN Frames on the Router: ===== |
The first and most simple test on the router was to use candump provided by the can-utils package to verify a working environment and to see the generated CAN traffic. Login to your router (over ssh or telnet) and run ''candump <can-interface>'' | The first and most simple test on the router is to use candump provided by the can-utils package to verify a working environment and to see the generated CAN traffic. Login to your router (over ssh or telnet) and run ''candump <can-interface>'' |
| |
By default, candump provides the following information: | By default, candump provides the following information: |