Duet3 6HC SBC mode can't access after upgrade to 3.5
-
I was running 3.4.6 and changed the raspberry pi to the 'unstable' release channel and did an upgrade, there were no errors and I did a reboot following this.
I am now not able to access the duet web control panel. It show an error at the bottom on the page 'dcs is not started' and continually 'connecting....'.
I can ssh in to the raspberry pi and it seems at least one of the services is not running.Mar 22 18:17:24 kobra2max DuetControlServer[634]: Duet Control Server v3.5.0-rc.3 Mar 22 18:17:24 kobra2max DuetControlServer[634]: Written by Christian Hammacher for Duet3D Mar 22 18:17:24 kobra2max DuetControlServer[634]: Licensed under the terms of the GNU Public License Version 3 Mar 22 18:17:24 kobra2max DuetControlServer[634]: [info] Settings loaded Mar 22 18:17:24 kobra2max DuetControlServer[634]: [info] Environment initialized Mar 22 18:17:24 kobra2max DuetControlServer[634]: [warn] Kernel SPI buffer size is smaller than RepRapFirmware buffer size (4096 configured v> Mar 22 18:17:24 kobra2max DuetControlServer[634]: [info] Connection to Duet established Mar 22 18:17:24 kobra2max DuetControlServer[634]: [info] IPC socket created at /run/dsf/dcs.sock Mar 22 18:17:24 kobra2max systemd[1]: Started duetcontrolserver.service - Duet Control Server. Mar 22 18:17:24 kobra2max systemd[1]: Starting duetwebserver.service - Duet Web Server... Mar 22 18:17:24 kobra2max kernel: warning: `.NET Long Runni' uses wireless extensions which will stop working for Wi-Fi 7 hardware; use nl802> Mar 22 18:17:25 kobra2max DuetWebServer[847]: Microsoft.AspNetCore.DataProtection.Repositories.EphemeralXmlRepository[50] Using an in-memory > Mar 22 18:17:25 kobra2max DuetWebServer[847]: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[59] Neither user profile nor HK> Mar 22 18:17:25 kobra2max DuetWebServer[847]: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58] Creating key {284646bf-a09c> Mar 22 18:17:25 kobra2max DuetWebServer[847]: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35] No XML encryptor configured> Mar 22 18:17:25 kobra2max DuetControlServer[634]: [fatal] Abnormal program termination Mar 22 18:17:25 kobra2max DuetControlServer[634]: [fatal] SPI task faulted Mar 22 18:17:25 kobra2max DuetControlServer[634]: System.IO.IOException: Error 90 performing SPI data transfer. Mar 22 18:17:25 kobra2max DuetControlServer[634]: at LinuxApi.SpiDevice.Transfer(Byte* writeBufferPtr, Byte* readBufferPtr, Int32 buffersL> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at LinuxApi.SpiDevice.TransferFullDuplex(ReadOnlySpan`1 writeBuffer, Span`1 readBuffer) > Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.DataTransfer.ExchangeData() in /home/runner/work/DuetSoftwareFr> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean connecting) in /home/r> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.Interface.Run() in /home/runner/work/DuetSoftwareFramework/Duet> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.Utility.PriorityThreadRunner.<>c__DisplayClass0_0.<Start>b__0() in > Mar 22 18:17:25 kobra2max DuetControlServer[634]: [fatal] SPI task faulted Mar 22 18:17:25 kobra2max DuetControlServer[634]: System.IO.IOException: Error 90 performing SPI data transfer. Mar 22 18:17:25 kobra2max DuetControlServer[634]: at LinuxApi.SpiDevice.Transfer(Byte* writeBufferPtr, Byte* readBufferPtr, Int32 buffersL> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at LinuxApi.SpiDevice.TransferFullDuplex(ReadOnlySpan`1 writeBuffer, Span`1 readBuffer) > Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.DataTransfer.ExchangeData() in /home/runner/work/DuetSoftwareFr> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.DataTransfer.PerformFullTransfer(Boolean connecting) in /home/r> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.SPI.Interface.Run() in /home/runner/work/DuetSoftwareFramework/Duet> Mar 22 18:17:25 kobra2max DuetControlServer[634]: at DuetControlServer.Utility.PriorityThreadRunner.<>c__DisplayClass0_0.<Start>b__0() in > Mar 22 18:17:25 kobra2max DuetControlServer[634]: [info] Application has shut down Mar 22 18:17:25 kobra2max systemd[1]: duetcontrolserver.service: Main process exited, code=exited, status=70/SOFTWARE Mar 22 18:17:25 kobra2max systemd[1]: duetcontrolserver.service: Failed with result 'exit-code'.
Can anyone help what I can do to resolve the issue.
Thanks.[Edit] I came across another similar issue and adding 'spidev.bufsiz=8192' to the file '/boot/firmware/cmdline.txt' resolved the issue.
This has enabled the duet web page to load but it looks like new empty config even though the correct files are in the system folder and the macros are showing as present.
The bottom of the page eventually shows the error 'Error in start-up file config.g line 4: line 2: unknown value 'plugins.DuetPiManagementPlugin.pid''
This looks like the first couple of lines in the config.g file:M291 P"Applying persistent configuration options" R"Please wait" S1 T60 ; show that persistent settings are being configured while exists(sbc) && plugins.DuetPiManagementPlugin.pid < 0 && iterations < 30 G4 S2 ; wait for DuetPiManagementPlugin to become available
This was originally created from the RepRapFirmware Configuration Tool, it seems to start up correctly if I comment this section out, is this likely to cause an issue?
-
@bug2k22 I don't think these lines come from the configtool, at least not from the one I developed. If you change the operation mode in the configtool from standalone mode to SBC mode, codes that are provided by the DuetPiManagementPlugin should be put in
dsf-config.g
instead ofconfig.g
. If you don't have DuetPiManagementPlugin installed, certain RaspiOS-related M-codes like network config don't work.Note that you also need to have AppArmor installed and enabled before the plugin services can be started (provided you set up the OS yourself), see https://docs.duet3d.com/en/User_manual/Machine_configuration/DSF_Other Alternatively, you can disable AppArmor by setting
DisableAppArmor
totrue
in/opt/dsf/conf/plugins.json
, but that is not recommended for security reasons. -
@chrishamm Thanks. Those came from the "RepRapFirmware Configuration Tool" https://configtool.reprapfirmware.org/Configuration when SBC mode is selected, those line created, I see now that they are supposed to be entered into the runonce.g file and not config.g.
It all now looks to work correctly but it seems the 'M999 B-1 P"OFF"' code to gracefully power down the pi results in an error, so I'll probably back up the config files and use the supplied beta raspberry pi image as a starting point.
-
@bug2k22 said in Duet3 6HC SBC mode can't access after upgrade to 3.5:
it seems the 'M999 B-1 P"OFF"' code to gracefully power down the pi results in an error
You need to enable the DuetPi Management Plugin for that to work: https://github.com/Duet3D/DuetSoftwareFramework/tree/master/src/DuetPiManagementPlugin
Otherwise, please post the error message.
Ian
-
@droftarts Thanks Ian, I thought that may have been installed with the duetsoftwareframework. Is that something that I would have to compile and install manually? If so it's probably easier for me to use the supplied duet image as there's much less chance of something going wrong. I can work my way around linux, but I'm not an expert.
-
@bug2k22 I think the DuetPi Management Plugin is installed by default (at least in the Duet image), as I can't find a separate installer. It's on the 'external plugins' tab on my RRF/DSF 3.4.6 install:
If you're on the unstable feed, DSF 3.5.0-rc3 introduced the ability to update DSF from the DWC console with
M997 S2
, see https://github.com/Duet3D/DuetSoftwareFramework/wiki/Changelog-DSF-3.x-RC#version-350-rc3-changes-since-350-rc2Ian
-
@droftarts There are no plugins listed under 'external plugins'. I am running DSF 3.5.0-rc3 on this printer, M997 S2 completes but there are no updates/changes.
I presume the DuetPi Management Plugin feature is an addition installed on the duet image that is not present when following the manual install procedure. -
@bug2k22 see the notes from DSF version 3.3 here https://github.com/Duet3D/DuetSoftwareFramework/releases/tag/v3.3.0
it details what to do for apparmour and duetpimanagement plugin -
@jay_s_uk Thanks, that's just what was needed. I had got caught up in the weeds of the wiki and never read the release notes for that release. I already had apparmor installed and configured, must have missed the 'apt install duetpimanagementplugin' bit.
This all looks to be working perfectly now, many thanks. -
-