SSR-1 Firmware Release Notes

From 3.0.0, one firmware serves every SSR model, and these notes are
shared by all of them.  Notes for earlier SSR-1 firmware (legacy
hardware) follow them.

20261122 - v3.0.0

  One firmware for every SSR model: SSR-1L, SSR-1 (legacy hardware),
  SSR-1U, SSR-SDU, and SSR-LC.  It replaces all earlier firmware for these
  models.  Saved settings carry over when a unit is updated.  The SSR Shell
  Reference and the SSR Control Protocol Reference describe every command
  and message.

  NEW
  - Viewing files on the card from the shell: cat, head, tail, hd (hex),
    and less (a screen at a time), including a file being recorded.
  - Wildcards * and ? in del and dir.
  - Tab completes file and directory names in the shell.
  - card test: a card performance test.  Use it to qualify a card model
    before deployment.
  - config tlformat terse|iso: tagged line (tl) timestamps in the original
    terse form or in ISO 8601 form (YYYY-MM-DD hh:mm:ss.sss,), which
    spreadsheets and analysis tools read as a date and time.
  - status shows the RTC backup battery voltage.
  - RecShell channel function on every model: a channel records, and
    presents the shell while the shell is requested (config p19 shell:
    pin 19 low requests it; on the SSR-SDU, power on Ch4 also requests it on
    Ch4).  The SSR-SDU had this in 2.3.x.
  - config outputs record|react: the status outputs show recording (as
    before), or recording and activity patterns for indicator LEDs.
  - diag: support information (firmware, memory, the last reset, the card,
    and the recording figures) to send Slerj when asking for help.
  - ver: shows the firmware version, the unit's identity (model, hardware,
    serial number), and its highest baud rate, without a reset.
  - touch creates the file if it does not exist.
  - card: shows the card's state; card eject makes the card safe to
    remove; card mount mounts it again; card clear deletes everything on it
    after asking.
  - Control protocol: every config setting can be set and read, as in the
    shell; new messages for card eject and mount, one channel's status, the
    RTC battery, the firmware version, and the unit identity.  (Not on the
    SSR-LC, which has no control protocol.)
  - Control protocol file access (SSR-1L, SSR-1U, SSR-SDU): list, read,
    write, rename, and delete files on the card from a host, with streaming
    reads.  The provided ssrftp program uses it to show the card to any FTP
    client (FileZilla, File Explorer); see application note AN003.
  - The shell channel also accepts control protocol packets, so a host
    program (ssrftp among them) can use the port a terminal uses, with no
    change of channel function and no reset.  config control on|off, on by
    default.  (SSR-1L, SSR-1U, SSR-SDU, and SSR-1.)

  CHANGED
  - Improved config and status display in the shell.  Channel settings are
    now shown in tables, one row per channel, so they fit a terminal window.  
    config says whether the working settings match the saved copy, and marks 
    a change that waits for the next reset.
  - A file being recorded cannot be deleted, renamed, or opened for
    writing (shell "ERR: File in use (being recorded).", control protocol
    NACK_FILE_LOCKED).  It can still be read, viewed, and downloaded.
  - A channel's green LED flickers for traffic in both directions, so a
    download from the logger shows activity.
  - Enter on an empty line gives a new prompt; CR LF from a terminal counts
    as one Enter.
  - A path may end with a separator, as in cd logs/.
  - SSR-LC: Ch1 is always RecShell; config 1 ... is accepted, and the
    channel number can be left out to match the old syntax.

  FIXED
  - With the pulse input (PI) removed, status kept showing the last pulse
    width and period, as if the signal were still there.  Width and Period
    now show 0, and a new Signal field says yes, none, or out of range.
    PWM State still holds the last valid state, so a loose connection does
    not stop or start recording.
  - Setting the clock now writes a time correlation packet into every open
    time tagged (tt) file at once.  Before, data recorded after a clock
    change was decoded against the old time until the next periodic packet
    (up to 10 minutes).  On the SSR-1U and SSR-SDU this also covers Ch4.
  - A tt file could be damaged when the card fell behind long enough to
    fill a channel's buffer, or when one burst of data exceeded 254 bytes.
    Data that does not fit is still dropped, but the file stays valid.
  - At an automatic file split, a tt file could end with part of the next
    file's data (rare).
  - Disk Full clears on every channel once space is freed.
  - SSR-1U and SSR-SDU: after the card came back from USB access, the
    logger could reset (about one return in 10 to 20).
  - Impossible dates (such as 20260231) are refused by date and the
    control protocol.
  - A path template may start a directory name with a field code
    (/logs/\Y\M\D.dat); a sequence field is accepted only in the file name;
    a template error points at the right character.
  - A path template that could not be translated could leave the next
    config command waiting forever.
  - Several commands on one line (del x.txt; dir) no longer pass an
    argument from one command to the next; a path ending in . or .. followed
    by another command works.
  - Help text: reset ? gives help; config <ch#> ? shows the unit's channel
    range and path limits; ren ? and help are up to date.
  - Control protocol: a packet cut off part way no longer swallows the next
    one (a partial packet is dropped after 100 ms); record (0x10) with a
    path template kept its last character; long path template queries
    (0x51) are answered correctly; open and close file failures answer one
    NACK only; an invalid file type is refused.

  KNOWN LIMITATIONS
  - SSR-1 (legacy hardware): no control protocol file access (too little
    memory); those messages are answered as unknown.
  - SSR-LC: no control protocol and no card test.

  FOR HOST SOFTWARE AND SCRIPTS (control protocol changes)
  - 0x30 date query: the reply is 7 bytes (day of year is 2 bytes; it
    wrapped after day 255).  The day of the week moved from byte 5 to byte 6.
  - An unknown message is answered with NACK_UNKNOWN (it was not answered).
  - A path template with an unknown field code is refused with
    NACK_PATH_INV_TOKEN (was NACK_PATH_SYNTAX).
  - 0x10 record command on a channel that does not record returns 
    NACK_NOT_RECORD (34).
  - 0x24 channel status: the function field is bits 6-4 (RecShell = 4);
    file state 9 while USB has the card (SSR-1U, SSR-SDU).
  - 0x20 status: bit 7 is Ch4 soft record on the 4-channel models.  Bit 2
    is now "PWM input valid now" (was "PWM state latched"; with a steady
    signal the two agree), and bit 3 (was reserved) is "PWM state latched".
    Bits 3 and 1 give the PWM record command (not latched, 1 ms, or 2 ms).
    The pulse width and period are 0 with no signal.
  - A control protocol packet that stops part way is discarded after 100 ms 
    with no new byte: send each packet in one write.
  - Control packets are answered on the shell channel too (config control,
    item 0x45), between shell commands; a packet sent while a command runs
    gets no reply.

  BY MODEL -- what is new compared with the firmware it replaces
  - SSR-1L: everything above.
  - SSR-1, legacy hardware: everything above except control protocol file
    access.
  - SSR-1U: everything above.
  - SSR-SDU: everything above except RecShell, which it had.
    A RecShell channel on Ch1-Ch3 that relied on Ch4 power gets config p19 
    shell when its saved settings load (Ch4 power now requests the shell 
    on Ch4 only).
  - SSR-LC: everything above except card test and the control protocol.

------------------------------------------------------------------------
Earlier SSR-1 firmware (legacy hardware)
------------------------------------------------------------------------

20251009 - V2.2.5
  - BugFix: Time Tagged archives failed to start with a Time Correlation
    Packet when opened as part of a close/open operation based on a configured
    file size or time costraint.
  - Fixed bug in shell stat+ command disk_err debug info.  Info for the first 
    channel was duplicated.  Now all channels are reported correctly.

20220218 - V2.2.0
  - BugFix: Fixed relative path support in the shell for exFAT volumes.  
    Now cd .. works and pwd provides correct results on exFAT.
  - BugFix: Fixed issue recognizing a single forward slash as a valid path
    in the shell.
  - BugFix: Shell command sz included specified path with the zmodem 
    transmitted filename and should not.
  - BugFix: Fixed shell issue where bad boolean options weren't rejected as
    syntax errors.  Also made the acceptable boolean words case insensitive.  
  - BugFix: Fixed the shell time command to correctly set times using the AM/PM 
    designator on the 12th hour.  Previously, times entered as 12AM were 
    registered as 12PM and vice versa.
  - BugFix: Fixed shell to prevent extra characters from being consumed
    when using backspace in the middle of a command line.  Line editing using
    backspace now works correctly.
  - The shell current working directory is now preserved after volume remount
    operation (e.g., card removal/insertion or USB access) if possible.
  - Updated the non-inverted command sources to display with a leading '+'
    in config and status shell output for clarity.

20211111 - V2.1.4
  - Bug Fix:  Corrected a rare problem in which the seconds of a timestamp
    could be incremented prior to the fractional seconds, resulting in a 
    timestamp sequence with seconds like: 2.907, 3.999, 3.091 
    This change supercedes the change in 2.1.2 which did not adequately
    correct the problem.
  - Bug Fix: Fixed issue with recognizing a single forward slash as a valid 
    path in the shell.
    
20201206 - V2.1.2
  - Bug Fix: Corrected a problem that caused tagged line timestamps to be
    occasionally inserted soon after a new file was opened.
  - Bug Fix:  Corrected a rare problem in which the seconds of a timestamp
    could be incremented prior to the fractional seconds, resulting in a 
    timestamp sequence with seconds like: 2.907, 3.999, 3.091 

20200528 - v2.1.1
  - Fixed control protocol msg 0x30 file type to include tagged line.

20190905 - v2.1.0
  - ******** NOTE ********  
    **  This firmware will invalidate stored configuration information  
    **  of previous firmware versions, returning all parameters to default 
    **  factory settings.  Make note of the stored configuration of the 
    **  SSR-1 prior to updating the firmware.
    **********************
  - Added support for 7 bit data frames (with even or odd parity)
  - Bug Fix: corrected problems with parity enabled reception
  - Added options to disable on-board LEDs to conserve power
    
20181227 - v2.0.0
  - Support for exFAT, and SDXC cards
  - Minor performance improvementse

20181029 - v1.2.2
  - Enabled power saving mode between operations to reduce power consumption.
  - For tagged line archives, printable characters that will trigger output of
    a timestamp following a newline now includes the space character.

20180221 - v1.2.1
  - Bug Fix:  Time Tagged Archives recorded at baud rates (> 635kbaud) may
    fail to capture some data.  Fixed in this load, and STTP v1.5 or greater 
    is required for parsing high speed time tagged archige recordings with 
    this load.
  - Added a new record file type 'tl' (tagged line) that does native time
    stamp tagging of line oriented text.  Timestamps are inserted before the
    first printable character (ASCII 0x21 to 0x7E) following a CR (0xD) or
    LF (0xA).  Timestamp format is YYMMDDhhmmss.sss followed by a space.
    To enable the mode, use the shell command 'cfg file type tl'

20170208 - v1.1.0
  - Added support for card power control (power cycle reset) in future 
    hardware revisions.  
  - Protected card writes with CRC to improve robustness during power events.
  - Improved zModem file send performance.

20160619 - v1.1.0-beta
  - Added sz command to shell for sending with zmodem protocol.
  - Increased max speed for standard configuration from 115200 to 230400 baud.
  - Increased high speed variant maximum speed to 921600 baud.
  - Modified file path parsing in the shell to allow for shell command 
    arguments that begin with '-'.  File names can no longer begin with '-'.
  - Bug Fix: Time tagged archives were not getting periodically flushed so
    that the last several bytes received might not get preserved when power
    is lost.  Now, the time tagged archives get flushed every three seconds
    just like raw archives.
  - Significantly reduced latency between changes in the record command 
    state and action by the logger.
  - Modified ST (status) pin output behavior for more timely indication 
    of file status.

20160419 - v1.0.5h
  - Beta version to support new hardware variant and baud rates up to 460800.
  - Bug Fix: Shell always operates at 115200.  Corrected to honor baud setting.

20150505 - v1.0.5
  - Bug Fix:  Shell could not reset channel stop bits to 1.  Config erase 
    was required to restore stop bits to default value of 1.
  - Changed 'following tree' to 'following list' in the config channel help.
  
20140415 - v1.0.4
  - Bug Fix: On power up, with no card inserted, flash code indicated card full
    instead of card error.
    Bug Fix: Recording indication was not superceded by error flash codes in  
    some cases.
  - Bug Fix: Corrected inability to reinitialize card if the card was 
    ejected during recording.
  - Added firmware version string to startup user shell output text.
    
20140318 - v1.0.3
  - Bug Fix: Corrected calculation of RTC milliseconds.  Previously,
    milliseconds counted backward within each second.
  - Bug Fix: Corrected RTC bug that could cause Sunday to be enumerated as 
    day-of-week 7 instead of 0.
  - Bug Fix: Fixed shell 'ls' command output misalignment of text when file   
    size was three digits or less.
  - Bug Fix: Fixed shell 'ls' command file size output for file sizes of 
    2GB or greater.  Prevously, file size for files 2GB or larger was reported 
    in bytes.
  - Bug Fix: Flush FAT cache on detection of card eject.  Previously, bad
    reads could result if no disk access attempts occurred while card was out.
  - jLib (platform support) version update.  No effect to SSR-1.
  - Enhanced handling of card full condition.  Now, when the card is within 
    three clusters of full, recording will stop and Disk Full is indicated for
    all recording channels.  Also, a red LED flash pattern indicates Disk Full.
    "Disk Full" has been added as a file state in the shell and control
    protocol channel status message.
  - Enhanced disk error detection and handling.  Additionally, disk error 
    is indicated by a red LED flash pattern.
  - Added LED flash patterns for disk error, disk full, and ready.  Ready is
    indicated on record channels only.
  - Added auto close/open based on file size/time threshold.  Files will be
    closed automatically upon reaching the threshold, and reopen will be
    attempted if record is still commanded.  If enabled, file size threshold 
    values can be 1 MB, 2 MB, 4 MB, ...(powers of 2)..., 512 MB, and 1024 MB.  
    Also, threshold can be based on date, causing auto close/reopen on 
    entering a new hour, day, or week.  Support for configuration and status 
    of the file size constraint has been added to the shell and control 
    protocol.
  - Changing shell command 'ls' to use power of 2 file sizes (i.e., K=2^10, 
    M=2^20, G=2^30).  Previously, powers of 10 were used (K=10^3, M=10^6, 
    G=10^9).  This was done to match file size thresholds specified for 
    auto close/open.
  
20130507 - v1.0.2
  - First released version.
