Skip to main content
Version: 1.3

CLI reference

Command reference for the SiFi Bridge CLI 1.3, verified against 1.3.4.

You are reading the 1.3 documentation

SiFi Bridge 2.0 reworked the command set substantially. Device managers were replaced by real sessions, command <name> was split into individual commands such as start, stop and power-off, and every configure subcommand moved from positional arguments to named flags. If you are on 2.0 or later, see the current CLI reference.

Overview​

The SiFi Bridge REPL provides an interactive interface for managing and controlling SiFi Labs devices. It outputs responses in JSON (use -p/--pretty for pretty-printed JSON).

At any point, use help [command] to show a command's help, including its arguments and accepted values.

Device managers​

1.3 organises work around device managers: named slots, each handling a single device. SiFi Bridge creates a default manager at startup, and commands apply only to the active manager. Use new, select and delete to manage them.

The default manager is default-1

The CLI's own help text says the startup manager is named device-1, but 1.3.4 actually creates one called default-1 — which is what appears in the id field of every response and data packet.

Command chaining​

Multiple commands can be chained on one line, separated by semicolons:

> connect; show; command start-acquisition

Device manager commands​

new​

Create a device manager, which also becomes the active manager.

new <NAME>

Arguments:

  • <NAME> — Device name

delete​

Delete a device manager. If it was the active one, another is selected. The last remaining manager cannot be deleted.

delete <NAME>

select​

Select which device manager subsequent commands apply to.

select <NAME>

Device commands​

list​

List devices from a given source.

list <FROM>

Arguments:

  • <FROM> — one of ble, serial, devices

connect​

Connect to a device via BLE.

connect [HANDLE]

Arguments:

  • [HANDLE] (optional) — Connection handle:
    • Empty: auto-connect to a device
    • BLE device name (e.g. BioArmband)
    • Windows/Linux: BLE MAC address (e.g. 00:11:22:33:44:55)
    • macOS: BLE UUID (e.g. 00001122-3344-5566-7788-99AABBCCDDEE)

disconnect​

Disconnect from the current device.

disconnect
No handle argument in 1.3

disconnect takes no arguments — it always acts on the current manager's device. The optional handle was added in 2.0.

show​

Print device information for the current device, including its complete configuration, as JSON.

show
Renamed in 2.0

This command is called info from 2.0 onwards.

command​

Send a command to the current device. In 1.3 this single command covers acquisition control, LEDs, the motor, memory and power — everything that 2.0 splits into separate top-level commands.

command <COMMAND>

Accepted values:

CommandNotes
start-acquisitionStart acquisition
stop-acquisitionStop acquisition
set-ble-power
set-filtering
erase-memory
download-memoryDownload on-board memory over BLE
start-status-update
stop-status-updateFirmware 1.3+ only
open-led1, open-led2Turn an LED on
close-led1, close-led2Turn an LED off
start-motor, stop-motor
power-off
deep-sleep
set-ppg-currents
set-ppg-sensitivity
set-emg-mains-notch
set-eda-freqFirmware 1.1+ only
set-eda-gainFirmware 1.1+ only
download-memory-serialFirmware 1.2 only, unused
test-memoryFirmware 1.3+ only
invalidSpecial firmware

Examples:

> command start-acquisition
> command stop-acquisition
> command open-led1
> command power-off

serial​

Download memory from a device via a serial port, which is significantly faster than BLE.

serial <PORT>

Arguments:

  • <PORT> — Serial port to use (e.g. /dev/ttyACM0, COM3)

plugin​

Add a plugin, routing selected data streams to it.

plugin [OPTIONS] <PATH>

Arguments:

  • <PATH> — Path to the plugin file

Options:

  • --ecg, --emg, --eda, --imu, --ppg — send that stream to the plugin
  • --other <OTHER> — send custom data to the plugin
Removed in 2.0

The plugin mechanism does not exist in SiFi Bridge 2.0.

lsl​

Print information about SiFi Bridge's Lab Streaming Layer integration.

lsl

LSL streaming itself is enabled with the top-level --lsl flag. Note that LSL support is a compile-time feature: official releases include it, but a binary built from source without the feature will not offer --lsl.


Configuration commands​

configure​

Configure the current device.

configure <COMMAND>

Subcommands: channels, sampling-rates, ecg, emg, eda, ppg, filtering, memory, low-latency-mode, ble-power.

Positional arguments, not flags

Every 1.3 configure subcommand takes positional arguments and requires all of them. 2.0 replaced these with optional named flags, so 2.0 syntax such as configure ecg --fs 500 is not valid here.

configure channels​

Set the active channels. All five states are required, in order.

configure channels <ECG> <EMG> <EDA> <IMU> <PPG>

Each takes off or on.

Example:

# ECG and IMU on, everything else off
> configure channels on off off on off

configure sampling-rates​

Set channel-wise sampling rates. All five are required, in order.

configure sampling-rates <FS_ECG> <FS_EMG> <FS_EDA> <FS_IMU> <FS_PPG>

Example:

> configure sampling-rates 500 2000 40 50 50

configure ecg​

Configure the ECG bandpass filter.

configure ecg <FP_LOW> <FP_HIGH>

Example:

> configure ecg 0 30

configure emg​

Configure the EMG filters.

configure emg <FP_LOW> <FP_HIGH> <F_NOTCH>

Arguments:

  • <FP_LOW>, <FP_HIGH> — bandpass cutoffs in Hz
  • <F_NOTCH> — mains notch: off, on50, or on60

Example:

> configure emg 20 450 on50

configure eda​

Configure the EDA filters and excitation frequency.

configure eda <FP_LOW> <FP_HIGH> <FREQ>

Arguments:

  • <FREQ> — signal frequency in Hz, 0 for DC

Example:

> configure eda 0 5 0

configure ppg​

Configure PPG LED currents and sensitivity.

configure ppg <I_IR> <I_RED> <I_GREEN> <I_BLUE> <SENS>

Arguments:

  • <I_IR>, <I_RED>, <I_GREEN>, <I_BLUE> — LED currents in mA
  • <SENS> — low, medium, high, or max

Example:

> configure ppg 9 9 9 9 medium

configure filtering​

Enable on-board filtering for all biochannels.

configure filtering <STATE>

<STATE> is off or on.

configure memory​

Set the memory mode. Data can be stored in the device's internal memory and/or streamed over BLE to the host.

configure memory <MODE>

<MODE> is streaming, device, or both.

Note: BioArmband only supports streaming.

configure low-latency-mode​

configure low-latency-mode <STATE>

In this mode a single BLE packet contains data from all enabled channels as it comes in. Only available on certain devices — ask SiFi Labs about compatibility.

Renamed in 2.0

Called configure low-latency from 2.0 onwards.

configure ble-power​

configure ble-power <POWER>

<POWER> is low, medium, high, or max.

max removed in 2.0

2.0 accepts only low, medium and high.


Utility commands​

help​

Display help for the REPL or a specific command.

help [COMMAND]

Examples:

> help
> help connect
> help configure ecg

quit​

Exit the REPL. Ctrl+C and Ctrl+D also work.

quit

Invocation options​

sifibridge starts in REPL mode by default.

Options:

# Pretty-print JSON output
./sifibridge --pretty

# Bind a TCP port for input (remote control)
./sifibridge --tcp-in 127.0.0.1:5000

# Send sensor data to a TCP port
./sifibridge --tcp-out 192.168.1.100:8080

# Send sensor data to a UDP port
./sifibridge --udp-out 192.168.1.100:9000

# Save sensor data into CSV files
./sifibridge --csv-out ./data

# Send sensor data to Lab Streaming Layer
./sifibridge --lsl

# Disable sending data to stdout
./sifibridge --no-stdout-data

# Increase / decrease logging verbosity
./sifibridge -v
./sifibridge -q
--csv-out removed in 2.0

2.0 drops --csv-out in favour of the buffering subsystem and its buffer export command.

Subcommands:

  • repl — Read-Eval-Print Loop mode (the default when no subcommand is given)
  • ble — BLE commands
  • serial — Serial commands
  • completion — Generate shell completion scripts