openpnp – Warning – Unknown firmware

Article directory

    • openpnp – Warning – Unknown firmware
    • Overview
    • notes
    • https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares
    • Remark
    • END

openpnp – Warning – Unknown firmware

Overview

After connecting the Feida control board, a warning of unknown firmware is displayed.

Before I looked at the source code, I always thought that the version number in the answer was inappropriate, so I checked the firmware version based on the version number returned by the smoothie board. There was still this warning.
Now that I am using openpnp compiled by myself, I want to see where this warning comes from.

Notes

The function to determine whether there is unknown firmware is findIssues()
D:\my_openpnp\openpnp_dev_2022_0801\src\main\java\org\openpnp\machine\reference\solutions\GcodeDriverSolutions.java

public void findIssues(Solutions solutions) {<!-- -->
// ...
if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Smoothieware")) {<!-- -->
                    firmware = (gcodeDriver.getFirmwareProperty("X-GRBL_MODE", "").contains("1"))?
                            FirmwareType.SmoothiewareGrblSyntax:
                                gcodeDriver.getFirmwareProperty("FIRMWARE_VERSION", "").contains("chmt-")?
                                        FirmwareType.SmoothiewareChmt : FirmwareType.Smoothieware;
                    firmwareAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-AXES", "0"));
                    if (firmware == FirmwareType.SmoothiewareChmt) {<!-- -->
                        // OK, CHMT STM32 Smoothieware board. Take PAXES == 5 if missing (legacy build).
                        firmwarePrimaryAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-PAXES", "5"));
                    }
                    else if (gcodeDriver.getFirmwareProperty("X-SOURCE_CODE_URL", "").contains("best-for-pnp")) {<!-- -->
                        // OK, regular Smoothieboard with pnp firmware.
                        firmwarePrimaryAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("X-PAXES", "3"));
                    }
                    else {<!-- -->
                        solutions.add(new Solutions.PlainIssue(
                                gcodeDriver,
                                "There is a better Smoothieware firmware available. " + gcodeDriver.getDetectedFirmware(),
                                "Please upgrade to the special PnP version. See info link.",
                                Severity.Error,
                                "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#smoothieware"));
                    }
                    if (firmwarePrimaryAxesCount != null
                             & amp; & amp; firmwarePrimaryAxesCount != firmwareAxesCount) {<!-- -->
                        solutions.add(new Solutions.PlainIssue(
                                gcodeDriver,
                                "Smoothieware firmware should be built with the PAXIS=" + firmwareAxesCount + " option.",
                                "Download up-to-date firmware optimized for OpenPnP, or if you build the firmware yourself, please use the `make AXIS=" + firmwareAxesCount + " PAXIS=" + firmwareAxesCount + "` command. See info link.",
                                Severity.Warning,
                                "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#smoothieware"));
                    }
                }
                else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Duet")) {<!-- -->
                    firmware = FirmwareType.Duet;
                    String firmwareVersion = gcodeDriver.getFirmwareProperty("FIRMWARE_VERSION", "0.0");
                    Integer major = null;
                    Integer minor = null;
                    try {<!-- -->
                        Matcher matcher =
                                Pattern.compile("(?<major>-?\d + )\.(?<minor>-?\d + ).*").matcher(firmwareVersion);
                        matcher.matches();
                        major = Integer.parseUnsignedInt(matcher.group("major"));
                        minor = Integer.parseUnsignedInt(matcher.group("minor"));
                    }
                    catch (Exception e) {<!-- -->
                        Logger.warn(e);
                    }
                    if (major == null || minor == null
                            || major < 3 || (major == 3 & amp; & amp; minor < 3)) {<!-- -->
                        solutions.add(new Solutions.PlainIssue(
                                gcodeDriver,
                                "Duet3D firmware was improved for OpenPnP, please use version 3.3beta or newer. Current version is " + firmwareVersion,
                                "Get the new version through the linked web page.",
                                Severity.Error,
                                "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#duet"));
                    }
                    if (gcodeDriver.getConfiguredAxes() != null) {<!-- -->
                        try {<!-- -->
                            Matcher matcher =
                                    Pattern.compile(".*\s(?<axes>-?\d + )\saxes\svisible.*").matcher(gcodeDriver.getConfiguredAxes());
                            matcher.matches();
                            firmwareAxesCount = Integer.parseUnsignedInt(matcher.group("axes"));
                        }
                        catch (NumberFormatException e) {<!-- -->
                            // ignore
                        }
                        if (gcodeDriver.getConfiguredAxes().contains("(r)")) {<!-- -->
                            solutions.add(new Solutions.PlainIssue(
                                    gcodeDriver,
                                    "Axes should be configured as linear in feedrate calculations on the Duet controller. See the linked web page.",
                                    "Use the M584 S0 option in your config.g file.",
                                    Severity.Error,
                                    "https://duet3d.dozuki.com/Wiki/Gcode#Section_M584_Set_drive_mapping"));
                        }
                        else {<!-- -->
                            firmwarePrimaryAxesCount = firmwareAxesCount;
                        }
                    }
                }
                else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Marlin")) {<!-- -->
                    firmware = FirmwareType.Marlin;
                    firmwareAxesCount = Integer.valueOf(gcodeDriver.getFirmwareProperty("AXIS_COUNT", "0"));
                    if (firmwareAxesCount > 3) {<!-- -->
                        firmwarePrimaryAxesCount = firmwareAxesCount;
                    }
                    else {<!-- -->
                        solutions.add(new Solutions.PlainIssue(
                                gcodeDriver,
                                "Marlin firmware is not reporting support for rotation axes (A B C). " + gcodeDriver.getDetectedFirmware(),
                                "Please upgrade the firmware and/or axis configuration. See the info link.",
                                Severity.Error,
                                "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares#marlin-20"));
                    }
                }
                else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("TinyG")) {<!-- -->
                    // Having a response already means we have a new firmware.
                    firmware = FirmwareType.TinyG;
                }
                else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("Grbl")) {<!-- -->
                    firmware = FirmwareType.Grbl;
                }
                else if (gcodeDriver.getFirmwareProperty("FIRMWARE_NAME", "").contains("GcodeServer")) {<!-- -->
                    firmware = FirmwareType.Generic;
                }
                else {<!-- -->
                    solutions.add(new Solutions.PlainIssue(
                            gcodeDriver,
                            "Unknown firmware. " + gcodeDriver.getDetectedFirmware(),
                            "Check out firmwares known to be well supported. See info link.",
                            Severity.Warning,
                            "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares"));
                }

// ...
}

After reading the implementation of judging whether it is unknown firmware, I understand.
It turns out that openpnp only supports several royal firmwares, and other firmwares are unknown firmwares.
In the code, we see that the official firmware supported by openpnp is as follows:

Smoothieware
Duet
Marlin
TinyG
Grbl
GcodeServer

I was discussing with a classmate before, and he asked whether a motherboard supports openpnp. I checked it out at the time and saw that an openpnp hardware project planned to use that motherboard, and then I learned that that motherboard could be used as the motherboard for openpnp.

Now after reading the code, it is clear that openpnp supports a limited number of royal motherboards.

If it is not an openpnp motherboard, but an auxiliary Feida control board, there is no need to worry if this kind of unknown firmware warning appears, just disable this warning.
The Feida control board does not involve the movement position of the openpnp hardware, but only feeds materials at a fixed position. As long as the feeding control is good, it will be fine.

The following is the prompt message of unknown motherboard firmware of openpnp

 else {<!-- -->
                    solutions.add(new Solutions.PlainIssue(
                            gcodeDriver,
                            "Unknown firmware. " + gcodeDriver.getDetectedFirmware(),
                            "Check out firmwares known to be well supported. See info link.",
                            Severity.Warning,
                            "https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares"));
                }

See the wiki link which gives official openpnp supported motherboard firmware.
After taking a look, I know what features (GCode) the motherboard needs to support if it is used for openpnp.

https://github.com/openpnp/openpnp/wiki/Motion-Controller-Firmwares

The motherboard firmware supports asynchronous GCode driver and advanced motion control.
However, the asynchronous GCode driver is dangerous, and the synchronous GCode driver is enough.
The official wiki of the asynchronous GCode driver GcodeAsyncDriver
The official wiki for Advanced Motion Control Advanced Motion Control

Key features of the motherboard required by openpnp:

  • Supports the M115 command, which is used to report the firmware version to openpnp so that openpnp can determine the firmware.
  • It must support the control of additional axes (A, B, C) in addition to X, Y, Z, and enable mixed control of multiple axes.
  • Supports M114 command, used to report the position of all axes.
  • Supports G92 command, used to reset each axis position to zero.
  • Supports the M400 command, which is used to wait for the movement to be completed. Before the movement is completed, the communication must be blocked. (After M400, other commands may be sent, but before the movement is completed, it must be blocked and subsequent instructions cannot be executed)
  • Must support M204 (acceleration control), M201.3 (acceleration prohibited)
  • It is best to have a built-in GcodeServer controller simulator (optional) for joint debugging with openpnp to ensure that the instructions sent by openpnp can produce correct actions and effects.

The official motherboards and firmware are as follows:
Duet3D => https://docs.duet3d.com/en/Duet3D_hardware/Hardware_overview

RepRapFirmware

It’s just firmware, the board supports many types, I didn’t look into it in detail.

Smoothieware The official said specifically that they do not support the copycat version of smoothies made by Chinese students, but they are just to scare people, and they are very good to use.
Smoothieware has new firmware from a third party => makr.zone: “Smoothieware: New Firmware for PnP”

Marlin 2.0

TinyG

Remarks

I am not interested in changing to other motherboards other than the Smoothie motherboard. Because it is all money and time. When the time comes, I will bother with other motherboards.

END