Command-Line or API access? Don't want to use GUI.

I am working with the ChipWhisperer Lite board on a project involving taking ~100 captures with 256 configurations, so ~25,600 total captures. This is too much with a graphical interface. So, is there an API? I’d like to be able to load a Python module or two, connect to the board, set a few parameters, and set a directory for the captures to be stored, and repeat.

However, from what I can see so far, the functional code seems to be tied to the GUI. Is this the case? Can I use the code as an API and write my own Python scripts without needing a GUI? If so, where should I look to get started?
Thanks :exclamation:

Hi Richard,

I have your concern too !
The project at folder: “openadc\controlsw” seems to be a basic example of a capture sw, maybe you could use it.
A workaround that you can do is to change the configuration programmatically, each time that you change in the GUI a setting it is passed as a string to the respective object, there is a window at ChipwhispererCapture (left-bottom corner) that show them. Perhaps you can modify the code of some button of CWCapture to performs your captures while changing the configuration programmatically…

Hello,

The code uses a GUI framework (PySide). This means even if using the API it pops up the GUI, however you are still able to access the code via a Python script. There are a few examples of that already, see for example this file: assembla.com/spaces/chipwhi … alxmega.py

Note if connects to the capture hardware, sets some parameters, and can optionally run the capture and save the results (those lines are commented out). If you run that script as a Python file it will do everything requested. There are some other examples in that directory and at assembla.com/spaces/chipwhi … g-examples

You can modify that to run the configurations with different settings, indeed I’ve done that to perform the analysis with a wide range of options and saving the different project files/data. If there is specific options you need please let me know!

But you can run the program as you wish. It does seem a little odd at first since the GUI always pops up, but you can safely ignore that when using the program via a script. Because the PySide framework was used for a lot of underlying features (i.e. signals/slots, timers) the main window always pops up even when running from the API. I’ve used this scripting ability (i.e. running from another Python file) for a huge amount of automated data collection.

-Colin