This guide describes how to setup an optional Single Board Computer (SBC) with Duet 3, allowing the Duet to run in 'SBC mode'. If you don't have, or don't want to connect, an SBC to your Duet, it is not necessary; you can run your Duet in 'standalone' mode, and ignore this guide.
Duet 3 mainboards support connecting a Single Board Computer (SBC) such as a Raspberry Pi. The SBC runs its operating system (Raspberry Pi OS in the case of Raspberry Pi), with the Duet Software Framework (DSF) running on the Raspberry Pi OS. DSF is the bundle of software programs that connects to and controls the Duet 3.
SBC mode allows part of the functionality to be handled by the SBC. This offers a number of benefits:
Duet 3 mainboards are supplied with an SD card pre-loaded with the Raspberry Pi OS + DSF, suitable for use with Raspberry Pi 3 or 4. This guide assumes you are using a Raspberry Pi and the SD card image specifically set up for Duet 3. In the future other SBCs may be officially supported.
Most of the time you can start at Step 2 below, as you will receive an SD card pre-flashed with the Raspberry Pi OS + DSF. If your SD card supplied with the Duet 3 mainboard becomes damaged or lost, start at step 1.
If you want to install DSF on an existing Raspberry Pi OS installation, or on a custom Debian board/installation, please see this page: Duet Software Framework (DSF) on other boards
If you are planning to use the SBC for more than plain 3D printing or if you have an SBC with little RAM + external display, it is HIGHLY recommended to obtain a class A1- or A2-rated microSD card instead of the shipped SD card. If your SD card speed is insufficient, you may experience occasional problems when data between the SBC and Duet is exchanged.
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.
Turn on power to Duet and SBC.
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:
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.
If you do not have a screen/keyboard attached to your SBC and your browser cannot connect over wifi all, you will get a message in your browser similar to the one on the right.
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.
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.
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.
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.
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”
Under macOS and Linux the "ssh" program is accessible from the command line. macOS guide here.
ssh pi@duet3.local
For all systems, once connected, 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
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.
Install the realVNC client on the machine you want to use to connect. 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.
Once your Raspberry Pi has established an internet connection, it is recommended to install the latest updates. To do so, connect via SSH or VNC (see above) to your Raspberry Pi or open a terminal (if you have keyboard and monitor connected) and run:
sudo apt update
sudo apt dist-upgrade
This will install the latest software components and the latest RepRapFirmware version on your Duet 3. You can do this regularly to update the system as new firmware is released.
To switch between stable/release package feed and unstable/beta package feed, see DSF installation.
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 RepRapFirmware 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.
The changes required to create a set of Duet 3 config files is outside the scope of this guide. Please see the Migrating from RRF2 to RRF3 guide 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.
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
sudo raspi-config
When you next boot with a screen, or log in with VNC, Chromium may give you the following warning. Select “unlock Profile and Relaunch”.