logic_sniffer.py
User's Guide

logic_sniffer.py gets its run-time options from three different sources:
  1. configuration files
  2. Environment variables
  3. Command-line options

Command-line Options

logic_sniffer.py [--port=p][-p p] [--baud=b][-b b] [--tool=module][-t module] [--verbose][-v]
--port=port
-p port
port is the name your operating system gives to the serial port connecting to your OpenBench Logic Sniffer.
For example: --port=/dev/ttyACM0 for a Posix system, --port=COM0 on a Windows system.
--baud=baud
-b baud
baud gives the baud rate for the connection to your Open Bench Logic Sniffer.
For example: --baud=115200
--tool=tool_module
-t tool_module
tool_module represents the name of an analyzer tool module that will be imported by logic_sniffer.py .
For example: -t analyzer_tool_uart
--verbose
-v
calls for extra diagnostic printouts during the logic_sniffer.py execution.

Environment Variables

logic_sniffer.py will get run-time options from these environment variables, unless they are overridden by options in the command-line:
LOGICSNIFFER_BAUD
sets the baud rate to use in the connection with the Open Bench Logic Sniffer
LOGICSNIFFER_PORT
sets the port pathname or identifier to use in the connection with the Open Bench Logic Sniffer

Configuration Files

A file named .logicsnifferrc or logic_sniffer.ini can be placed in the user's HOME directory or in the current working directory where logic_sniffer.py is run. Options that are set in a configuration file will be overridden by equivalent environment variables or command line options. The contents of the file are as usual for a .ini file, with section headers introducing option settings. Headings and settings are:
analyzer
provides these items:
baud=bbb
bbb represents the baud rate for the connection to the Open Bench Logic Sniffer
port=pppp
pppp represents the pathname or device name for connecting to the Open Bench Logic Sniffer
sump_config=cccc
cccc represents the name of a .sump.ini file holding the initial configuration for the Open Bench Logic Sniffer
plugin name
describes a data analyzer plugin that will be loaded by logic_sniffer.py . name represents a mnemonic name that makes the plugin section header unique within the file. If no "module" item is given in the section, name will be used for the module name. All following items except "module" give configuration parameters for the specific plugin.
module=mmmm
mmmm represents the name of the module to be imported by logic_sniffer.py
option=value
option represents the name of a parameter specific to the module. value represents the option value that will be presented to the module.

An example of a logic_sniffer.ini file:

[analyzer]
port=/dev/ttyACM0
sump_config=uart-1.sump.ini
[plugin UART]
module=analyzer_tool_uart
pin=1
auto=1
[plugin analyzer_tool_spi]
sck=3
mosi=2
miso=2
nss=4
[plugin I2C]
module=analyzer_tool_twi
scl=1
sda=2