Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
internal:can-tcpsockets-parsing [2018/02/05 12:38] – [Peaksystem PCAN-FMS Simulator] preisiginternal:can-tcpsockets-parsing [2018/02/06 08:03] – [Incoming RAW CAN Frames on the Router:] preisig
Line 17: Line 17:
  
 ===== 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:
Line 28: Line 28:
 To show a possible use of forwarding CAN Frames over Ethernet can-tcp-broadcast.are provides a TCP client that broadcasts all incoming CAN Frames to one or several servers that can be passed as arguments. The SDK API already provides several functions to interact with CAN (see ftp://share.netmodule.com/router/public/system-software/latest/NB_SDK_API_Manual.pdf).  To show a possible use of forwarding CAN Frames over Ethernet can-tcp-broadcast.are provides a TCP client that broadcasts all incoming CAN Frames to one or several servers that can be passed as arguments. The SDK API already provides several functions to interact with CAN (see ftp://share.netmodule.com/router/public/system-software/latest/NB_SDK_API_Manual.pdf). 
 The function start_can() sets required attributes to the can interface and sets up a raw socket descriptor that is used in the main part of the script. Additionally filtering of CAN Identifiers is possible via nb_can_setfilter() to specify which CAN frames shall be filtered out and which shall be passed to upper layers. The function start_can() sets required attributes to the can interface and sets up a raw socket descriptor that is used in the main part of the script. Additionally filtering of CAN Identifiers is possible via nb_can_setfilter() to specify which CAN frames shall be filtered out and which shall be passed to upper layers.
 +
 +//Please be aware// that extended use of filtering or processing on the router itself may affect the overall processing power. An advice would be, to do data processing on a more powerful backend according to ones needs. 
 +
  
 <code c from can-tcp-broadcast.are> <code c from can-tcp-broadcast.are>
Line 94: Line 97:
  
 {{:internal:sockettest-candump.jpg?600|}} {{:internal:sockettest-candump.jpg?600|}}
- 
-This way data processing could be done on a more powerful backend according to ones needs. Please be sure to check the load of the router to assure normal operation of the device. 
- 
 ===== Simple CAN Frame parsing (simple-can-parser.are) ===== ===== Simple CAN Frame parsing (simple-can-parser.are) =====
 An additional test was made to show a simple way of parsing CAN Frames. The example is based on checking for a specific PGN (parameter group number) and then get a SPN (supect parameter name) to display its value in human readable format which then gets logged in a file.  An additional test was made to show a simple way of parsing CAN Frames. The example is based on checking for a specific PGN (parameter group number) and then get a SPN (supect parameter name) to display its value in human readable format which then gets logged in a file.