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

    OK now I have my Raspberry Pi 4

    Scheduled Pinned Locked Moved
    General Discussion
    6
    24
    1.1k
    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.
    • Danalundefined
      Danal
      last edited by Danal

      My Duet 3 did not come with a card.

      You can tell if the card that came with yours is for the Pi as follows:

      1. Insert it in a windows PC.
      2. If windows shows a new drive labeled "boot", AND asks you to format another drive, that's the correct card for the Pi.

      DO NOT format!! Just hit cancel on that request.

      If for any reason you need to "build" a card for the Pi, follow the instructions at the link given above, starting with section "Duet Software Framework on Raspberry Pi". If you've never worked with Linux, just cut/paste the commands exactly as shown and they will work fine.

      So really there are four steps to get it running, and a couple more to connect to it:

      1. Get the image
      2. Balena etch the image onto an SD (no need to unzip it)
      3. For WiFi, edit the "wpa_supplicant.conf" file on the SD card. It contains a bunch of examples. Do edit with something that leaves the file as plain text (that is, do not use wordpad or word or etc. Do use notepad or Sublime Text or notepad++ or similar)

      For ether, just plug in the cable.

      1. SD in Pi, power it up, let it boot and join your network.
      2. Find the IP address of the Pi. This depends very much on your network or router, so we can't really advise you.
      3. SSH to the Pi as shown in the last red circle and run those two commands.

      And, of course, use a browser to connect to that same IP address and you should see DWC2 screens.

      4260f64b-da57-4314-b29f-b91430ae5057-image.png

      Delta / Kossel printer fanatic

      1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt
        last edited by

        Hi,

        Thanks much.

        The SD card behaved as you said when inserted into my Windows machine.

        So I then inserted into the Pi, connected a network cable and powered it up. I could tell by querying my DHCP server what was just handed an IP address, so I tried it and I got something that looked very much live DWC 2.0.4.

        A new quick tests make it clear that some things must now be configured on the Pi. I guess that is where SSH comes in.

        I did edit that file regards WiFi but it didn't seem to work.

        I will find something that does SSH and see what I can mess up. 😉

        Frederick

        Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by

          @fcwilt said in OK now I have my Raspberry Pi 4:

          A new quick tests make it clear that some things must now be configured on the Pi. I guess that is where SSH comes in.

          You should be able to do EVERYTHING that is "Duet-ish" via the web interface. No SSH needed for this, ever.

          With one possible exception: The Duet software framework on the Pi itself. That's the very last two commands in the red circles above. And... most Pi software is set up to run those commands a 3AM (or something like that) every so often. So if it is connected to a network, and powered on, etc. it should update itself.

          I did edit that file regards WiFi but it didn't seem to work.

          You can try again. It is possible that the file has been removed from the partition that is accessible to windows. If so, name it "wpa_supplicant.conf" and make it something like this:

          ctrl_interface=/var/run/wpa_supplicant
          update_config=1
          country=US
          
          network={
                  ssid="USDNLN02"
                  psk="blahblah"
          }

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt
            last edited by

            Hi,

            Thanks for the help.

            I will pull the SD card and try again.

            Using PUTTY I was able to find (I think) that file but I was unable to look at it due to permissions issues.

            A search suggested a tool raspi-config which did run and had an option to change WiFi settings BUT it reported some kind of error.

            I really dislike command lines. 😉

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by

              @fcwilt said in OK now I have my Raspberry Pi 4:

              due to permissions issues.

              If this happens again, prefix whatever command with "sudo".

              The very first time you use sudo, it will issue some warnings and ask for the 'pi' user password. After that, it just silently works.

              Delta / Kossel printer fanatic

              fcwiltundefined 1 Reply Last reply Reply Quote 0
              • fcwiltundefined
                fcwilt @Danal
                last edited by

                @Danal

                Sudo?

                Will do.

                Did I mention I really dislike command lines? What century are we living in again?

                Thanks.

                Frederick

                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                1 Reply Last reply Reply Quote 0
                • Phaedruxundefined
                  Phaedrux Moderator
                  last edited by

                  Command lines can be a godsend. It's a very direct way of interacting with the system. It may seem a little archaic, but sometimes the old ways are still the best ways.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  fcwiltundefined 1 Reply Last reply Reply Quote 1
                  • fcwiltundefined
                    fcwilt @Phaedrux
                    last edited by

                    @Phaedrux said in OK now I have my Raspberry Pi 4:

                    Command lines can be a godsend. It's a very direct way of interacting with the system. It may seem a little archaic, but sometimes the old ways are still the best ways.

                    I knew good old DOS inside and out but I've gotten spoiled.

                    Frederick

                    Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                    1 Reply Last reply Reply Quote 0
                    • fcwiltundefined
                      fcwilt
                      last edited by

                      Hi,

                      I pulled the SD card and the initial wpa_supplicant.conf was gone.

                      So I created another file on the card and made sure that all was correct.

                      The I reinstalled the card into the Pi, applied power and I was able to connect via WiFi.

                      So all is good - for now.

                      Thanks to all.

                      Now to figure out what the Pi is going to be good for.

                      Frederick

                      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                      1 Reply Last reply Reply Quote 0
                      • Danalundefined
                        Danal
                        last edited by Danal

                        Excellent!

                        At first, it is pretty transparent that the pi even exists. DWC just works, etc. It is a little faster, and the WiFi is a little more reliable, than the old way. But mostly, it is just invisible.

                        First potential advantage: SSH to the pi and enter:

                        sudo journalctl -fu duetcontrolserver
                        

                        Then do something with the printer. A bunch of log info will come out in real time. The logs you see can be handy when something odd is happening. The -f means "follow". The 'u duetcontrolserver' tells it which log. Ctl-C to stop following.

                        If you do not happen to be actively following the log at the moment something happens, you can

                        sudo journalctl -u duetcontrolserver
                        

                        To dump the entire log. Which will just scroll by on the terminal. So you probably want to pipe it to a grep (search), or redirect it to a file, or whatever. One example:

                        sudo journalctl -u duetcontrolserver | grep -i warn
                        

                        Will show only the lines containing "warn". The -i flag is "ignore case".

                        There's a ton of unix commands, I won't go any further, there's just lots and lots of ways to manipulate that log.

                        Delta / Kossel printer fanatic

                        1 Reply Last reply Reply Quote 2
                        • Danalundefined
                          Danal
                          last edited by Danal

                          One other bit of trivia that may turn out to be useful someday.

                          On the Pi file system, directory /opt/dsf/sd/ is what the Duet 'sees' as its 'sd card'. You can manipulate any file there with full unix tools.

                          Also, /opt/dsf/sd/www is Linux linked to /opt/dsf/dwc2 so it is easy to have different releases or customizations of dwc and just 'point' at them to switch.

                          This looks like this:

                          pi@duet3:~ $ ls -al /opt/dsf/sd
                          total 24
                          drwxr-xr-x 6 pi pi 4096 Oct 21 19:37 .
                          drwxr-xr-x 7 pi pi 4096 Oct 21 19:15 ..
                          drwxr-xr-x 3 pi pi 4096 Oct 28 19:46 filaments
                          drwxr-xr-x 2 pi pi 4096 Nov  8 21:06 gcodes
                          drwxr-xr-x 2 pi pi 4096 Nov 11 11:54 macros
                          drwxr-xr-x 2 pi pi 4096 Nov 10 16:22 sys
                          lrwxrwxrwx 1 pi pi    7 Oct 21 19:37 www -> ../dwc2
                          pi@duet3:~ $
                          

                          That last little -> is the link. Too long and confusing to try to document Unix symbolic link commands here... suffice it to say that little tricks like this make it VERY flexible to manipulate releases or similar when messing with the printer. Nothing you ever have to do... that very first set of "sudo apt-get update", "sudo apt-get upgrade" will always work from Duet's own distributions... just something you might want to do when experimenting or debugging.

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 1
                          • fcwiltundefined
                            fcwilt
                            last edited by

                            Thanks much. Interesting stuff.

                            Perhaps you know that answer to this: Could a form of M587 be implemented that would make the necessary settings in Pi, so as to keep things more "Duet" like?

                            Frederick

                            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                            deckingmanundefined T3P3Tonyundefined 2 Replies Last reply Reply Quote 0
                            • deckingmanundefined
                              deckingman @fcwilt
                              last edited by

                              @fcwilt At my time of life (approaching 67) and with a mechanical engineering background, I'm really finding it hard to learn Linux in it's various guises. That's one of the reasons why I haven't yet "pressed the switch" on my RPi. I've put Manjaro on an old laptop which I intend to use as a dedicated printer laptop. But I don't know what the hell I'm doing with it and I'm on the cusp of putting an ssd in it and installing Windows instead.

                              I think I'm just going to have rely on these clever people to write any add ons or plug-ins that I might want to use.............

                              Ian
                              https://somei3deas.wordpress.com/
                              https://www.youtube.com/@deckingman

                              Danalundefined 1 Reply Last reply Reply Quote 1
                              • T3P3Tonyundefined
                                T3P3Tony administrators @fcwilt
                                last edited by

                                @fcwilt said in OK now I have my Raspberry Pi 4:

                                Could a form of M587 be implemented that would make the necessary settings in Pi, so as to keep things more "Duet" like?

                                We will implement functions through the UI (may or may not use M587) to make this easier over time. We are deliberately being cautious about thinks like networking, file permission modification etc because we don't want to introduce security flaws into the design.

                                www.duet3d.com

                                fcwiltundefined 1 Reply Last reply Reply Quote 1
                                • fcwiltundefined
                                  fcwilt @T3P3Tony
                                  last edited by fcwilt

                                  @T3P3Tony said in OK now I have my Raspberry Pi 4:

                                  We will implement functions through the UI (may or may not use M587) to make this easier over time. We are deliberately being cautious about thinks like networking, file permission modification etc because we don't want to introduce security flaws into the design.

                                  Caution can be good.

                                  As I had a bit of difficulty getting the WiFi to work I thought there should be a simpler way.

                                  The initial changes to wpa_supplicant.conf (they couldn't just call it "WiFi Configuration" now could they) didn't seem to work.

                                  The suggested utility "raspi-config" didn't work for WiFi either, although I was able to change the host name (another candidate for a M command).

                                  The second attempt at creating wpa_supplicant.conf worked.

                                  I would hardly call the whole procedure user friendly and certainly not "Duet Like".

                                  But I certainly understand the whole thing is still a work in progress and I am not upset with where it is.

                                  Frederick

                                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                  1 Reply Last reply Reply Quote 0
                                  • Danalundefined
                                    Danal @deckingman
                                    last edited by Danal

                                    @deckingman said: At my time of life (approaching 67) and with a mechanical engineering background...

                                    63 and a Psych major here... we can do it !

                                    Also, if you've been a windows user all your life, there are several basic concepts in Linux that are just "close enough looking" to windows, but VERY different even one layer under the covers, to make it more frustrating than if it were more different. If that sentence parses...

                                    I'm not sure exactly what to suggest to break through that barrier (I had a friend that really understood both 'hold my hand', and was incredibly frustrated until that happened), so I'll see if I can find a short tutorial...

                                    Anyway, hang in there.

                                    Delta / Kossel printer fanatic

                                    deckingmanundefined 1 Reply Last reply Reply Quote 0
                                    • deckingmanundefined
                                      deckingman @Danal
                                      last edited by

                                      @Danal Actually it was me who said about approaching 67, not @fcwilt.

                                      I also pre-date MS Windows so I understand a bit about using the command line as per DOS. And many, many years ago I taught myself to write simple programmes using BASIC in the days of the ZX81. Likewise I've bumbled about a bit with Arduino projects and before that "bit bashing" with Microchip PICs. But I've never really grasped any of it. With me it's a case of Google and YouTube to get done what I need, then I promptly forget it all. I think the thing that serves as my brain is simply full like an old HDD that needs cleaning of all the crap that's accumulated over the years - or at least it needs de-fragmenting. ☺

                                      Ian
                                      https://somei3deas.wordpress.com/
                                      https://www.youtube.com/@deckingman

                                      Danalundefined 1 Reply Last reply Reply Quote 0
                                      • Danalundefined
                                        Danal @deckingman
                                        last edited by Danal

                                        @deckingman Obviously mine needs a good defrag as well, given that I crossed the user tags (now edited).

                                        And my "too close, but actually different" applies even more to the DOS command line vs. the Unix command line.

                                        Delta / Kossel printer fanatic

                                        deckingmanundefined 1 Reply Last reply Reply Quote 0
                                        • deckingmanundefined
                                          deckingman @Danal
                                          last edited by

                                          @Danal said in OK now I have my Raspberry Pi 4:

                                          ................And my "too close, but actually different" applies even more to the DOS command line vs. the Unix command line.

                                          Getting too far off topic so apologies to @fcwilt but I've also been trying to learn Greek for a number of years, and "close but actually different" could be applied to the Greek Alphabet. Therefore, my excuse for not understanding Unix from now on will be "It's all Greek to me".

                                          Ian
                                          https://somei3deas.wordpress.com/
                                          https://www.youtube.com/@deckingman

                                          fcwiltundefined 1 Reply Last reply Reply Quote 1
                                          • fcwiltundefined
                                            fcwilt @deckingman
                                            last edited by

                                            @deckingman said in OK now I have my Raspberry Pi 4:

                                            Getting too far off topic

                                            I actually like seeing how these discussions evolve and branch out. There is much that can be learned from unexpected sources.

                                            Frederick

                                            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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