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

How does one set up a Duet3D 6HC with RPi4 to wifi?

Scheduled Pinned Locked Moved Solved
General Discussion
7
23
992
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
    Jim46
    last edited by 17 May 2020, 20:16

    After searching the forum and the Duet3 documentation, i'm asking how one does the WiFi set up. Presently, I use ethernet cable form the Pi to my PC. So, I'm moving set up to install motor where on WiFi is available. Thanks in advance for your help.
    Jim

    undefined 1 Reply Last reply 17 May 2020, 20:28 Reply Quote 0
    • undefined
      garyd9 @Jim46
      last edited by garyd9 17 May 2020, 20:28

      @Jim46 Running the Duet3 in "standalone" mode (so the Pi would be connected to the Duet3 with an ethernet wire and the Pi would bridge to wifi) or running it with the Pi as a SBC (using DSF - which would require nothing more than a normal wifi config on the Pi)

      "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by 17 May 2020, 21:49

        Running sudo raspi-config from putty, choose Network Options and Wireless LAN and fill in the SSID and passphrase as requested is simple to follow.

        ref https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

        1 Reply Last reply Reply Quote 0
        • undefined
          Danal
          last edited by 18 May 2020, 00:12

          Assuming you are going to follow the Duet documentation to build your Pi, and attach it by ribbon cable:

          After you've downloaded and 'etched' the image to a card, you fill find a file called "wpa_supplicant.conf" on the card. Edit this, and it will be obvious where to put your SSID and Password.

          The only tricky thing is to use an editor that will be OK with "Unix line ends", and not put "Windows line ends" in the file. Notepad++, Sublime, Atom, almost any editor used by programmers. NOT Word or Wordpad.

          At first boot, the Pi will move this to another directory, and use it. It will then come up on your wireless. You can find its IP address with your router (if you know how) or you can try "duet3.local" or "duet3.lan". That last one worked for me.

          Delta / Kossel printer fanatic

          ? 1 Reply Last reply 18 May 2020, 21:14 Reply Quote 0
          • ?
            A Former User
            last edited by 18 May 2020, 21:10

            The link "Bearer" listed is what I used successfully.

            Just remember to to disconnect the ethernet cable and then re-boot the pi
            before attempting to connect via wifi and getting pissed when it wont connect, dont ask me how i know......

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @Danal
              last edited by 18 May 2020, 21:14

              @Danal said in How does one set up a Duet3D 6HC with RPi4 to wifi?:

              Assuming you are going to follow the Duet documentation to build your Pi, and attach it by ribbon cable:

              After you've downloaded and 'etched' the image to a card, you fill find a file called "wpa_supplicant.conf" on the card. Edit this, and it will be obvious where to put your SSID and Password.

              I tried this: To set up WiFi, you can edit "wpa_supplicant.conf" on the SD card (first partition).

              I couldnt get my win10 machine to display the first partition on the SD card, which is why i ended up following the method that Bearer linked to.

              ? 1 Reply Last reply 19 May 2020, 00:24 Reply Quote 0
              • ?
                A Former User @A Former User
                last edited by 19 May 2020, 00:24

                @CaLviNx said in How does one set up a Duet3D 6HC with RPi4 to wifi?:

                I tried this: To set up WiFi, you can edit "wpa_supplicant.conf" on the SD card (first partition).

                I couldnt get my win10 machine to display the first partition on the SD card, which is why i ended up following the method that Bearer linked to.

                thats odd; it should also work on an already running system, but at that point raspi-config is easier and rules out a bit of typing errors and formatting issues. on a brand new image I tend to opt to add the file to the first (/boot) partition if I have the card in my computer anyway and winodws 10 isn't a problem as the partition should be fat32 for raspbian at least (after booting the card once the wpa_supplicant.conf file is removed from /boot but it shouldn't prevent windows from showing the partition, and you can just add a new file afaik)

                1 Reply Last reply Reply Quote 0
                • undefined
                  Jim46
                  last edited by 19 May 2020, 02:08

                  They current system is the Duet3D is connected to RPi4 which has the Duet3 microSD card installed whic brings up the blue Duet landing page.
                  The PC and RPi are connected by an ethernet cable. I am able to run commands successfully using the DWC2.

                  I launched Putty and was success getting to the command line.
                  ran sudo raspi-config. Selected Network Options, the selcted WiFI, then received the following errros:

                  1. could not communicate with wpa_supplicant....hit enter received
                  2. there was an error running option N2 WiFi.

                  Also tried to run sudo iwlist wlan0 scan.
                  It appeared to work and I was able to find ESSID: "ng Hub_ xxxxxxxxxxx"
                  I also found my 2.4 Ghz net wrk and mt guest network, but not my 5Ghz even though it shows in my router map.

                  what an i doing wrong?

                  Thanks,

                  Jim

                  ? 1 Reply Last reply 19 May 2020, 04:22 Reply Quote 0
                  • ?
                    A Former User @Jim46
                    last edited by A Former User 19 May 2020, 04:22

                    @Jim46 could be the wifi country option isn't set, preventing wpa_supplicant running, should be an option for that in raspi-config, but i think it only works to change the country, not add it, try it if you find it.

                    If not, I think the following may work, copy and paste the below into putty

                    cat << EOF | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null
                    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
                    update_config=1
                    country=US
                    EOF
                    sudo systemctl restart wpa_supplicant.service
                    
                    

                    and press enter after. Then run sudo raspi-config again, if it still fails you may have to reboot the pi after making the country change. running sudo reboot and reconnecting after 30 seconds or so should take care of it)

                    edit: for future ref i think this worked after all - but i also think it may need some foolproofing. But should ask for SSID and Passphrase, then output the correct file (for the US) with the encrypted passphrase.

                    read -p "Enter SSID: " SSID &&
                    read -p "Enter passphrase: " PASS &&
                    cat << EOF | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null &&
                    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
                    update_config=1
                    country=US
                    EOF
                    wpa_passphrase "$SSID" "$PASS" | grep -v $PASS | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null &&
                    sudo rfkill unblock wifi &&
                    sudo systemctl restart wpa_supplicant.service &&
                    wpa_cli -i wlan0 reconfigure
                    
                    

                    (but I still suspect a reboot after is needed)

                    edit2: seems there is something that causes raspi-config to fail with the DuetPi image, a clean vanilla Raspbian image will first ask for Wifi country then SSID/passphrase. might do some more poking.

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Jim46
                      last edited by 19 May 2020, 18:06

                      Hi Bearer, I just ran your suggestions including the reboot and it worked! Thanks so much!
                      Jim

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by 19 May 2020, 18:11

                        Goodie! Wasn't quite sure how well the code would copy/paste, but a little luck is always a fine substitute for careful planning and testing:)

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by 20 May 2020, 09:14

                          @chrishamm might want to consider rebuilding the DuetPi image without a default wpa_supplicant.conf on /boot, or at the very least rename it to wpa_supplicant.conf.sample or something as it currently breaks raspi-config's ability to setup wifi if the user boots the card without editing the file first. It would also potentially violate the wifi regulations as the country is set to GB.

                          Maybe its possible to keep the file as wpa_supplicant.conf with parts commented out but not sure that'll work or be any more helpfull.

                          1 Reply Last reply Reply Quote 2
                          • undefined
                            Jim46
                            last edited by 21 May 2020, 01:08

                            Hello All,
                            I installed the motors on the frame and tried to run the same test as on the bench. The x axis work well. Both the Y and Z dual motor axes ran into trouble. It seems I had best drives slip. Have to check that and also make sure the motors are moving in the same direction.
                            Cheers
                            Jim

                            ? 1 Reply Last reply 21 May 2020, 01:13 Reply Quote 0
                            • ?
                              A Former User @Jim46
                              last edited by A Former User 21 May 2020, 01:13

                              @Jim46 said in How does one set up a Duet3D 6HC with RPi4 to wifi?:

                              Have to check that and also make sure the motors are moving in the same direction.

                              given the lack of standards with respect to colour coding motor wiring it could be they theoretically move opposite even if it looks like they're wired the same.

                              the easiest way to reverse the direction if needed is to add R1 to the M569 line for the relevant axis. (ed: change S0 to S1 and vice versa in the relevant M569 line)

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                Jim46
                                last edited by 21 May 2020, 16:24

                                Hi Bearer,
                                Currently, it says, e.g.,
                                M569 P2 S1... (Y1 motor) physical drive 2 goes forward
                                M569 P3 S1... (Y2 motor) Physical drive 3 goes forward

                                the motors now face away from each other on the Y axis
                                so is it right to set up the P3 as follows
                                M569 P2 R1 ????
                                Thanks,
                                Jim

                                ? 1 Reply Last reply 21 May 2020, 18:15 Reply Quote 0
                                • undefined
                                  jay_s_uk
                                  last edited by 21 May 2020, 16:32

                                  Changing S1 to S0 changes the motor direction.

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    Jim46
                                    last edited by 21 May 2020, 17:07

                                    Thanks you so much, I reset it as
                                    M569 P2 S1... (Y1 motor) physical drive 2 goes forward
                                    M569 P3 S0... (Y2 motor) Physical drive 3 goes reverse
                                    M569 P4 S1... (Z1 motor) physical drive 4 goes forward
                                    M569 P5 S0... (Z2 motor) Physical drive 5 goes reverse

                                    also used dual M584 lines x and Y and next line for Z and E

                                    It is installed in the printer framce and it works! Thanks again!
                                    Next is to design the extrustion head and design something to print out as a test.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Jim46
                                      last edited by 21 May 2020, 17:08

                                      BTW, how does one mark a thread "SOLVED"?

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        jay_s_uk
                                        last edited by 21 May 2020, 17:10

                                        There's an option to set ask a question bottom right. You can then mark it solved

                                        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

                                        1 Reply Last reply Reply Quote 0
                                        • ?
                                          A Former User @Jim46
                                          last edited by A Former User 21 May 2020, 18:15

                                          @Jim46 said in How does one set up a Duet3D 6HC with RPi4 to wifi?:

                                          M569 P2 R1 ????

                                          My bad! Jay corrected it thankfully - too bad I didn't see it earlier, one of the issues I've found myself dealing with earlier (today)..

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