I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
How Do I Use a Beagle I2C/SPI Protocol Analyzer with Wireshark for IPMI Analysis?
Rena Ayeras

Question from the Customer:  I am working on a new project and after reading your article Did You Know That a Beagle Protocol Analyzer Can Be Integrated with Wireshark or ARM-based Hosts?, it looks like the Beagle I2C/SPI Protocol Analyzer could do the job. To be sure this is the right tool, I have some questions:

  • For IPMI analysis, can I export data from the Beagle I2C/SPI analyzer into Wireshark?
  • Could I use the Data Center Software for sending the data in the format of ASCII HEX? I didn’t find that option. It looks like I could use the open source srec utility to convert the data from binary to ASCII hex.
  • What is the process for exporting IPMI data from the Data Center Software into Wireshark?
Response from Technical Support:

Thanks for your questions! Many customers have successfully used the Beagle I2C/SPI analyzer to import data into Wireshark.  Wireshark's wiki provides information about transporting byte-level data. Here is a diagram that provides an overview about IPMB packets:

Request and receive IPMP packets Format of IPMB Packet

Source: Wireshark

Wireshark also provides a utility that enables you to capture IPMB bus data with the Beagle I2C/SPI analyzer, and then load the resulting file into Wireshark. The utility file you will need is beagle_i2c_analyzer.tar.gz, which includes an informative readme.txt file. You will not need the open source srec utility.

Using the Wireshark Patch File

This section shows you how to set up and start using the patch file (beagle_i2c_analyzer.tar.gz). We recommend opening two terminals.

  • The first terminal is for setting up and running the program.
  • The second terminal is for displaying the data captures by Beagle I2C/SPI analyzer. Without a second terminal, the captured data will instead be printed to a file; it will not be displayed for viewing.

Set Up and Execute

Download the file, then compile the program with the following command:

make

Afterwards, to remove all the executable files, enter:

make clean

Execute the program i2c_analyzer with the following command:

./i2c_analyzer  -[option]  [option argument]  max_packet_len  num_even  0  1...

-[option] is the option that you choose to use, such as quiet mode, debug mode, etc. Where to access information about the options is provided in a following section, “More Information About Wireshark”.

[option argument] is the argument that will follow after the -[option] is made. Here are some examples:

 ./i2c_analyzer -v 3 0 1 2

./i2c_analyzer -q 0

./i2c_analyzer -h

max_packet_len is the maximum size of the packet that you want to capture in bytes, such as 32, or 64 or other size values

num_even is the number of the packets that you want to capture.

0 indicates an infinite number of packets.

0 is the Beagle I2C/SPI analyzer on port 0. If you have using only one analyzer, your command may stop here.

1 … indicates the next port number(s) for the other Beagle analyzers that you are using. The port number increases sequentially according to the device that is connected to the program.

Stop Capture and Read Data

To stop capturing, simultaneously press the keys Ctrl and C

After completing the last capture, the Beagle I2C/SPI analyzer(s) will stop sniffing and create the file hexdump_bg, which will be stored in your current directory. With the following command, hexdump_bg is used with Wireshark to generate a pcap file:

text2pcap           -t            "%D %H%M%S."              -l 199     hexdump_bg               ipmbfile.pcap

This command builds a file that contains IPMB matching packets that were captured from the Beagle I2C/SPI analyzer. The name of this file is ipmbfile.pcap and is stored in your current working directory. This file can be opened with Wireshark to see the detailed information of your packets.

More Information About Wireshark

To learn more about text2pcap, enter the command:

text2pcap -h

To learn more about the sniffing device aasniff enter the command:

 ./i2c_analyzer -h

This command populates a list of user manuals on the screen that provide details about using each option.

 

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.

Request a Demo