25. December 2016

Duet Wifi – Getting started

By BeTrue3D

This post is pretty old, so please go to the new post on the same subject:


Note: There is some usefull information in this post as well, but it’s important not to use Pronterface for your WiFi setup, as Pronterface converts all characters to CAPs.Welcome to the very first post in a long serie about the Duet Wifi controller.

This first Blog post contains:

  1. Download and install drivers
    1. Installing USB drivers
  2. Activate WiFi
    1. Download Printrun/Pronterface
    2. Activate WiFi using Pronterface
  3. Duet WiFi web interface
    1. Log on to the web interface for the first time
    2. Set WiFi to enabled automatic on startup
  4. Setup IP Address and name of controller
    1. Setup IP Address
    2. Specify a Name and password

Looking at the Duet Wifi Controller, we can see how it has a micro USB connector

A nice subtle usb cable is included with out Duet Wifi, which we’ll use to get started.

Download and install drivers

Before we do anything we head over to the Github repository cotaining the RepRapFirmware.

Here we click on Clone or download and then Download Zip.

Take the downloaded file, which is about 10MB, and extract it to a practical location.

Installing USB drivers

In order to use the Duet Wifi via USB we need to install some drivers. My windows 10 laptop actually installed some drivers on it’s own, and listed the device as generic COM port.

I didn’t test wheter communications worked ok or not, as I proceeded to install the drivers from Github.

Locate your drivers, which are located in RepRapFirmware-dev – Driver

Right-click the Duet.inf file and click Install

Now you say yes and accept any windows popping up on your screen untill it is done installing.

When finished you can see your Duet Wifi listed as Duet 3D printer control electronics in your device manager. Note the number listed after COM. In this case 3. We are going to use this in future steps.

Activate WiFi

Download Printrun/Pronterface

In order to activate WiFi, which we need in order to update firmware, we are going to use Printrun/Pronterface.

Note: You can use Repetier host, or any other host software you might like. I just like to use Printrun/Pronterface as it is extremely light and starts up very fast, so very usefull for faultfinding.

Click the Get it icon in the first box, or just click download in the top menu.

Now click the Windows & OSX binaries and find the newest file for Win or Mac, as fits your system. In my case I download the file Printrun-Win-Slic3r-03Feb2015.zip and unzip it somewhere practical.

You do not need to install it, and just start it by double-clicking pronterface.exe, which we do now.

Activate WiFi Using Printrun/Pronterface

  1. Plug in your USB cable to the Duet Wifi and to your computer. Do not turn on your main power source yet.
  2. Open Pronterface and check COM port. It should automatically choose the COM port available. Select manually if needed. In Baudrate you can just select the fastest option and then click Connect.
  3. In the right-hand window you can now see that your printer i Connected / Online.

    Printer is now online.

  4. Optional: Use the Gcode M503 to get a read out of your config.g file. This file is located on the SD card, so a readout means success.
  5. Enable WiFi by issuing the Gcode command: M552 S1
  6. After up to 30 seconds, you get the following message:

    Now you can see the Duet Wifi access point on your computer.
  7. If you are connected to your network using network cable, you need to disconnect this before connecting to the DuetWiFi network.
  8. Now connect to the DuetWiFi network and go to address in a browser.
    1) Select your Wlan and type in the password for the network.
    2) Specify a hostname, if you want a different name than duetwifi.
    3) Hit Save and reboot button.

  9. Don’t reboot by unplugging USB, but instead issue M552 S0 to turn off Wifi and then M552 S1 to turn it on again.
    You can see how my Duet WiFi were assigned the IP

    1. Note: If you need to check the status of the WiFi you can just issue the M522 Gcode command without parameters.
      Here we can see wifi is disabled and our IP address is right now.
    2. Lets turn on the WiFi by issuing the M552 S1 Gcode command.
      The WiFi is now turned on and IP changed to – IP changed as I haven’t yet defined a static IP address.
      Note: It is not possible (as of january 2017) to define a staic IP on the device. You need to assign a static IP via your router

Duet WiFi web interface

Logging on to the web interface for the first time

Now we log onto the Web GUI using the IP address assigned to our Duet WiFi

Here we can see the aweseome web gui of the Duet WiFi from where you can setup and control all aspects of the controller!

Set WiFi to enabled automatic on startup

In order to configure our WiFi to be enabled every time we power up the Duet WiFi we need to edit some config files. Instead of the “usual” way of doing it by editing files in a compiler, like Arduino IDE, and then spend a lot of time compiling and uploading it, we can edit the files directly from Web Gui and just apply the changes without any compiling taking place. Nice ehh? 🙂

  1. Click on Settings -> System Editor and the Pencil in the config.g file row.
  2. Find the line containin ; M552 S1 and remove the ;
    A semicolon in the start of a line means it is uncommented. This means the line isn’t executed. When we remove the semicolon we changed the uncommented state and enabled the line.
    Note: We can see which file we are editing in the top left corner. In this case config.g
  3. Click Save Changes when done.
  4. Go back to the General tab and click Apply Settings.

Setup IP address and Name

Setup IP Address

Setting up a static IP address using the M552 Gcode command, or any other way, is not possible with the current firmware:  Known firmware issues

Only way to fix the IP is to setup a static DHCP address in your Router, based on the MAC address of your Duet WiFi Controller.

If you setup a static IP address and do a readout, you will see something like this message, where .100 is the IP I specificed, and .19 is the actual one issued by the DHCP server in my Router.

If specifying static IP worked

When the firmware it fixed you can setup the IP by editing the config.g file, as we did above.

Then insert the following data marked up with the square.

Specify a Name and password

By editing the config.g file, as we allready did a few times above, you can change the name of your machine.

  1. Machine name is defined using the Gcode M550 Pxxxx. It is important to remember to use the P.
    1. Changing machine name is actually the Netbios name and also the name displayed at the top center of the web interface.
  2. While at it, you might also want to change the password to something only you know.
    1. Using the Gcode M551 I have changed it to mypassword – again, you need to remember to use the P for parameter.
    2. By changing the password you will now be met with a password dialogue if you want to manage your printer using the webinterface.
      This is not a high level security measure and should not be used as such. Users are going to have access to the interface but just can’t modify anything.
    3. Change password back to reprap to avoid the security popups like this: M551 Preprap
  3. Now just Save Settings and Apply Settings in the General Tab.