--- title: SSR Shell Reference subtitle: Reference Manual models: SSR-1, SSR-1U, SSR-SDU, SSR-LC firmware: 3.0 revision: "-" date: 2026-11-22 --- # Introduction The shell is a text command interface to the SSR serial data loggers. From a terminal program on a PC, or from any device that can send and receive text on a serial port, the shell gives access to the logger's status, its configuration, the real-time clock, and the files on its memory card. ## About This Document This document describes the shell in firmware 3.0 on every SSR model. Most commands work the same way on every model. Where a command or option depends on the model, the table below and the command's description say so. Table: Commands and Options That Depend on the Model | Command or option | SSR-1 | SSR-1U | SSR-SDU | SSR-LC | |---|:---:|:---:|:---:|:---:| | Channels | 1 – 3 | 1 – 4 | 1 – 4 | 1 | | `config func` | yes | yes | yes | no | | `config p19` | yes | yes | yes | no | | `config usben` | no | yes | yes | no | | `card test` | yes | yes | yes | no | | Path template length ([Path Templates](#path-templates)) | 44 or 29 | 44 | 44 | 29 | Note: The SSR-1 accepts 44-character path templates on SSR1L hardware and 29 on SSR1 hardware. The `ver` command shows the hardware. ## Related Documents Table: Related Documents | Document | Contents | |---|---| | User's Manual for your model | Hardware, connectors, recording functions, and specifications | | SSR Control Protocol Reference | The control protocol, including file access (not available on the SSR-LC) | | AN003 – Card Access with ssrftp | Copying files to and from the card over a serial port (SSR-1 on SSR1L hardware, SSR-1U, SSR-SDU) | | Flash Update Utility User's Guide | Updating the logger firmware | ## Conventions Command descriptions use the same notation as the shell's own help text: Table: Notation | Notation | Meaning | |---|---| | `[ ]` | Optional. `dir [path]` can be typed as `dir` or `dir /logs`. | | `{ \| }` | Choose one of the items separated by `\|`. `{on \| off}` means type `on` or `off`. | | `< >` | A value to fill in, such as `` or ``. | In examples of terminal sessions, `>` is the shell prompt and what follows it on the same line is typed by the user. Everything else is printed by the logger. ```console >date 20261020 ``` # Reaching the Shell ## The Shell Channel The shell runs on one serial channel at a time. A channel presents the shell when its function is `shell`, or when its function is `recshell` and the shell is requested ([RecShell](#recshell)). Only one channel can be set to `shell`, `recshell`, or `control`. Table: Shell Channel as Shipped | Model | Shell channel | Function | |---|---|---| | SSR-1 | Channel 1 | `shell` | | SSR-1U | Channel 4 | `shell` | | SSR-SDU | Channel 4 | `shell` | | SSR-LC | Channel 1 | Always `recshell`, requested with the SH pin | Connect a terminal program to the shell channel and set it to the channel's line settings: 115200 baud, 8 data bits, no parity, and 1 stop bit unless they have been changed. Use no flow control. When the logger starts, the shell prints a banner and a prompt: ```console SSR-1U Shell [Firmware 3.0.0] > ``` Press Enter at any time to get a new prompt. To move the shell to another channel, set the current shell channel to `record` (or `disabled`), set the new channel to `shell`, save, and reset. The change takes effect at the reset, so the shell stays on the current channel until then: ```console >config 4 func record >config 1 func shell >config save >reset ``` ## Programs on the Shell Channel The shell channel also accepts control protocol packets, so a program on the PC, such as the ssrftp file transfer program, can use the channel the terminal uses, with no change of settings. Close the terminal program first: only one program at a time can open a COM port. The packets are answered while the shell waits at its prompt; a packet sent while a command is running gets no answer. A terminal never sends a packet, so typing is not affected. `config control off` turns this off ([config control](#config-control)). The packets are described in the *SSR Control Protocol Reference*. ## RecShell A channel set to `recshell` records like any record channel, and presents the shell while the shell is *requested*. This lets one serial port carry both the data being recorded and, when needed, the shell. While the shell is active, data received on the channel goes to the shell, not to the file. The file stays open, and recording resumes when the request ends. Table: What Requests the Shell on a RecShell Channel | Model | Request | Applies to | |---|---|---| | SSR-1, SSR-1U, SSR-SDU | Pin 19 of the main connector held low, with `config p19 shell` | Any channel set to `recshell` | | SSR-SDU | Power present on the channel 4 connector | Channel 4, when it is the RecShell channel | | SSR-LC | The SH pin held low | Channel 1, which is always RecShell | A change in the request must be steady for 250 ms before the shell is presented or withdrawn. Each time the shell is presented it starts a new session: the banner and a fresh prompt, with anything partly typed discarded. While the shell is active, the channel's green LED is lit steadily for one second in every two, superimposed on normal LED activity. A channel can be set to `recshell` only when something can request its shell; otherwise the shell answers with an error. On the SSR-1, SSR-1U, and SSR-SDU, set `config p19 shell` first ([config p19](#config-p19)). ## Capturing the Shell at Startup When no channel presents the shell, for example when every channel is set to record, the shell can be *captured* on any channel during the first moments after power is applied. Capture works on every channel at 115200 baud, 8 data bits, no parity, and 1 stop bit, whatever the channel's configured settings. 1. Connect a terminal to the channel at 115200 baud, 8 data bits, no parity, 1 stop bit. 2. Apply power, and type `config` as the logger starts. The first letter must arrive within 800 ms of the start, and each of the others within 800 ms of the one before. 3. The logger replies with four upper-case letters, for example `Enter QHKT in lower case.` Type the same letters in lower case (`qhkt`) within 5 seconds. 4. The logger prints `Captured. Entering shell.` and the shell prompt. When you cannot see the moment power is applied, for example when other equipment switches the logger on, type `z` repeatedly instead, until the logger echoes it, and then type `config`. Each echoed `z` keeps the capture open for another 800 ms, up to five times. The capture attempt ends, and the logger starts normally, at a pause longer than the time allowed, or at a wrong character: before `config`, anything other than `z`; after it is begun, anything other than its next letter. A captured channel presents the shell until the next reset, whatever its configured function. Its line settings and function can be changed and saved from the captured shell and take effect at the next reset. # Using the Shell ## Entering Commands Type a command and press Enter. Commands and option names are typed in lower case as shown in this document; the values of parity and yes/no settings can be typed in either case. File names on the card are not case sensitive. Several commands can be entered on one line, separated by semicolons: ```console >date 20261020; time 143000; status ``` The shell ignores bytes 0x80 and above: commands and file names use ASCII characters. ## Line Editing and History The shell keeps a history of recent commands and accepts the editing keys in the table below. Where a terminal program does not send the arrow and Home or End keys, use the Ctrl key combination. Table: Line Editing Keys | Key | Or Ctrl+ | Action | |---|---|---| | Up arrow, Down arrow | P, N | Previous or next command in the history | | Home, End | A, Z | Move to the start or end of the line | | Right arrow, Left arrow | K, L | Move forward or back one character | | Ctrl+Right arrow, Ctrl+Left arrow | F, B | Move forward or back one word | | Backspace | | Delete the character before the cursor | | Tab | I | Complete a file or directory name ([File Name Completion](#file-name-completion)) | ### File Name Completion Pressing Tab while typing a path completes the file or directory name from the names on the card: - If one name matches, the shell types the rest of it, followed by `/` for a directory or a space for a file. A name that contains a space is put in double quotes. - If several names match, the shell types as much as they all have in common. When they have nothing more in common, Tab lists them (directories with `/`) and then types the line again so that you can go on. - If nothing matches, the terminal beeps. Case is ignored when matching, and the name is completed as it is on the card. Command names are not completed, nor a word that already contains `*`, `?`, or `"`. When the card cannot be read (no card, ejected, or with USB), Tab only beeps. ```console >cd lo >cd logs/ ``` ## Getting Help `help` (or `?`) lists the commands and summarizes the editing keys. Typing `?` after a command, or after part of a command, prints its syntax and a short description: ```console >date ? Usage: date [yyyymmdd] If the date command is used without an argument, the current device date is printed in the form yyyymmdd. ... ``` ## Values - **Numbers** are decimal. - **Booleans** (yes/no settings) accept `y`, `yes`, `t`, `true`, or `on` for yes, and `n`, `no`, `f`, `false`, or `off` for no, in upper or lower case. - **Paths** name a file or directory on the card. A path that starts with `/` is absolute, from the root directory of the card. Any other path is relative to the current directory ([pwd](#pwd)). `.` is the current directory and `..` its parent. `/` and `\` are both accepted as separators. Long file names of up to 127 characters are supported. Enclose a path that contains spaces in double quotes, as in `cat "/test run/c1.dat"`. A path to a directory may end with a separator (`cd logs/`), as file name completion leaves it. `del` and `dir` accept wildcards ([Wildcards](#wildcards)). ## Wildcards `del` and `dir` accept the wildcards `*`, which matches any number of characters (including none), and `?`, which matches exactly one, in the last name of the path: ```console >dir /logs/c1*.dat >del /logs/20261020/*.tt ``` - Wildcards are allowed only in the last name: `/logs/c1*.dat`, not `/l*/c1.dat`. - Case is ignored. `.` is an ordinary character, so `*.*` matches only names that contain a dot; use `*` for every name. - Matching is on the long file name. - A path cannot start with `?`, because `del ?` asks for help. To match from the start of a name in the current directory, write `./?1.dat`. ## Messages When a command cannot be carried out, the shell prints a line that starts with `ERR:` and gives the reason, for example `ERR: Invalid baud rate.` or `ERR: File not found.` A command line that cannot be understood is answered with a `^` under the point where it stopped making sense, followed by `cmd err`, or `fname err` for a file name that is not valid: ```console >config 2 baud fast ^cmd err ``` # Command Summary Table: Shell Commands | Command | Aliases | Purpose | |---|---|---| | [help](#help) | ? | List commands and editing keys | | [status](#status) | stat | Clock, battery, record inputs, and channel status | | [ver](#ver) | version | Firmware version and unit identity | | [diag](#diag) | | Support information: memory, last reset, card, and recording figures | | [date](#date) | | Show or set the date | | [time](#time) | | Show or set the time | | [reset](#reset) | | Restart the logger | | [cls](#cls) | clear | Clear the terminal screen | | [chdir](#chdir) | cd | Change the current directory | | [mkdir](#mkdir) | md | Create a directory | | [del](#del) | rm | Delete files, or an empty directory | | [ren](#ren) | mv, rn | Rename or move a file or directory | | [dir](#dir) | ls | List a directory, or the matching entries | | [pwd](#pwd) | | Show the current directory | | [touch](#touch) | | Update a file's time stamp, or create an empty file | | [df](#df) | | Card size and free space | | [sz](#sz) | | Send a file to the terminal with ZMODEM | | [cat](#cat) | | Show a file as text | | [head](#head) | | Show the start of a file | | [tail](#tail) | | Show the end of a file, or follow a recording | | [hd](#hd) | hexdump | Show a file in hexadecimal | | [less](#less) | more | Page through a file | | [card](#card) | | Card state; eject, mount, or clear the card | | [card test](#card-test) | | Card performance test (not SSR-LC) | | [config](#configuration) | cfg | Show, change, save, and load the configuration | # System Commands ## help ```syntax help ``` Lists the shell commands, the line editing keys, and the notation used in the help text. `?` is the same as `help`. ## status ```syntax status ``` Shows the clock, the real-time clock battery, the record command inputs, and the state of each channel, one row a channel. A blank line ends the output. ```console >status Device Status Clock: 2026-11-21 14:30:12.402 DOY: 325 RTC Battery: 3.02 V Record Command Inputs: Digital: Low PWM State: Invalid Width: 0 Period: 0 Signal: none USB Enable not requested, access disabled. Ch rec func file status file path 1 y record Recording /c1143005.dat 2 n record Closed - 3 n record Closed - 4 n shell Closed - ``` Table: status Output | Line or column | Meaning | |---|---| | Clock, DOY | Date, time, and day of year from the real-time clock | | RTC Battery | Voltage of the clock backup battery, or `none` if no battery is fitted. A battery that reads well below its rated voltage should be replaced. | | Digital | State of the digital record input DI | | PWM State | The record command state from the pulse input PI: `1 ms` or `2 ms`, or `Invalid` until the first pulse within 250 µs of 1 ms or 2 ms after power-up. It holds when the signal goes, so a loose connection does not stop recording. | | Width, Period | The pulse width and period measured on PI, in microseconds; 0 and 0 with no signal | | Signal | The input now: `yes` while valid pulses arrive (width 750–2250 µs, period 4–65 ms), `none` from 65 ms after the last pulse, or `out of range` | | USB Enable, access | SSR-1U and SSR-SDU only. Whether USB access is requested (see `config usben`) and whether the card is now with USB | | Card | Shown only after `card eject`: the card can be removed | | rec | `y` when the channel's command source is asking it to record | | func | The function the channel is performing now. It can differ from the configured function, which `config` shows, until the next reset. | | file status | `Closed`, `Building Path`, `Opening File`, `Recording`, or an error: `Path Translate Error`, `Building Path Error`, `Opening File Error`, `Disk Error`, `Disk Full` | | file path | The file being recorded, or the last one; `-` before the first. A long path continues on the next line. | ## ver ```syntax ver ``` Shows the firmware version and build, the unit's identity, and the highest baud rate the unit accepts. `version` is the same as `ver`. Quote these lines when contacting Slerj for support. A blank line ends the output. ```console >ver Firmware: 3.0.0 Build: Oct 28 2026 21:28:31 MK: Slerj HW: SSR1U MG: 6539453 MD: SSR-1U SN: 656 MV: 22T Max Baud: 236000 (standard) ``` Table: ver Output | Line | Meaning | |---|---| | Firmware, Build | Firmware version, and the date and time it was built | | MK | Make: Slerj | | HW | Hardware: SSR1, SSR1L, SSR1U, SSRSDU, or SSRLC | | MG | Manufacturing number | | MD | Model | | SN | Serial number | | MV | Model variant, the part number suffix. An `H` marks a high-speed unit (on the SSR-LC, `F`). | | Max Baud | The highest baud rate the unit accepts: 236000 on a standard unit, which covers 230400; 944000 on a high-speed unit, which covers 921600 | ## diag ```syntax diag ``` Shows information for Slerj support: the firmware, memory use, why the logger last restarted, the state of the card, and how the card has kept up with recording. Include the `diag` output, with the `ver` output, when reporting a problem. A blank line ends the output. ```console >diag Firmware Version 3.0.0, Build Nov 21 2026, 10:12:44 Max Baud: 236000 (standard) Memory (shell, rec, HS tasks): Task Stk Free: 1912 1404 1020 Task Stk Unused: 1184 880 700 Heap Free: 5120 Hist Free: 412 Last reset: PIN Option bytes: OPTR FFEFF8AA (SRAM2 parity check ON) Watchdog: PR 2 RLR 4095 (~2048 ms) Card: Status 0x0, needs init n, full n, errors [n 0, n 0, n 0, n 0] Recording figures since start: Longest write 61 ms, sync 112 ms, loop 118 ms (avg 3). Num Syncs: 1520, 0, 0, 0 Max RecQ: 1203, 0, 0, 0 (size 29999) Max RecQ Used: 4%, 0%, 0%, 0% ``` Table: diag Output | Line | Meaning | |---|---| | Firmware Version, Max Baud | As `ver` shows them, with the reason for the baud limit | | Memory | Free and never-used memory for the logger's internal tasks, for support | | Last reset | What caused the last restart: `PIN` the reset pin or power-up, `SFT` the `reset` command, `IWDG` the watchdog. Further lines appear after a fault. | | Card | The card's state flags: whether it needs initializing, whether it is full, and each channel's file error | | Recording figures | The slowest card write, file flush (*sync*), and recording pass (*loop*), the file flushes per channel, and the most data that waited for the card on each channel, in bytes and as a percent of the channel's buffer. They cover the time since the logger started, or since the start of the last `card test` (`since card test start`), which includes the test. A channel that reached 100% lost data. | Note: A field that has not been programmed is shown as `-`. ## date ```syntax date [yyyymmdd] ``` With no argument, prints the date as `yyyymmdd`. With a date, sets the clock to that date. The year must be from 2001 to 2099. ```console >date 20261020 >date 20261020 ``` > **Note:** The clock is not adjusted for daylight saving time. Set the time again when daylight saving time starts or ends, if the recordings should follow local time. ## time ```syntax time [hhmmss[a|p]] ``` With no argument, prints the time as `hhmmss` in 24-hour form. With a time, sets the clock to that time. The hour is in 24-hour form unless the time is followed by `a` or `p` for a 12-hour time: `time 023000p` sets 14:30:00. Setting the date or time also adds a time correlation packet to every time tagged archive being recorded, so timestamps in the archive follow the new time. ## reset ```syntax reset ``` Restarts the logger, as if power had been removed and applied. Recording stops and restarts according to the saved configuration. Changes that have not been saved with `config save` are lost. ## cls ```syntax cls ``` Clears the terminal screen. `clear` is the same as `cls`. # File Commands The file commands work on the memory card. FAT12, FAT16, FAT32, and exFAT cards are supported. ## chdir ```syntax chdir ``` Changes the current directory. `cd` is the same as `chdir`. The current directory is the root directory `/` when the shell starts. ```console >cd /logs/20261020 >cd .. >pwd /logs ``` ## mkdir ```syntax mkdir ``` Creates a directory. `md` is the same as `mkdir`. Directories in a channel's path template are created automatically when recording starts, so `mkdir` is not needed for them. ## del ```syntax del ``` Deletes a file, or a directory that is empty. `rm` is the same as `del`. To delete everything on the card, use `card clear` ([card](#card)). A file that is being recorded cannot be deleted: `del` answers `ERR: File in use (being recorded).` Stop the channel first, or let it move on to a new file. With a wildcard in the name ([Wildcards](#wildcards)), `del` deletes every matching file without asking, and says how many it deleted. Directories are not deleted but are counted. A file that cannot be deleted, such as one being recorded or one that is read-only, gets an error line with its name, and the other files are still deleted. If nothing matches, `del` answers `ERR: No match.` ```console >del /logs/*.dat ERR: c1143005.dat: File in use (being recorded). Deleted 11 of 12 files; left 1 directory. ``` ## ren ```syntax ren ``` Renames a file or directory or moves it to another directory on the card. `mv` and `rn` are the same as `ren`. A file that is being recorded cannot be renamed or moved: `ren` answers `ERR: File in use (being recorded).` ## dir ```syntax dir [path] ``` Lists a directory: the current directory if no path is given. `ls` is the same as `dir`. With a wildcard in the last name ([Wildcards](#wildcards)), lists only the matching entries; if nothing matches, nothing is listed. Each line shows the date and time the entry was last written, its attributes, its size, and its name. ```console >dir 20261020 14:30:04 a 2,184K c1143005.dat 20261020 09:15:22 d 0B logs ``` The attributes are `a` archive, `s` system, `h` hidden, `r` read-only, and `d` directory. Sizes of 10,000 bytes or more are shown in K (1024 bytes), M or G. ## pwd ```syntax pwd ``` Prints the current directory. ## touch ```syntax touch ``` Sets a file's or directory's time stamp to the current time. If no file of that name exists, creates an empty file. ## df ```syntax df ``` Prints the size of the card and the space available, in KB. ```console >df 15532032 KB total drive space. 13631488 KB available. ``` ## sz ```syntax sz ``` Sends a file to the terminal program with the ZMODEM protocol. Start `sz`, then start the ZMODEM receive in the terminal program if it does not start by itself. Tera Term (File, Transfer, ZMODEM, Receive) and the `rz` program of the lrzsz package on Linux are known to work. ```console >sz c1143005.dat Sending /c1143005.dat Transfer complete. ``` If the file cannot be sent, the shell gives the reason, for example `ERR: Not a file.` for a directory. `Transfer aborted.` means the terminal program cancelled or did not answer. > **Note:** The transfer runs at the shell channel's baud rate. At 115200 baud a file transfers at about 11 KB/s; for large files, remove the card and use a card reader, or on the SSR-1U and SSR-SDU use the USB connection or copy the files over the control protocol (*AN003 – Card Access with ssrftp*). # File Viewing Commands The viewing commands show the contents of a file on the card, including a file that is being recorded. A recording is written to the card in steps, so the end of a file being recorded is up to a few seconds behind the data arriving at the logger. `cat`, `head`, `tail`, and `less` show a file as text. Each line ending (CR, LF, or CR LF) is printed as CR LF, so data logged with CR line endings displays line by line. Bytes that are not printable ASCII or TAB are shown as `.`, so binary data cannot disturb the terminal; use `hd` to see the exact bytes. Pressing any key stops `cat`, `head`, `tail`, and `hd`. ## cat ```syntax cat ``` Shows the whole file as text. ## head ```syntax head [-n | - | -c ] ``` Shows the first 10 lines of a file, or the first `` lines with `-n`, or the first `` bytes with `-c`. `-` is short for `-n `: `head -3 c1143005.dat` shows the first three lines. ## tail ```syntax tail [-n | - | -c ] [-f] ``` Shows the last 10 lines of a file, or the last `` lines or `` bytes. `-` is short for `-n `, as for `head`. With `-f`, `tail` then keeps showing data as it is added to the file, until a key is pressed. This is a convenient way to watch a channel being recorded: ```console >tail -f /c1143005.dat ``` If data arrives faster than the shell channel can show it, for example a recording at a higher baud rate than the shell channel, `tail -f` skips ahead with a note so that the display stays current. ## hd ```syntax hd [-s [-]] [-c ] ``` Shows 256 bytes of a file in hexadecimal and ASCII, 16 bytes to a row, starting at the beginning of the file or at byte `` with `-s`. A negative offset counts back from the end of the file: `hd -s -256` shows the last 256 bytes, which is useful for seeing how a recording ended. `-c` sets the number of bytes; `-c 0` shows the rest of the file. `hexdump` is the same as `hd`. ```console >hd -c 32 c1143005.dat 00000000 24 47 50 47 47 41 2c 31 34 33 30 30 35 2e 30 30 |$GPGGA,143005.00| 00000010 2c 33 30 34 31 2e 31 32 33 34 2c 4e 2c 30 38 38 |,3041.1234,N,088| ``` ## less ```syntax less [-n ] ``` Shows a file a screen at a time, with long lines wrapped. `more` is the same as `less`. The screen is the size of the terminal window: `less` asks the terminal for its size when it starts and again after each screen, so a window that is resized takes the new size at the next key. A terminal that does not report its size gets 24 rows of 79 columns. `-n ` sets the number of rows instead. On a terminal that reports its size, moving one line forward or back scrolls the screen rather than drawing it again, which is quicker in a large window. Table: less Keys | Key | Action | |---|---| | Space, f, Page Down | Next page | | b, Page Up | Previous page | | Enter, j, Down arrow | Next line | | k, Up arrow | Previous line | | g, Home | Start of the file | | G, End | End of the file | | `g` or `G` | Line `` of the file (type the number, then g) | | `%` or `p` | `` percent of the way into the file | | q, Esc, Ctrl+C | Quit | The number shows on the status line as it is typed; Backspace corrects it, and any other key drops it. To find a line, `less` counts lines from the start of the file, which can take a few seconds in a large file; pressing a key stops the search. A percentage is found at once. # Card Commands ## card ```syntax card [eject | mount | clear | test] ``` With no argument, shows the state of the memory card: `mounted`, `none`, `not initialized`, `ejected`, or `with USB` (SSR-1U and SSR-SDU) while the card is in use over USB. Table: card Options | Option | Action | |---|---| | eject | Stops recording, closes every file, and powers the card off, so that it can be removed safely. The card mounts again when a card is inserted, or with `card mount`. | | mount | Mounts an ejected card without removing it. | | clear | Deletes every file and directory on the card, after asking for confirmation. Recording stops while it runs. | | test | Runs the card performance test ([card test](#card-test)). Not on the SSR-LC. | ```console >card eject Card ejected - safe to remove. It mounts again when a card is inserted, or with card mount. ``` After `card eject`, recording resumes when a card is mounted, according to each channel's command source. `card mount` answers `Card mounted.`; `card eject` or `card mount` when the card is already in that state shows the card's state. Table: card eject and card mount Errors | Message | Meaning | |---|---| | `ERR: No card.` | There is no card in the slot. | | `ERR: The card is with USB (config usben).` | SSR-1U and SSR-SDU: USB has the card ([config usben](#config-usben)). | | `ERR: The card did not eject (files still open).` | A file could not be closed. Try again, or remove power before removing the card. | `card clear` asks before deleting anything. Press `y` to go ahead; any other key, or no answer within 30 seconds, cancels it: ```console >card clear Delete every file and directory on the card? (y/N) y Card cleared: 42 files and 3 directories deleted. ``` `card clear` does not format the card. To format a card, use a PC and the SD Association's SD Memory Card Formatter. ## card test ```syntax card test [-b ] [-c ] [-t ] [-k] ``` Tests whether a card can keep up with recording. The logger records numbered test lines on one or more channels at the given rate, through the same path as real data, then reads the files back and checks every line. Use it to qualify a card or card type before deploying it, especially for high baud rates or several busy channels. `card test` is not available on the SSR-LC. Table: card test Options | Option | Meaning | |---|---| | -b | Data rate on each test channel, as a baud rate from 1200 to the unit's maximum. The default is the highest of 921600, 460800, 230400, and 115200 that the unit accepts. | | -c | Number of channels to test, from channel 1 up. The default is 3, or all channels if fewer. | | -t | Length of the test, 1 to 1440 minutes. The default is 30. See [Test Length](#test-length). | | -k | Keep the test files in `/cardtest`. Without `-k` they are deleted at the end. | The test asks for confirmation, then shows its progress on one line that is updated every second. Recording stops while the test runs, and the channels' serial data is not recorded. Pressing any key stops the test early; the lines written so far are still checked. ```console >card test Card test: 3 ch at 230400 baud for 30 min, 119 MB in /cardtest. Recording stops while it runs. Start? (y/N) y Any key stops it. Test 100% 0:00 left MaxQ 4021 3876 3990 Drops 0 Verify 100% 0:00 left 2950 KB/s Ran 30:00 of 30:00. Read back 118 MB in 0:41. Longest write 61 ms, sync 112 ms, loop 118 ms (avg 3). Ch Lines Dropped Missing Bad MaxQ Used (size 29999) 1 1296000 0 0 0 4021 13% 2 1296000 0 0 0 3876 12% 3 1296000 0 0 0 3990 13% PASS Test files deleted. ``` The result is `PASS` when every line was recorded and read back correctly. A failure gives the reason: Table: card test Results | Result | Meaning | |---|---| | PASS | The card kept up. Every line was recorded and read back intact. | | FAIL: lines dropped | The card fell behind and a channel's buffer filled, so lines were lost before they reached the card. Use a faster card, a lower rate, or fewer channels. | | FAIL: lines missing or damaged | Lines were written but did not read back correctly. The card is faulty. | | FAIL: card error | The card reported an error during the test. | | Not checked | The read-back did not finish. | The per-channel table gives the number of test lines, those dropped before reaching the card, those missing or bad when read back, *MaxQ*, the most data waiting to be written for the channel during the test, in bytes, and *Used*, MaxQ as a percent of the channel's buffer (the size in the heading). A low Used shows that the card has margin at that rate; 100% means the buffer filled and lines were dropped. The line above the table gives the slowest single write to the card, the slowest flush of a file to the card (*sync*), and the slowest pass of the recording through all channels (*loop*), with the average pass. Occasional long times are normal for a card; they matter when they approach the time a channel's buffer takes to fill at the test rate. `diag` shows the same figures after the test. The test needs free space for its files; if there is not enough, it says how much is needed. Each test file is limited to 4 GB on a FAT32 card. ### Test Length A card keeps up easily most of the time. What makes it drop data is an occasional slow moment, when the card pauses for its own housekeeping, and these are rare: a short test can pass a card that would drop data in real use. A longer test writes more data and gives those moments more chances to appear, so its MaxQ and Used are closer to the card's true worst case. - Use the default of 30 minutes, or longer, to qualify a card or card type. In Slerj's testing, 30 minutes found the same worst case as runs of several hours. - A shorter test is a quick check only. It can report more margin than the card has, and a card that passes it is not qualified. - Test at the rate and number of channels the logger will record. At high baud rates the margin is smaller, so a full-length test matters most there. - Results vary between cards of the same model, and between production runs. Qualify each new batch, and leave margin: a Used well below 100% on the full test. # Configuration The `config` command shows and changes the logger's settings. `cfg` is the same as `config`. ## Working and Saved Configuration Changes made with `config` take effect at once in the *working configuration*. They are kept across a reset or loss of power only after `config save` stores them in non-volatile memory. At startup the logger loads the saved configuration, or the factory defaults ([Factory Defaults](#factory-defaults)) if none is saved. Table: Configuration Commands | Command | Action | |---|---| | config | Shows the whole working configuration | | config save | Saves the working configuration | | config load | Replaces the working configuration with the saved one | | config erase | Erases the saved configuration. The working configuration is not changed; the factory defaults are used from the next reset. | | config leds {on \| off \| onx} | LED operation ([config leds](#config-leds)) | | config outputs {record \| react} | What the status outputs show ([config outputs](#config-outputs)) | | config tlformat {terse \| iso} | Timestamp format of tagged line files ([config tlformat](#config-tlformat)) | | config control {on \| off} | Control protocol packets on the shell channel ([config control](#config-control)). Not on the SSR-LC. | | config p19 {none \| leds \| shell} | Pin 19 function ([config p19](#config-p19)). Not on the SSR-LC. | | config usben {hi \| lo \| on \| off} | USB card access ([config usben](#config-usben)). SSR-1U and SSR-SDU only. | | config | Shows one channel's configuration | | config | Changes one channel's settings ([Channel Settings](#channel-settings)) | Changes to the line settings or function of the channel that is presenting the shell are saved but take effect at the next reset, so that the terminal stays connected. `config` shows whether the working configuration matches the saved one, the global settings, one row of settings for each channel, and each channel's path template. Each setting is shown as the word you type to set it. A blank line ends the output. On an SSR-1U as shipped: ```console >config Configuration (matches the saved copy) leds on outputs record tlformat terse control on p19 none usben high Ch baud line func source soft echo type mode size 1 115200 8N1 record -dig y n raw retry off 2 115200 8N1 record -dig y n raw retry off 3 115200 8N1 record -dig y n raw retry off 4 115200 8N1 shell -dig y n raw retry off Ch file path 1 c[chms].dat 2 c[chms].dat 3 c[chms].dat 4 c[chms].dat ``` Table: config Heading | Heading | Meaning | |---|---| | Configuration (matches the saved copy) | The working configuration is the saved one. | | Configuration (not saved: differs from the saved copy) | Something was changed and not saved. `config save` keeps it; a reset would bring back the saved configuration. | | Configuration (no saved copy: defaults at reset) | Nothing is saved, or it was erased. The factory defaults are used from the next reset. | `p19` does not appear on the SSR-LC, and `usben` appears only on the SSR-1U and SSR-SDU. In the channel table, *line* is the data bits, parity, and stop bits (`8N1`, `7E1.5`), *func* is the configured function, *soft* is the soft command, and *size* is `off`, the size in MB, or `hour`, `day`, or `week`. A `*` marks a setting the channel is not using yet: a function, or the shell channel's line settings, changed on the channel presenting the shell. A note under the table says that it takes effect at the next reset and, for a function, what the channel is until then. For example, after `config 1 func record` and `config 4 func shell` on a unit whose shell is on channel 1: ```console Ch baud line func source soft echo type mode size 1 115200 8N1 record* -dig y n raw retry off ... 4 115200 8N1 shell* -dig y n raw retry off * Takes effect at the next reset; until then Ch1 is shell, Ch4 is record. ``` `status` shows the function each channel is performing now. *file path* in `config` is the path template; in `status` it is the file the template made. `config ` shows one channel's row and path template, in the same form: ```console >config 1 Ch baud line func source soft echo type mode size 1 115200 8N1 record -dig y n raw retry off Ch file path 1 c[chms].dat ``` ## Global Settings ### config leds ```syntax config leds {on | off | onx} ``` `on` lights the status LEDs normally. `off` turns them off, which saves power. `onx` lights them for 10 seconds after power is applied, then turns them off. With `config p19 leds`, pulling pin 19 low enables the LEDs. While a RecShell channel presents the shell, the LEDs of every channel are enabled, whatever this setting. ### config outputs ```syntax config outputs {record | react} ``` Selects what the status outputs show: one output for each of channels 1 to 3 (S1 to S3) on the SSR-1, SSR-1U, and SSR-SDU, and the ST output on the SSR-LC. The setting applies to every output and is not affected by `config leds`. Table: Status Output Settings | Setting | The output | |---|---| | record | Is high while the channel is recording (factory default). | | react | Is intended to drive an external indicator LED that shows recording and activity, as described below. | With `react`, each output shows the state of its channel: - **Recording:** on, with a brief off flash when data arrives. - **Not recording:** off, with a brief on flash when data arrives, and a short blink every 4 seconds when the channel is idle and ready. - **Shell or control channel**, or a RecShell channel while its shell is active: on for 1 second, then off for 1 second with flashes for traffic. - **Card error or card full**, and on the SSR-1U and SSR-SDU while USB has the card: every output shows the red LED's pattern, whatever the channel is doing. ### config tlformat ```syntax config tlformat {terse | iso} ``` Selects the timestamp written at the start of each line of a tagged line (`tl`) file. The setting applies to every channel. Table: Tagged Line Timestamp Formats | Setting | Timestamp | Notes | |---|---|---| | terse | `YYMMDDhhmmss.sss` and a space | 17 bytes a line (factory default) | | iso | `YYYY-MM-DD hh:mm:ss.sss` and a comma | 24 bytes a line. ISO 8601, read as a date and time by Excel, MATLAB, and Python; the comma makes it a column of a CSV file. | A file that is being recorded keeps the format it was opened with; the next file uses the new one. For example, a line received at 14:30:05.123 on 20 October 2026 starts with `261020143005.123 ` in terse format and `2026-10-20 14:30:05.123,` in iso format. ### config control ```syntax config control {on | off} ``` Sets whether the shell channel also accepts control protocol packets ([Programs on the Shell Channel](#programs-on-the-shell-channel)). Any yes or no value is accepted ([Values](#values)). Not available on the SSR-LC. Table: config control Settings | Setting | The shell channel | |---|---| | on | Answers control protocol packets while the shell waits at its prompt (factory default) | | off | Presents the shell only | A channel set to `control` accepts packets whatever this setting is. ### config p19 ```syntax config p19 {none | leds | shell} ``` Sets the function of pin 19 of the main connector. Not available on the SSR-LC. Table: Pin 19 Functions | Setting | Function | |---|---| | none | Pin 19 is not used (factory default). | | leds | Pulling pin 19 low lights the LEDs when `config leds` is `off` or `onx`. | | shell | Pulling pin 19 low requests the shell on the RecShell channel ([RecShell](#recshell)). | `p19` cannot be changed from `shell` while a RecShell channel depends on it. ### config usben ```syntax config usben {hi | lo | on | off} ``` SSR-1U and SSR-SDU only. Selects when the card is handed to the USB connection. While USB has the card, recording stops on every channel; it resumes when the card is handed back. Table: USB Enable Settings | Setting | USB has the card when | |---|---| | hi | the USB EN (UEN) pin is high (factory default). `high` is also accepted. | | lo | the USB EN pin is low. `low` is also accepted. | | on | always, whatever the pin | | off | never, whatever the pin | With `on`, no channel can record. `config save` with `usben on` warns `Recording is disabled!` ## Channel Settings ```syntax config