Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture/sniff Can-messages?

Hello,

i´m using a can-interface that is programmed by a windows-program.

The usb can-interface goes to the DUT.

Now i need to capture the messages that are send and read between the two.

Does someone know a program that can do this? (Something like wireshark for ethernet.)

 

Thanks for all help

0 Kudos
Message 1 of 4
(6,802 Views)

NI's CAN monitor works pretty well for this (you will need a NI CAN device of course), but it will not tell you who sent the message (usually done via the CAN protocol that is used, such as J1939 where the source and sometimes the destination address is encoded into the ArbID).  The monitor display shows ArbID, # data bytes, data bytes, and msg rate (which obviously does not work for non-periodic for multi-frame messages).

0 Kudos
Message 2 of 4
(6,800 Views)

Yesm i know the Monitor. But im looking for something like a command-line-tool that captures the messages and stores them automatically into a file.

Then later in another program i want to evaluate this file.

0 Kudos
Message 3 of 4
(6,797 Views)

I don't know of a command line tool, but NI's bus monitor will also capture to a file.  I always use NI's monitor for a quick look at the bus, but I wrote my own code to collect data to the same .NCL file-format as NI's bus-monitor or (depending on the need) decode the msgs on the fly and save to a .csv file every 5 seconds.

0 Kudos
Message 4 of 4
(6,795 Views)