Updating RepRap Firmware config.g file
The 'config.g' file
To configure a board using RepRap Firmware, notably the Duet for a given machine, you have only to edit a file named 'config.g', located on the SD card in the /sys directory. This file is read and executed at startup, but the configuration can be modified later, either by executing a macro or entering commands in the web interface. These configuration modifications will be lost at next startup.
All configuration parameters are entered via 'G' and 'M' parameters, so the reprap firmware G-Code set is relatively extended. A config.g file could be reexecuted via the 'M999' command or an emergency stop.
It shall be noted that a malformed file may hang your board, and this apply to all macros executed by the 'config.g' file.
The first configuration, which shall define name, password and net configuration, will probably be done while writing the file on the SD card, as it is not wise to start a machine with an unverified file, except if you can independently supply logic and power on your board.
Any text editor could be used for modification.
After uploading the file in the SD card, inserting it in the board (while power is shutdown), restarting and connecting to the board, you have other solutions to modify the config.g file without removing the SD card.
As the config.g content is stored in the limited Duet memory at startup, you shall limit this file size, makes your comments short and remove unused lines.
For the updating of the config.g file, you have three solutions if your board connect properly:
- Using the incorporated editor in the web interface, but that doesn't work with all browsers, notably not with Microsoft browsers.
That editor is accessed in the "settings" tab, sub-panel "configuration file".
- Editing file on your PC/device and uploading with the web interface. In the tab "Settings", there is a button "Upload File(s)", which allow to upload printer system files from your pc. The 'config.g' file will automatically be uploaded in the /sys directory as other system files, while web interface files (model.js and viewmodel.js, formerly interface.js) will be uploaded in /www/js directory. It allow having an up-to date copy on your PC of the printer system files.
- Editing the config.g file on your PC and uploading it via FTP. Same advantage as web uploading for tracking the printer updates, with a bit more flexibility.
To log in FTP, you shall use the machine name as defined in the config.g file, for the user name any name e.g. 'whatever' and the password as defined in the config.g file (the leading 'P' indicates parameter and is not part of the name nor password). Beware to upload in the /sys directory.
You could be simultaneously be logged in FTP and in http (web interface). If you have difficulties to connect directly in FTP, connect first with the web interface, this helps FTP connection.
To upload/download to the SD card via FTP, you need a FTP client program (NOT a FTP server) and there is a wide choice for all systems. On Windows, you could use the FTP function of the file viewer 'Total Commander', FileZilla or WinSCP. On Linux, there is a default ftp client named 'ftp'. On a MAC you can use CyberDuck or FileZilla.
If using a new SD card, it is highly recommended to format it (FAT32) before loading an image.
How to configure Duet
There are a few links which may help to configure your board
- Configuring RepRapFirmware for a Cartesian printer
- Configuring RepRapFirmware for a CoreXY printer
- Configuring and calibrating a delta printer using the dc42 fork of RepRapFirmware
- T3P3 guide to the config.g and homing files for Cartesian printers
- Preconfigured config.g files for various printers: https://github.com/reprappro/RepRapFirmware/tree/test/SD-image and https://github.com/dc42/RepRapFirmware/tree/dev/SD-image
- RepRapPro guide for commissioning Duet-based printers, including updating firmware: https://reprappro.com/documentation/commissioning-introduction/commissioning-duet/. You may also find their wiring diagrams for the Ormerod, Huxley and Mendel useful.
- Duet troubleshooting guide: https://reprappro.com/documentation/troubleshooting-introduction/electronics-problems/
- Temperature converter calibration (M301 is now M305) http://forums.reprap.org/read.php?340,326029
- DC42 fork allow external driver to be connected on the expansion connector and remapped with [| M569 ]. See http://forums.reprap.org/read.php?178,552124,552305
- Using Duet with wifi router on blog.think3dprint3d.com
- Using thermocouples with the Duet and RepRapFirmware
How do I know that my config.g have been properly executed
Without a LED and if you do not succeed in connecting your board, you can check that the config.g is properly executed by making 'music' with your steppers.
You shall execute a file (or inserting commands it in the config.g file itself), as the last command of your config.g.