
Image by Gerd Altmann from Pixabay
Question from the Customer:
I have a question about the Beagle I2C/SPI Protocol Analyzer, which I am using with Data Center Software. I have a lot of SPI data to capture and review. I need to save the raw data as plain text on a hard drive. How can I do that?
Response from Technical Support:Thanks for your question! This can be done with our Beagle Software API. We have an example script that continues to save data to the hard drive until you press a key on the keyboard. You can modify this program as needed.
Overview of Saving Data to a Hard Drive
Several functional scripts are provided with Beagle Software API. The script that we are using for your setup is capture_i2c_disklogs.c. The following are steps to modify the program, which refer to the numbered lines of code in that script.
You will need a text editor and Microsoft Visual Studio for building the file. The executable file will be run in a command window.
- Download Beagle DLL and place it in a PATH environmental variable, or in the location of .c file of execution and location of the built executable.
- The default location for saving log files is C:/Beagle_Logs/capture_i2c.txt. To change the location, open c and edit the location in line no. 287.
- In line no. 328, edit the location in the printf statement.
- Use Microsoft Visual Studio to build the file.
- Run the program. Navigate to the location of the executable, open a command window, and execute the following command:
>> <project name which contains capture_i2c_disklogs.c> <max_packet_len> <num_events>
- For example: Capture_i2c 100 20
- Note, to capture indefinitely, set num_events=0.
- The Beagle I2C/SPI analyzer will start capturing data, which is logged in the specified file. Here is an example of what you will see in the command window.
- To stop the capture, press any key during command line execution. The capture will be stopped abruptly. End time will be displayed.
This is a basic setup. You can continue to modify the script for exactly what you need.
We hope this answers your question. 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.