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

Duet 3 and jetson Nano?

Scheduled Pinned Locked Moved
General Discussion
8
111
8.8k
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.
  • undefined
    hanshogeland @A Former User
    last edited by 20 Sept 2019, 17:18

    @bearer got you, will try that the next time (and thx for the tip :))

    1 Reply Last reply Reply Quote 0
    • ?
      A Former User
      last edited by 20 Sept 2019, 17:21

      For instance I could copy/paste the first part where you start DuetControlServer and point out that when you run the binary like that and it returns to the prompt, it is no longer running. And as such DuetWebServer will not work.

      You need to either run the binary in its own terminal or in the background; and more importantly find out why it says Duet is not available

      undefined 1 Reply Last reply 20 Sept 2019, 18:35 Reply Quote 0
      • undefined
        gtj0
        last edited by 20 Sept 2019, 18:34

        The Duet Not Available is either that the GPIO or the SPI isn't configured correctly (not in the DSF).
        Unfortunately I don't have a Duet3 to test with yet so I'm kinda flying blind for the time being.
        The issue may be that the SPI instructions that I posted were for a generic Jetson Nano, not specific to the DSF. As such, it has both SPI ports configured. Unfortunately, the GPIO pin that's wired through to the Duet3 is also used by the second SPI port on the Nano so it may be interfering. I'm working on an updated SPI procedure that should be done in a few hours.

        undefined 1 Reply Last reply 20 Sept 2019, 18:51 Reply Quote 0
        • undefined
          hanshogeland @A Former User
          last edited by 20 Sept 2019, 18:35

          @bearer yes I see, I made a mistake not adding the gpio group rights. I think I got connection now.

          undefined 1 Reply Last reply 20 Sept 2019, 18:38 Reply Quote 0
          • undefined
            hanshogeland @hanshogeland
            last edited by 20 Sept 2019, 18:38

            @hanshogeland said in Duet 3 and jetson Nano?:

            @bearer yes I see, I made a mistake not adding the gpio group rights. I think I got connection now.

            Or I got another error now,

            hans@hans-desktop:~$ sudo /opt/dsf/bin/DuetControlServer
            Duet Control Server v1.0.3.3
            Written by Christian Hammacher for Duet3D
            Licensed under the terms of the GNU Public License Version 3

            Loading settings... Done!
            Initialising object model... Done!
            Connecting to RepRapFirmware... [warn] Bad header checksum (expected 0xffff, got 0x3b01)
            [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005)
            Error: Duet is not available

            1 Reply Last reply Reply Quote 0
            • undefined
              hanshogeland @gtj0
              last edited by 20 Sept 2019, 18:51

              @gtj0 thx for your efforts, I couldn’t have come this far without you.

              1 Reply Last reply Reply Quote 0
              • undefined
                gtj0
                last edited by gtj0 20 Sept 2019, 20:02

                @hanshogeland I updated my github repo with files that enable spi1 only. It may help.
                Another thing you can try is to reduce the SPI bus speed as a test.
                In config.json, change
                "SpiFrequency": 1000000,
                to
                "SpiFrequency": 500000,

                That's 500KHz instead of 1MHz.

                You'll have to restart duetcontrolserver after making the change.

                https://github.com/gtjoseph/jetson-nano-support/tree/l4t_32.2.1

                undefined 1 Reply Last reply 20 Sept 2019, 23:35 Reply Quote 1
                • undefined
                  hanshogeland @gtj0
                  last edited by 20 Sept 2019, 23:35

                  @gtj0 hi, I have flashed with only the spi1 support and tested again with the duetcontrolserver - it gives a similar error again.

                  hans@hans-desktop:~$ sudo /opt/dsf/bin/DuetControlServer
                  Duet Control Server v1.0.3.3
                  Written by Christian Hammacher for Duet3D
                  Licensed under the terms of the GNU Public License Version 3

                  Loading settings... Done!
                  Initialising object model... Done!
                  Connecting to RepRapFirmware... [warn] Bad header checksum (expected 0xffff, got 0x3b01)
                  [warn] Note: RepRapFirmware didn't receive valid data either (code 0x00000005)
                  Error: Duet is not available
                  hans@hans-desktop:~$ ls -al /dev/spi*
                  crw-rw---- 1 root gpio 153, 0 sep 21 01:18 /dev/spidev0.0
                  crw-rw---- 1 root gpio 153, 1 sep 21 01:18 /dev/spidev0.1

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    gtj0
                    last edited by 21 Sept 2019, 13:26

                    Did you try lowering the spi frequency?

                    undefined 1 Reply Last reply 21 Sept 2019, 21:41 Reply Quote 0
                    • undefined
                      hanshogeland @gtj0
                      last edited by 21 Sept 2019, 21:41

                      @gtj0 yes, I did that - this is the config, thx again for your help - I might have to wait until you have tested it yourself and that is fine also cause I am still building on my printer. Also I am thinking on getting a Rasberry to verify the card and cable, but I would say that should not be an issue at all.

                      "SpiFrequency": 500000,
                      "SocketPath": "/var/run/duet.sock",
                      "Backlog": 4,
                      "BaseDirectory": "/opt/dsf/sd",
                      "HostUpdateInterval": 4000,
                      "MaxMessageAge": 60.0,
                      "SpiBusID": 0,
                      "SpiChipSelectLine": 0,
                      "SpiTransferTimeout": 500,
                      "MaxSpiRetries": 3,
                      "SpiPollDelay": 25,
                      "TransferReadyPin": 13,
                      "MaxUpdateDelay": 250.0,
                      "FileInfoReadLimit": 32768,
                      "MaxLayerHeight": 0.9,
                      
                      1 Reply Last reply Reply Quote 0
                      • undefined
                        gtj0
                        last edited by 22 Sept 2019, 18:57

                        @hanshogeland I just uploaded DSF builds for 1.0.4.0. Suggest you give those a try.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          gtj0
                          last edited by 24 Sept 2019, 00:35

                          I'm seeing the same checksum issues. I think I have to tweak the drive strength and the timing a bit.
                          Working on it!

                          undefined 1 Reply Last reply 24 Sept 2019, 05:15 Reply Quote 1
                          • undefined
                            hanshogeland @gtj0
                            last edited by 24 Sept 2019, 05:15

                            @gtj0 great! 🙂

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              gtj0
                              last edited by 25 Sept 2019, 02:23

                              I figured it out. I stupidly forgot to set the MISO pins to TRISTATE so the data was getting corrupted.
                              Tested and things now seem fully operational.
                              Grab the new u-boot and dtb files from:
                              https://github.com/gtjoseph/jetson-nano-support/tree/l4t_32.2.1

                              undefined 1 Reply Last reply 25 Sept 2019, 17:05 Reply Quote 4
                              • undefined
                                hanshogeland @gtj0
                                last edited by 25 Sept 2019, 17:05

                                @gtj0 Success!! Thank you fior your hard work of making it work Iḿ truly grateful 🙂 32fc5be7-e1cf-4a58-be99-c1d2fc6dbed0-image.png

                                1 Reply Last reply Reply Quote 2
                                • undefined
                                  gtj0
                                  last edited by 12 Dec 2019, 21:51

                                  Just a quick update...

                                  There are official 64 bit builds of Duet Software Framework available from Duet3D. All you have to do is create a file named /etc/apt/sources.list.d/duet3d.list with one line in it...

                                  deb https://pkg.duet3d.com/ stable armv7
                                  

                                  Even though armv7 is mentioned, you'll get the arm64 packages.

                                  Then copy the attached gpg key to /etc/apt/trusted.gpg.d/duet3d.gpg.
                                  duet3d.gpg.txt
                                  The .txt suffix was added just to satisfy the forum's upload restrictions so you need to remove it.

                                  Finally, do an apt-get update and apt-get install duetsoftwareframework

                                  undefined 1 Reply Last reply 17 Dec 2019, 21:16 Reply Quote 4
                                  • undefined
                                    hanshogeland @gtj0
                                    last edited by 17 Dec 2019, 21:16

                                    @gtj0 said in Duet 3 and jetson Nano?:

                                    etc/apt/sources.list.d/duet3d.lis

                                    Yes, I´ve been thinking about this for a while and just like that the update I was waiting for :)!
                                    Followed your instructions and it worked like a charm, thank you so much.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      gtj0
                                      last edited by 17 Dec 2019, 22:25

                                      Those packages have been up there for a while now but both @chrishamm and I forgot to tell anyone. 🙂

                                      1 Reply Last reply Reply Quote 1
                                      • HebigTundefined
                                        HebigT
                                        last edited by HebigT 13 Jan 2020, 20:06

                                        @gtj0

                                        I did a fresh install (both L4T & DSF) and I'm running into an issue:

                                        Monitoring DCS shows "Kernel SPI buffer" warning & "Duet is not available"

                                        jpomo@jpomo-desktop:~$ sudo /opt/dsf/bin/DuetControlServer
                                        Duet Control Server v1.2.3.0
                                        Written by Christian Hammacher for Duet3D
                                        Licensed under the terms of the GNU Public License Version 3
                                        
                                        [info] Settings loaded
                                        [info] Environment initialized
                                        **[warn] Kernel SPI buffer size is smaller than RepRapFirmware buffer size (4096 configured vs 8192 required)
                                        [error] Duet is not available**
                                        
                                        

                                        Here are my config files -

                                        http.json:

                                        {
                                          "Logging": {
                                            "LogLevel": {
                                              "Default": "Information"
                                            }
                                          },
                                          "Kestrel": {
                                            "Endpoints": {
                                              "Http": {
                                                "Url": "http://127.0.0.1"
                                              }
                                            }
                                          },
                                          "KeepAliveInterval": 30,
                                          "ModelRetryDelay": 5000,
                                          "UseCors": true,
                                          "UseStaticFiles": true,
                                          "SocketPath": "/var/run/dsf/dcs.sock",
                                          "WebSocketBufferSize": 8192
                                        }
                                        

                                        config.json

                                          "LogLevel": "info",
                                          "SocketDirectory": "/var/run/dsf",
                                          "SocketFile": "dcs.sock",
                                          "Backlog": 4,
                                          "SocketPollInterval": 2000,
                                          "BaseDirectory": "/opt/dsf/sd",
                                          "HostUpdateInterval": 4000,
                                          "ConfigUpdateInterval": 5000,
                                          "MaxMessageAge": 60.0,
                                          "SpiDevice": "/dev/spidev0.0",
                                          "SpiFrequency": 1000000,
                                          "SpiTransferTimeout": 500,
                                          "MaxSpiRetries": 3,
                                          "SpiPollDelay": 25,
                                          "GpioChipDevice": "/dev/gpiochip0",
                                          "TransferReadyPin": 13,
                                          "BufferedPrintCodes": 32,
                                          "BufferedMacroCodes": 16,
                                          "MaxBufferSpacePerChannel": 1536,
                                          "ModelUpdateInterval": 125,
                                          "MaxMachineModelLockTime": -1,
                                          "FileInfoReadLimitHeader": 12288,
                                          "FileInfoReadLimitFooter": 262144,
                                          "MaxLayerHeight": 0.9,
                                        

                                        Additonally,

                                        sudo systemctl status duetcontrolserver:

                                        jpomo@jpomo-desktop:~$ sudo systemctl status duetcontrolserver
                                        ● duetcontrolserver.service - Duet Control Server
                                           Loaded: loaded (/usr/lib/systemd/system/duetcontrolserver.service; enabled; vendor preset: ena
                                           Active: active (running) since Mon 2020-01-13 13:09:55 MST; 589ms ago
                                         Main PID: 17421 (DuetControlServ)
                                            Tasks: 9 (limit: 4182)
                                           CGroup: /system.slice/duetcontrolserver.service
                                                   └─17421 /opt/dsf/bin/DuetControlServer
                                        
                                        Jan 13 13:09:55 jpomo-desktop systemd[1]: Started Duet Control Server.
                                        Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Duet Control Server v1.2.3.0
                                        Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Written by Christian Hammacher for Duet3D
                                        Jan 13 13:09:56 jpomo-desktop DuetControlServer[17421]: Licensed under the terms of the GNU Publi
                                        
                                        

                                        sudo systemctl status duetwebserver:

                                        ● duetwebserver.service - Duet Web Server
                                           Loaded: loaded (/usr/lib/systemd/system/duetwebserver.service; enabled; vendor preset: enabled)
                                           Active: active (running) since Mon 2020-01-13 12:52:11 MST; 18min ago
                                         Main PID: 4592 (DuetWebServer)
                                            Tasks: 19 (limit: 4182)
                                           CGroup: /system.slice/duetwebserver.service
                                                   └─4592 /opt/dsf/bin/DuetWebServer
                                        
                                        Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]:    at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                                        Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]:    at DuetAPIClient.BaseConnection.Connect(ClientInitMessage initMessage, String socketPath, CancellationToken cancellationToken
                                        Jan 13 13:10:26 jpomo-desktop DuetWebServer[4592]:    at DuetWebServer.Services.ModelObserver.Execute() in /home/christian/duet/DuetSoftwareFramework/src/DuetWebServer/Services/Mo
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: warn: DuetWebServer.Services.ModelObserver[0]
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]:       Failed to synchronize machine model
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]: System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (99): Cannot assign requested address /var/run/dsf/dcs.sock
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]:    at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]:    at System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]:    at DuetAPIClient.BaseConnection.Connect(ClientInitMessage initMessage, String socketPath, CancellationToken cancellationToken
                                        Jan 13 13:10:31 jpomo-desktop DuetWebServer[4592]:    at DuetWebServer.Services.ModelObserver.Execute() in /home/christian/duet/DuetSoftwareFramework/src/DuetWebServer/Services/Mo
                                        

                                        As far as I know, I have set the correct GPIO pin and SPI frequency.

                                        Any advice is appreciated!

                                        1 Reply Last reply Reply Quote 0
                                        • chrishammundefined
                                          chrishamm administrators
                                          last edited by 13 Jan 2020, 22:36

                                          Have a look at the note in https://duet3d.dozuki.com/Wiki/Getting_Started_With_Duet_3#Section_Enabling_SPI I haven't tested this on a Jetson Nano, though.

                                          Duet software engineer

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA