Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Duet3 6HC SBC mode can't access after upgrade to 3.5

    Scheduled Pinned Locked Moved Solved
    Firmware installation
    4
    9
    340
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bug2k22undefined
      bug2k22
      last edited by bug2k22

      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?

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @bug2k22
        last edited by

        @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 of config.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 to true in /opt/dsf/conf/plugins.json, but that is not recommended for security reasons.

        Duet software engineer

        bug2k22undefined 1 Reply Last reply Reply Quote 0
        • bug2k22undefined
          bug2k22 @chrishamm
          last edited by

          @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.

          droftartsundefined 1 Reply Last reply Reply Quote 0
          • droftartsundefined
            droftarts administrators @bug2k22
            last edited by

            @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

            Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

            bug2k22undefined 1 Reply Last reply Reply Quote 0
            • bug2k22undefined
              bug2k22 @droftarts
              last edited by

              @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.

              droftartsundefined 1 Reply Last reply Reply Quote 0
              • droftartsundefined
                droftarts administrators @bug2k22
                last edited by

                @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:
                c1458cff-8b8b-4273-a624-99c9db825391-image.png

                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-rc2

                Ian

                Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                bug2k22undefined 1 Reply Last reply Reply Quote 0
                • bug2k22undefined
                  bug2k22 @droftarts
                  last edited by

                  @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.

                  jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                  • jay_s_ukundefined
                    jay_s_uk @bug2k22
                    last edited by

                    @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

                    Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                    bug2k22undefined 1 Reply Last reply Reply Quote 1
                    • bug2k22undefined
                      bug2k22 @jay_s_uk
                      last edited by

                      @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.

                      1 Reply Last reply Reply Quote 1
                      • Phaedruxundefined Phaedrux marked this topic as a question
                      • Phaedruxundefined Phaedrux has marked this topic as solved
                      • First post
                        Last post
                      Unless otherwise noted, all forum content is licensed under CC-BY-SA