Understanding my new Duet2 Wifi board
-
I have been asked to add support for direct spooling of print jobs from Kiri:Moto to the Duet2 board over wifi or ethernet. It seemed pretty straight-forward because the board already presents DWC and has a RESTful API. However, it does not seem to have an https option + CORS header support. And without that, secure browser pages cannot PUT or POST data to the DWC.
So I purchased a Duet2 Wifi board to experiment. It arrived with firmware V3.1.1. I've gotten it up on wifi and it's pingable. DWC works as expected. I was also expecting it to have ssh or some other means to log on or a configuration option for such. My hope was to be able to run a reverse proxy onboard to enable secure web communications with the board. Is this not possible?
I poked around through some of the docs and it's unclear to me if the board is running an ARM version of linux or if all connectivity features are predicated on an external PI talking to the board using some other means.
-
You can enable Telnet via M586 as well as a limited FTP server on the Duet 2 Ethernet/WiFi. As part of v3.2 you can configure a CORS site using the same M-code as well.
In previous RRF like 3.1.1 the CORS header was always present to simplify DWC development but it can be a security concern so it has to be enabled manually in v3.2 and later. Starting from v3.3 the Duet web server (Duet 3 + SBC) will allow for HTTPS with self-signed certificates but this isn't planned for Duets in standalone mode due to limited computing power and the implications self-signed certificates create.
You can find more details about the HTTP API for RRF in standalone mode here: https://github.com/Duet3D/RepRapFirmware/wiki/HTTP-requests.md And in case you need it for the web server in SBC mode (Duet 3 + Raspberry Pi), see here: https://github.com/Duet3D/DuetSoftwareFramework#rest-api
-
Thanks for this information. I enabled the telnet interface. However, this seems to provide a command-interface for Gcode and not something like a shell where you can run processes. Help me understand the process model. Is the board running linux or an OS with process management? I assumed that's how the DWC was run. The references to Apache and nginx and IPC with sockets lead me to believe they could be run on the board itself. Is that not possible?
-
@stewart On the Duet controllers there is no Linux OS. Instead it is RepRapFirmware which has a FreeRTOS core, so you cannot execute third-party processes on it. You can make changes to it because it is entirely open-source though (see https://github.com/Duet3D/RepRapFirmware). This means applications on the Duet itself are limited to conditional G-code but third-party applications for DWC 3.2 and later could be still implemented (guides and simple interfaces for SBC mode will follow in v3.3).
You can connect a Raspberry Pi directly to the Duet 3 series (Duet + SBC). The collection of applications needed for the communication from the Raspberry to the Duet is called Duet Software Framework, which is what my last link referred to.
-
Excellent. Thanks again.