SBC Setup for Duet 3
Duet 3 mainboards are supplied with an SD card loaded with the Raspian OS suitable for Raspberry Pi 2, 3B+ or 4. This page will outline how to get setup initially, and what to do if there are issues.
Introduction
This guide describes how to setup a Single Board Computer with Duet 3. It assumes you are using Raspian (the operating system that runs on the Raspberry Pi) and are using the SD card image specifically setup for Duet 3. In the future other SBCs may be officially supported. Most of the time you can start at Step 2 as you will receive a SD card pre-flashed with the image of Raspian, however If your SD card supplied with the Duet 3 mainboard becomes damaged or lost, start at step 1.
Step 1 - Flash the image file
You will need at least an 8Gb class 10 SD card.
There are multiple programs to write an image file to an SD card. If there are any issues with this step, try following the Raspberry Pi documentation for flashing OS images
You need to use the latest Raspian image setup for Duet 3 that is available from the Duet 3D software site. You may choose the lite image for a GUI-less setup and the full variant for setups where a display is attached:
https://pkg.duet3d.com/DuetPi-lite.zip
https://pkg.duet3d.com/DuetPi.zip
Under Windows, MacOS and Linux, flash the file using using “etcher”
Select the image, select the SD card. Click flash. Will take about 5 minutes.
Once this is complete Windows may prompt you to format the disk. Do not do this, it is because Windows does not recognise one of the partitions on the image.
Step 2 - Setup wifi
This step is optional if you are going to connect to the SBC using an Ethernet network, or if you are going to plug a monitor, keyboard and mouse into the SBC.
Navigate to the “boot” partition on the SD card (note on Windows the other partition will be inaccessible and give an error if you try and access it, this is normal as it is formatted in a filesystem that Windows does not support).
Create a new file named “wpa_supplicant.conf” (exact naming is critical, do not have a ".txt" at the end of the file).
In a text editor add the following:
country=GB update_config=1 ctrl_interface=/var/run/wpa_supplicant network={ ssid="SSID_OF_NETWORK" psk="PASSWORD_OF_NETWORK" }
Replacing the SSID_OF_NETWORK with your wifi SSID and PASSWORD_OF_NETWORK with your password.
Save and safely eject the SD card.
Step 3 - First Boot
Put the SD card in the SBC, connect the ribbon cable to the Duet 3 and connect a USB cable to the Duet 3 for power. Ensure there is NO SD card in the Duet itself.
Note the orientation of the red stripe on the ribbon cable indicating pin 1.
It is acceptable, especially with longer ribbon cables than shown here, to route the cable around the back of the SBC, however pin 1 must connect as shown:
Ensure the USB supply is sufficient to power the peripherals attached to the Pi, especially screens that do not have a separate power supply. See here for more details on 5v power jumper position selection. Using a Pi4 may require a separate power supply for both the Duet and Pi4 due to power draw. The same holds true it using peripherals that draw power via USB.
If you have a screen attached when power is applied you will see the SBC boot up. Once bootup is complete the Chromiun browser will launch DuetWebControl in full screen. press F11 if you want to exit fullscreen.
If you are connecting over the network then go to “http://duet3.local/” note the SBC takes about 1 minute to boot for the first time and about 30 seconds subsequently.
If http://duet3.local/ does not show Duet Web Control (DWC) then follow these trouble shooting steps:
Troubleshooting
Note that these steps assume the hostname of your SBC is "duet3" if you have changed it then the mDNS resolution will be the new hostname, not "duet3". Also note that you cannot use the gcode command M550 to set your printer hostname, as you could on Duet 2.
Duet 3 and SBC not communicating
- If the Duet is not showing up on the Pi when doing a lsusb it may be a power supply issue. Try powering the Duet and SBC separately and see if the problem is resolved.
Duet 3/SBC not on the network (http://duet3.local does not work)
- If you do not have a screen/keyboard attached to your SBC and your browser cannot connect over wifi all, you will get something that looks like this:
- Log into your router and confirm that the SBC has received an IP address. If it is not shown at all move to the next section: wifi not working at all.
- If an IP address is shown for the SBC the enter that address in the browser e.g. http://192.168.1.123 If this works then its possible that your network or PC does not like the mDNS service used to provide the http://nnnnnn.local names. The best way around this is to reserve the IP address in your router so the SBC always receives the same address.
wifi not working at all
- You may have mis-configured the wpa_supplicant.conf. If possible plug the SBC into your router using an Ethernet cable temporarily to reconfigure Wifi. If that is not possible then try adding the wpa_supplicant.conf file to the "boot" partition of the SD card again.
- If neither work then try temporarily connecting a screen and keyboard to the SBC to see whats going on.
- If you are using a screen and keyboard temporarily, then followthis guide to get wifi running.
- If you are using Ethernet temporarily then follow Step 5 - Accessing the SBC through SSH/VNC, below to get command line/VNC access to your SBC, then you canfollow this guide to get wifi running.
DWC does not appear correctly (500 error)
If you get a "HTTP ERROR 500 - This page is not working" response
either when going to http://duet3.local or to the IP address Then the SBC is on the network, but Duet Software Framework (the Duet3 software that runs on the SBC) is not operating correctly.
- The most likely cause of this is that it cannot connect to the Duet 3 Mainboard.
- Check the ribbon cable is installed correctly.
- Check that the mainboard has firmware installed (follow the "by USB" part of this documentation).
- If none of these steps work see the Troubleshooting Duet 3 - SBC communications documentation.
Gcode commands not being accepted
Ensure there is no SD card in the Duet itself. In order to run in SBC connected mode, the Duet SD card slot must be empty. If an SD card is present in the Duet, it will attempt to start in standalone mode.
Step 4 - Configuring system files
By this step you should have Duet Web Control showing when you go to http://duet3.local or the IP address of your SBC.
The default SD card image does not come with the system files configured for your printer - there are many different types of machines that are supported so you need to generate a config.g, homing files, and other system macro files that are required.
The online configuration tool has been updated to support the generation of config files for RRF3. Though you may still need to manually implement some of the more advanced features. https://configtool.reprapfirmware.org/
- If you have a set of files for your printer for Duet 2 use those as the start point for the values used in the config tool.
- If you do not have a set of Duet 2 config files then use the config tool to generate a set with everything as closely matched to your printer as possible, and then carefully commision the printer to verify proper operation.
The changes required to create a set of Duet 3 config files is outside the scope of this guide. Please see the RepRapFirmware 3 overview for a list of the gcodes that need changing to get a config.g setup for duet 3.
Once you have a set of system files they can be uploaded via the "system" tab in DWC.
Step 5 - Accessing the SBC through SSH/VNC
Note this is optional if you have a screen and keyboard attached to the SBC
In the future it is the intention that all the required interaction between a user and the Duet 3, including the SBC, can be done through Duet Web Control. At this point in time it is necessary to have either a ssh command line, or VNC connection, in order to update the Duet Software Framework software that runs on the SBC.
Connecting via SSH
DuetPi lite (no GUI) has SSH enabled by default and wpa_supplicant.conf is present on the boot partition, because usually you don't have a display attached to those setups.
DuetPi (with GUI) does not have SSH enabled by default, but you can enable it by putting an empty "ssh" file on the boot partition.
Note, this part is mainly for Windows, under MacOS and Linux the "ssh" program is accessible from the command line.
Under Windows the easiest way is via “Putty”:
- Download & Install Putty.
- Enter duet3.local or your SBC IP address and select ssh.
- Agree to the security alert - its Putty Saying it has never connected to this SSH server before.
- Login with username “pi” and password “raspberry”
You will be presented with a command line:
pi@duet3:~ $
To update the Duet Software Framework and other system components type:
sudo apt update
(the sudo password is raspberry)
Then
sudo apt upgrade
Connecting via VNC
If you prefer a desktop environment to a command line then you can use the realVNC client to connect.
- First follow the steps above in "Connecting via SSH" until you are at a command line on the pi.
- type
sudo raspi-config
- Navigate to Interfacing Options.
- Scroll down and select VNC > Yes.
- Choose advanced options -> resolution and select the resolution you would like to use (you may find better performance using a medium resolution, not the highest)
- Save and reboot when prompted
- Install the realVNC client on the machine you want to use to connect from (https://www.realvnc.com/en/connect/downl...) You can use the free version non commercially.
- Once installed open the realVNC client, go to "file" -> "new connection" and use duet3.local or the IP address of your SBC to connect. the username and password are the same as for ssh.
Changing the SBC hostname
This is an optional step if you only have a single duet3 on your network. It is required if you have more than one duet 3 as each duet 3 on a network needs a unique host name.
The name of the printer is its hostname on the network, you will need to connect to the SBC over SSH or VNC (as described above) in order to run the Raspberry Pi configuration utility and change the hostname. In future there will be an easier way to set the hostname within DuetWebControl. ''note that you cannot currently use the gcode command M550 to set your printer hostname, as you could on Duet 2."
- Connect via ssh or VNC.
- At a command prompt type
sudo raspi-config
- Select “System Options” -> Hostname-> “OK”-> and set the new printername/hostname.
- Note the hostname must confirm to certain limitations to be valid.
- Valid characters for hostnames are letters from a to z,
- the digits from 0 to 9,
- the hyphen (-).
- Select “Finish” and reboot.
When you next boot with a screen, or log in with VNC, Chromium may give you the following warning. Select “unlock Profile and Relaunch”.
8 Comments
can the sbc connected to the duet3 be used as the camera server if i connect the paspberry pi cam to its port? use the ip of the pi and then the port like normal? or do i need another pi?
jason lipavsky - Reply
In step 2: When using full image you have pre-created a WPA_supplicant file, so no need to create it. Comment to set country code to your country might be usefull. Step 5: People should create an empty file named SSH in order to get SSH access on headless setups. https://www.raspberrypi.org/documentatio...
BeTrue3D - Reply
Found SSH was enabled by default without adding the SSH file. I feel this should be clearly written in order not to leave open a potential severe security risk :)
BeTrue3D - Reply
I have found that the latest build the SSH is not enabled.
Steven Ulbrich -
DuetPi lite has SSH enabled by default and wpa_supplicant.conf is present on the boot partition, because usually you don't have a display attached to those setups.
DuetPi (with GUI) does not have SSH enabled by default, but you can enable it by putting an empty "ssh" file on the boot partition.
Jason Znack -