Skip to content

05 The CLCapture program

Agustín Gimenez Bernad edited this page Jul 20, 2023 · 9 revisions

About the program

This program is only intended to be used by people that doesn't wants to use the LogicAnalyzer main software and use the device with PulseView. It captures the samples into a .CSV file that can be then imported into PulseView. Is not the best experience but at least it gives you the possibility to use the device without the main software. It also can be used if you have an OS that has no graphical interface, mostly Linux without a desktop manager.

The command line.

The command line is divided into "verbs" and "values". A "verb" indicates which operation you want to perform and a "value" specifies a required parameter to execute the verb.

There are three main verbs: "capture" which starts a capture on a device, "netconfig" which configures the WiFi parameters of a W device (of course it must be connected through USB to do this) and "help" which will show the command line help.

The capture verb

To start a capture you must use the "capture" verb and provide eight values:

  • value pos. 0 Required. Device's serial port or IP address and port.
  • value pos. 1 Required. Desired sampling frequency.
  • value pos. 2 Required. List of channels to capture (channels sepparated by comma, can contain a name adding a semicolon after the channel number, no spaces allowed).
  • value pos. 3 Required. Number of samples to capture before the trigger.
  • value pos. 4 Required. Number of samples to capture after the trigger.
  • value pos. 6 Required. Number of bursts to capture (0 or 1 to disable burst mode).
  • value pos. 6 Required. Trigger definition in the form of "TriggerType:(Edge, Fast or Complex),Channel:(base trigger channel),Value:(string containing 1's and 0's indicating each trigger chanel state)".
  • value pos. 7 Required. Name of the output file.

For example, if we want to start a capture at 1Mhz, on COM3, capturing the first two channels with names "SDA" and "SCL", capturing 512 samples before the trigger and 1024 after the trigger, without using bursts, and using a positive edge trigger on channel 5 we would use this command line:

CLCapture capture COM3 1000000 1:SDA,2:SCL 512 1024 0 "TriggerType:Edge,Channel:5,Value:1" capture.csv

If we would like to use a W connected through WiFi, using a complex trigger to match the pattern "1101" starting at channel 5 we would use this command line:

CLCapture capture 192.168.0.45:4545 1000000 1,2,3,4 512 1024 "TriggerType:Complex,Channel:5,Value:1101" capture.csv

IF you want to know the limitations of the fast and complex triggers refer to the LogicAnalyzer program section.

The netconfig verb

Before using a Pico W through WiFi you need to connect it at least once to a computer through USB and configure the parameters of the access point to be used. To do this using CLCapture you use the "netconfig" verb.

This verb requires these values:

  • value pos. 0 Required. Device's serial port.
  • value pos. 1 Required. Access point name.
  • value pos. 2 Required. Access point password.
  • value pos. 3 Required. Device IP address.
  • value pos. 4 Required. Device TCP port.

The Pico has been configured to use WPA2, if you need to support a different cypher scheme then you will need to modify the firmware and change it (in any case I wouldn't recommend any other as the other schemes like WPA1 or WEP are insecure).

For example, this would configure the W to connect to an access point called "MyPoint" and will set-up the pico at IP 192.168.0.45 port 4545:

CLCapture netconfig COM3 MyPoint MyPassword 192.168.0.45 4545

The WiFi settings are stored on the Pico's flash so they are persistent, you only need to execute this once unless you want to change the parameters.