Changelog DSF 3.x - Duet3D/DuetSoftwareFramework GitHub Wiki

Version 3.5.4 (changes since 3.5.3)

Compatible versions:

  • RepRapFirmware 3.5.4
  • DuetWebControl 3.5.4

API changes:

  • Minor command fraction type has been changed from sbyte (signed byte) to int (signed integer)

Changed behaviour:

  • M292 is prioritised to allow custom codes that create blocking message boxes
  • Prioritised codes are preferrably sent to idle channels with the same firmware emulation type

Bug fixes:

  • M99 could cause internal stack level corruption in macro files
  • M32/M37 could override the file being printed (fixes #206)
  • Fixed GetSerializedObjectModel in the API
  • Don't lock job processor while waiting for SPI request and allow print cancellation requests to be aborted on SPI connection loss (fixes for potential rare deadlocks)

Version 3.5.3 (changes since 3.5.2)

Compatible versions:

  • RepRapFirmware 3.5.3
  • DuetWebControl 3.5.3

Upgrade notes:

  • If you are using a Raspberry Pi 5 and upgrade using apt, it may be necessary to restore the default config. To achieve this, run sudo rm /opt/dsf/conf/config.json after apt via SSH or using a Linux console. Without this step, you will get an error stating that the gpiochip device could not be opened. The underlying change came from a kernel change from Raspberry Pi, which brings the gpiochip numbering in line again with previous Raspberry Pi editions

API changes:

  • Deprecated several methods due to upcoming changes in v3.6
  • Added new preferred overloads for SetPluginData and PatchObjectModel

New features:

  • M905 A parameter may be used to specify if the date and time shall be set via NTP

Bug fixes:

  • Results from cancelled evaluation requests could be output
  • Only resumable macros were aborted by DSF when a pause event was processed
  • Fixed type of sensors.filamentMonitors[].calibrated
  • Invoke internal "increment" codes asynchronously to fix spurious deadlocks
  • M905 wasn't working any more due to missing permissions
  • Fixed support for SSIDs with spaces
  • Type of state.thisActive wasn't nullable
  • Fixed support for M226/M600 preceding M98
  • Fixed potential deadlock when deleting variables
  • Fixed DWC startup issue in SBC mode caused by Chromium singleton lock

Version 3.5.2 (changes since 3.5.1)

Compatible versions:

  • RepRapFirmware 3.5.2
  • DuetWebControl 3.5.2

Changed behaviour:

  • M409 K"network" and M409 K"volumes" are now handled by DSF and DCS increments the corresponding RRF sequence numbers when necessary
  • DCS service may no longer be moved to swap memory

New features:

  • Added proxy support to custom HTTP endpoints

Bug fixes:

  • M21 Pnnn could output an error when PanelDue requested an existing mount point to be mounted again
  • Some emulated rr_ replies did not use the default DSF JSON serializer settings
  • Fixed code param conversion error with expressions
  • Plugin config files could be deleted on upgrade
  • M554 was not working as intended

Version 3.5.1 (changes since 3.5.0)

There were no significant changes in this release. If you are upgrading from v3.4 or older, please read the next section.

Changed behaviour:

  • Macro start/end events are logged as debug instead of info messages if they originate from the daemon input channel

Version 3.5.0 (changes since 3.4.6)

Compatible versions:

  • RepRapFirmware 3.5.0
  • DuetWebControl 3.5.0

Upgrade notes:

  • You MUST be on RepRapFirmare 3.5-b1 in order to process jobs. It will NOT work with 3.4.x or older!

API changes:

  • Introduced new code interceptor option to auto-expand expression parameters for filtered codes (defaults to true)
  • Added new sbcConfigFiles field to plugin manifest. These files are not overwritten on upgrade
  • Nested plugin data values can be queried in expressions (e.g. echo plugins.foobar.data.myObj.myProp)
  • Added recursive parameter to HTTP file/directory delete request
  • Added recursive delete functionality for RRF delete requests
  • Flush IPC command can be optionally used to synchronize both file streams
  • Enabled Nullable type checks throughout DSF projects
  • Added support for null parameter values (e.g. X in G28 X)
  • Consolidated API exception classes in DuetAPI library
  • Changed async code parser to use Stream type instead of StreamReader
  • The scanner key has been removed from the object model. It is no longer supported

Changed behaviour:

  • If a file is supposed to use two file readers, it must be forked via M606 S1
  • result variable is no longer maintained by DSF
  • If DCS fails to start, there is now a delay of 5 seconds between restart attempts
  • Index web file served from the web server is never cached and must be revalidated by the web browser on reload
  • If a RRF plugin contains daemon.g, it is renamed to daemon.g.bak on upgrade
  • Moved userSessions root key to new sbc key
  • M552 S1 unblocks WiFi automatically using rfkill
  • Introduced new "sbc" root key in favour of deprecated state.dsf... properties
  • Removed httpEndpoints root key in favour of sbc?.dsf.httpEndpoints
  • Open message boxes are automatically closed in the DSF OM when the controller is disconnected
  • Removed obsolete move.workspaceNumber field
  • Code parser is much more sensitive to invalid code parameters
  • Error messages from macros/job files are more condensed to get closer to messages from RRF
  • When a code cannot be read (i.e. code input is interrupted), the file is aborted immediately

New features:

  • Object model and M122 report if 64-bit DCS build is used
  • Added support for WiFi scanning (M587.1/M587.2)
  • Added support for NetworkManager so that network M-codes can be used on Debian Bookworm
  • M997 S2 can be used to update the system via apt update/unattended-upgrades on the latest DuetPi version (requires Debian Bookworm)
  • M997 S2 V"<version>" can be used to install another DSF version (includes automatic update to corresponding RRF version) on DuetPi
  • M997 S2 F"unstable" or M997 S2 F"stable" can be used to configure the package feed on DuetPi
  • Prepared Debian Bookworm support in the DWC launch script
  • WiFi country may now be reported and updated using DuetPiManagementPlugin
  • Added new SBC option for plugins to auto-restart them in case of unexpected crashes
  • Added new object model fields introduced by RepRapFirmware
  • When files are uploaded, they are uploaded to a ".part" file before they are moved into place
  • Added fileread and single-char support using apostrophes like in RRF
  • Added auto flush option to code interceptor API. This is preferred to avoid race conditions under certain circumstances
  • Added new pip install script that also checks for built-in modules (thanks stuartofmt)
  • Added support for standalone mode HTTP session keys to DuetHttpClient library
  • SSID is now reported in network.interfaces[] if applicable
  • Added new HTTP endpoint /machine/model as an alternative to /machine/status
  • Added support for M472 (delete file or directory)
  • Added support for custom array variables and for assigning individual items
  • echo can be used to append contents to a file without NL (aka echo >>>"file" "data")
  • Executing codes do not need an individual task any more, instead they are now handled by a new pipeline architecture
  • Added support for two file channels, new message box types, and many other improvements made in RRF
  • Rewrote much of the meta G-code expression pre-parser and added ability to define custom functions (not yet available via API)
  • Added rr_ compatibility layer to DuetWebServer (HTTP calls in standalone mode)

Bug fixes:

  • DCS could not determine if a network adapter uses DHCP or a static IPv4 address
  • DPS no longer redirects stdio/stderr to DPS logger unless requested (systemd takes care of that anyway)
  • Fixed file handling with boards that only provide a single file channel
  • move.axes can be queried sequentially to support up to 30 configured axes
  • Changed documentation generator to include <see cref="..."> statements
  • 'g parameters were not correctly parsed
  • Added and tested new axis letters to code parser
  • Fixed type of move.segmentation.segmentsPerSec
  • If a connection intercepting a code sent a code to another channel, that code was incorrectly assigned the same macro file (if any)
  • M929 always required a log filename (affected only v3.5)
  • echo could be executed on inactive channels (e.g. File2)
  • M122 could throw an exception if there were remaining codes in the Executed code pipeline handler
  • Job file processor didn't synchronize OM right after the print started, potentially starting with an invalid inputs[].active state
  • Identical expression requests yielded the same result if requested on two different code channels
  • Fixed AppArmor webcam profile to support Spyglass
  • Even number values containing dots were interpreted as integers and not as floats
  • Fixed handling of non-ASCII characters in G-code parser
  • Better enforce maximum length of arguments for meta G-code keywords
  • Invalid enum values (in particular filament monitor types) could crash DCS
  • Fixed IPC command to evaluate custom expressions
  • Obsolete object model fields were not queried
  • When custom endpoints attempted to return a status code, DWS incorrectly tried to write a body response as well
  • Fixed M30 support
  • Fixed default DateTime format in the object model
  • WebSocket session key wasn't optional if no password set
  • Corrected type of direct display screen instances in the OM definition
  • Start-up errors were incorrectly set after booting
  • Adjusted AppArmor permissions for webcam access on Debian Bullseye
  • New DSF implementation of exists() function did not work with local/parameter variables
  • Fixed potential deadlock caused by code interceptors
  • G2/G3 may be repeated as well like G0/G1 in Fanuc mode
  • Fixed removal of plugin www files on upgrade/uninstall
  • M550 did not update /etc/hosts causing potential problems if no network interface was active
  • SBC values in variable indices were not substituted in set command
  • Line numbers could be off when handling exceptions from codes
  • Fixed issue where missing DNS servers could crash DCS
  • Fixed file enumeration in DuetPiManagementPlugin plugin manifest
  • Race condition could lead to macro filestream being disposed twice causing potential crash of DCS
  • Added missing variable declaration to DSF build script
  • Fixed expression queries of plugin values
  • Fixed parameter parsing for values consisting of special number formats
  • Fixed event log support via M929
  • ok was not output after DSF error messages potentially upsetting Repetier Server
  • Sometimes code pipeline elements could be marked busy incorrectly leading to potential deadlocks
  • Fixed support for M0/M1/M2 as well as underscores in variable names
  • Added work-around for non-conform rr_upload requests with invalid content type
  • Fixed type of tools[].feedForward and corrected default sensors.probes[].travelSpeed value
  • Fixed support for update.sh in update packages (dsf-update.zip which requires RootPluginSupport)
  • Updated stat import to add support for recent kernels (thanks Loïc)
  • Removed obsolete OM assignment from Job processor
  • When a too long code was attempted to be serialized, DCS crashed
  • Fixed DateTime encoding
  • Code parser could terminate strings too early
  • Fixed issue when parsing the end of a file where a multi-byte character could introduce position offsets leading to errors

Version 3.4.6

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 to 3.4.5 as well.

Compatible versions:

  • RepRapFirmware 3.4.6
  • DuetWebControl 3.4.6

Changed behaviour:

  • Message boxes are closed automatically upon SPI disconnect

New features:

  • Added missing InvalidateChannel call to API client
  • G2/G3 may be repeated as well like G0/G1 (FANUC-style)
  • Added new HTTP endpoint /machine/model as an alternative to /machine/status

Bug fixes:

  • Fixed reverse parsing when dealing with UTF8 CPs
  • Backported potential code parser fix from v3.5
  • SPI interface was not invalidated when the connection could be established again after a timeout
  • Fixed update.sh handling in system pkg installs
  • Added different stat implementation to make DSF work with newer kernels
  • Fixed M552 S1 P parameter (SSID)
  • Fixed Marlin emulation for meta expressions
  • Priority codes didn't prefer originally requested channel
  • Moved flush in job task to fix potential deadlock
  • Fixed removal of plugin www files
  • M550 did not update /etc/hosts
  • Fixed issue where missing DNS servers could crash DCS
  • Fixed plugin files field in the DuetPiManagementPlugin manifest
  • Fixed meta expression queries of plugin values

Version 3.4.5

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 to 3.4.4 as well.

New features:

  • .NET libraries are now compatible with .NET Standard 2.0 (hence also with .NET Framework 4.8)

Bug fixes:

  • Fixed locale-dependent formatting when converting parsed G-codes back to text
  • Changed default .deb package compression from ZSTD to XZ to retain compatibility with older Debian releases

Version 3.4.4

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 to 3.4.3 as well.

New features:

  • The last modified timestamp can now be passed to file upload requests

Version 3.4.3

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 to 3.4.2 as well.

New features:

  • M999 B-1 P"OFF" may now be used to turn off the SBC on demand

Bug fixes:

  • If a remote HTTP server was emulated, no Duet HTTP session could be established (only DuetHttpClient library)
  • When a string contained two successive single quotes, the following letter was always converted to lower-case
  • Minor corrections in the object model structure

Version 3.4.2

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 and 3.4.1 as well.

Upgrade notes:

  • Instead of the previous apt upgrade command it is now required to use apt dist-upgrade. Users of unattended-upgrade are not affected

New features:

  • Program from the duettools package now provide return codes and come with improved error handling
  • Added new "tags" string array to plugin manifest

Changed behaviour:

  • Job task flushes pending codes one last time on completion to allow for user-generated G-codes

Bug fixes:

  • Custom HTTP endpoints could not be created from non-dsf users
  • Enum member for inches was wrong
  • When inches were configured, DCS could crash due to deserialization errors
  • Disposing closed file streams could lead to unexpected exceptions
  • pip3 (Python 3) is now used for dependency installations instead of pip (Python 2.7) [due to changed dependencies apt dist-upgrade is required instead of apt upgrade]
  • Disposal of already closed code files could lead to unexpected exceptions
  • Codes from an intercepting connection were intercepted again by the same connection
  • Made SPI error recovery on empty data more robust

Version 3.4.1

If you are upgrading from a version older than 3.4.0, please read the upgrade notes for 3.4.0 as well.

Upgrade notes:

  • The latest version of the DuetPi image comes with disabled WiFi power saving. There have been reports that power saving of the integrated WiFi adapter may cause problems with the SPI connection (see here and here). So on upgrade it is recommended to disable it on DuetPi by running the following from a Linux shell (e.g. via SSH):
echo "# Disable power saving of the built-in WiFi adapter to avoid SPI connection problems" | sudo tee -a /etc/network/interfaces
echo "allow-hotplug wlan0" | sudo tee -a /etc/network/interfaces
echo "iface wlan0 inet manual" | sudo tee -a /etc/network/interfaces
echo "post-up iw dev wlan0 set power_save off" | sudo tee -a /etc/network/interfaces
sudo iw dev wlan0 set power_save off

New features:

  • Added OpenAPI definition for HTTP APIs

Changed behaviour:

  • Improved SPI protocol error handling
  • DCS outputs an info message when the connection is lost because of too little CPU time
  • Main object model class is no longer sealed

Bug fixes:

  • DSF user and AppArmor templates were missing permissions for webcam access on Debian Buster
  • Some object model values were not reactive in DuetAPI
  • Usage of the custom input shaper was not supported
  • M112 and M999 did not wait for potential firmware updates to finish first
  • Code files could be edited while they were being processed
  • DuetHttpClient did not set valid X-Session-Key when reconnecting to Duets in SBC mode
  • Improved logging in IPC backend to avoid unnecessary memory allocations
  • Rotary delta configurations set the wrong kinematics type in the object model
  • Added network.interfaces[].state in SBC mode
  • Sequential printing could provoke an exception in the layer update code (i.e. when the layer number went down)

Version 3.4.0

Upgrade notes since version 3.3:

  • From now on DSF uses pip for management of third-party Python libraries. It is recommended to install it using sudo apt install python3-pip
  • The default group of I²C device nodes has been changed to gpio. If you are using I²C from a non-root user, make sure that applications accessing it are part of the gpio group (e.g. via sudo gpasswd -a <user> gpio)
  • In order to access webcam devices, you must add the dsf user to the video group (sudo gpasswd -a dsf video) and reboot the SBC
  • When you upgrade the DuetPiManagementPlugin package from v3.4-b6 or older, you will see an error message due to a missing dependency of the old package being upgraded (Error: An assembly specified in the application dependencies manifest (PluginManager.deps.json) was not found). You can ignore this message, it should be fixed as soon as v3.4-rc1 or newer is installed.
  • It is recommended to disable the rsyslog service on DuetPi installations to prevent excessive growth of log files. To do this, run the following command in a Linux terminal: sudo systemctl stop rsyslog && sudo systemctl disable rsyslog

New features:

  • Implemented new GPIO (includes I²C and SPI devices) and webcam permissions for third-party plugins
  • Thumbnail data is checked for valid base64 content before it is assigned
  • DuetPiManagementPlugin now supports (un-)mounting of devices via M21/M22
  • RRF can now read and write files on the SBC
  • Added support for array expressions
  • Added support for new InvalidateChannel API command allowing plugins to cancel queued codes and files
  • Added HTTP password protection (M551) using new /machine/connect and /machine/disconnect endpoints (default tiemout on idle is 8s)
  • Implemented new class library for remote management of Duets in standalone or SBC mode (DuetHttpClient)
  • Added new HTTP endpoint /machine/noop to keep HTTP sessions alive on demand
  • Added optional async flag to /machine/code endpoint
  • DCS uses proper return codes and saves the error reason on startup to /run/dsf/dcs.err which is provided to DWC if necessary

Changed behaviour:

  • Web server only sends messages with HTTP target to web clients. Before this change only generic messages were output
  • Replies from macro files are output immediately as they are generated (like in standalone mode)
  • Codes starting macros do not collect the results from the sub-macro codes any more (like in standalone mode)
  • SPI link timing is not controlled by DCS any more, instead RRF does this (see also M576)
  • Filament management is now done exclusively by RRF
  • Removed deprecated CodeResult class from API in favour of Message class
  • DuetPiManagementPlugin uses relative file paths to support more Linux distros
  • Mainboard is automatically reset when only expansion boards have been updated

Bug fixes:

  • DWC launch script was not included in the source files
  • Even object heights were not correctly processed
  • M997 and M999 could show "Operation has been cancelled" rather than completing normally
  • When plugins were uninstalled and they were auto-started, they were not removed from the auto-start list
  • Update prompt did not display expansion board names
  • Absolute file paths without leading slash (e.g. M98 P"0:macros/foo.g" instead of M98 P"0:/macros/foo.g") were not correctly processed by DSF
  • Variable names could not contain underscores
  • Under certain conditions paused prints could not be cancelled properly
  • Automatic expansion board updates did not wait for completion
  • boards[].mcuTemp, boards[].v12, and boards[].vIn were not nullable
  • Default firmware directory in the object model was wrong
  • JSON responses in subscriber patch mode were not necessarily live
  • M505 did not lock the movement before changing the sys directory
  • Local variables were not deleted when their scope was released
  • M105 did not output a NL at the end of Marlin-compatible replies
  • DCS could complain about plugin services if they terminated during shutdown
  • systemd services for DuetPluginService did not wait for processes to start
  • Some expression values like DateTime, ULong, and Null were not supported by DSF
  • Web server took a few seconds to stop if a WebSocket client was connected
  • Noise on the TfrRdy pin could make DCS get out of sync with RRF after updating the firmware (only if NoTerminateOnReset was enabled)
  • DCS could send invalid collection values in patch mode
  • G-code filenames starting with digits (but not paths like 0:/gcodes/) could cause exceptions
  • If the first or last G1 Z parameter were an expression, the file info may not be parsed
  • On some setups the periodic updater task locked the object model for 1.5s causing print artifacts due to slow SPI communication
  • M999 from a macro file could hang with DuetPiManagementPlugin enabled
  • Quoted characters were incorrectly treated in keyword arguments
  • Multiple filament usages from a single-line comment were not properly parsed
  • Error handling for file lists wasn't working as expected
  • Only up to 9 axes could be configured
  • Parameter letters were always converted to upper-case
  • Tool for custom HTTP endpoints did not replace query values when starting other programs
  • Packaged plugins (like duetpimanagementplugin) could be uninstalled using DWC
  • Removed redundant info message during upgrade from removal script
  • Blackslashes in file paths were not translated to slashes

Changes since v3.4-rc2:

  • Use async instead of sync disposables where possible
  • Added new flag ExecuteAsynchronously to SimpleCode API command
  • Added optional async parameter to /machine/code endpoint and optional readThumbnailContent parameter to /machine/fileinfo endpoint
  • Implemented new watchdog tasks to kill DCS after a few seconds if M112/M999 takes too long
  • Codes being intercepted are now reported from M122
  • Mainboard is automatically reset when only expansion boards have been updated
  • Bug fix: M38 wasn't working
  • Bug fix: Blackslashes in file paths were not translated to slashes
  • Bug fix: WebSocket connections could be terminated before InstallSystemPackage HTTP request completed

Version 3.3.0

Upgrade notes since version 3.2:

  • Plugin support is now enabled but requires some extra steps before they can be installed. Execute the following commands in a Linux terminal:
    1. Install AppArmor package: sudo apt install apparmor
    2. Enable AppArmor support on boot: sudo bash -c 'echo " lsm=apparmor" >> /boot/cmdline.txt'
    3. Enable new plugin services: sudo systemctl enable duetpluginservice && sudo systemctl enable duetpluginservice-root
    4. Reboot the SBC to apply the changes: sudo reboot
  • DuetPiManagementPlugin is now available for DuetPi to support various M-codes that werre previously supported only in standalone mode
    1. This plugin is available from the duetpimanagementplugin package which comes with the latest DuetPi version
    2. It can be manually installed via apt install duetpimanagementplugin
    3. Go to the Machine-Specific -> Third-Party Plugins page on DWC to enable it after a manual installation
  • There is now a new configuration file dsf-config.g which is executed when all previously started plugins have been started by the plugin service(s) after a reboot. Put custom G/M-codes into this file, ideally with a short delay at the start (G4 S2) to ensure the plugions are fully started at the time custom actions are executed.

Bug fixes:

  • When a new firmware build was installed, the final IAP delay was sometimes too short
  • directories key was not queried when DCS started in update-only mode
  • Remaining plugins were not correctly stopped when a plugin service was shut down

Known limitations:

  • Auto-resume on power loss cannot be configured (M916)
  • Accelerometer profiles cannot be recorded (M956)
  • Password protection has no effect yet (M551)

Version 3.2.2

Compatible versions:

  • RepRapFirmware 3.2.2
  • DuetWebControl 3.2.2

Bug fixes:

  • Tabs at the beginning of G-code lines were not interpreted as up to 4 spaces
  • Payloads for conditional keywords had to be encapsulated in curly braces to allow usage of round braces
  • Parameters for codes that expected unprecedented parameters always had to be encapsulated in double quotes
  • When DWS was configured for a different port, no WebSocket sessions were permitted without extra CORS exception
  • DCS could be killed by systemd if runonce.g didn't finish quickly enough
  • break and continue didn't wait for pending codes to finish which could lead to problems with iterations
  • When empty comments were parsed, the Comment field of DSF codes remained null instead of string.Empty
  • Unlike in RRF G29 S0 accepted custom filenames (better solution is to use G29 followed by G29 S3)

Version 3.2.0

Compatible versions:

  • RepRapFirmware 3.2.0
  • DuetWebControl 3.2.0

Bug fixes:

  • M929 didn't set the correct log level
  • abort tried to evaluate following expression even if it was not specified
  • abort did not always cancel all the internal codes in time
  • Under rare conditions suspended codes could be re-suspended in the wrong order
  • G0/G1 with dynamic feedrate expressions caused an internal exception

Version 3.1.1

Compatible files:

  • RepRapFirmware 3.1.1
  • DuetWebControl 3.1.1

Changed behaviour:

  • Increased API level due to new object model fields
  • Code replies from the firmware are now trimmed at the end right after receipt

Bug fixes:

  • Final replies from system macros were discarded
  • Substituted macro filenames were incorrect in the DCS log
  • Codes requesting message boxes could be executed twice
  • Message boxes could be closed internally in DCS when not supposed to
  • Codes from pause.g were cancelled under certain circumstances

Version 3.1.0

Compatible files:

  • RepRapFirmware 3.1.0
  • DuetWebControl 3.1.0

Changed behaviour:

  • Duplicate code parameters are now ignored
  • If M122 cannot obtain locks in DCS within 2s, the lock is ignored
  • SPI poll delay is skipped during updates

Bug fixes:

  • When pausing a print at the end of a file, the file was closed on resume
  • M500 P10 did not work
  • DCS parameter for updates (-u) was broken if another instance was not started
  • Whole-line comments were not truncated before they were sent to RRF
  • Only the first filament usage was parsed from files generated by Prusa Slicer
  • M505 did not return the current sys directory when invoked without parameters
  • Whole-line comments preceding a code that requests a macro file could cause the code to be executed twice
⚠️ **GitHub.com Fallback** ⚠️