"Keepalive" is now "Busy protocol" #7253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addressing #7131
Notice: @MarlinFirmware/host-software-team
Background: "Host keepalive" was originally intended to let hosts know that a machine is not dead and that the host should not hang up when there's no "ok" reply from the printer during a long-duration command.
We decided to remove the extra 'busy' messages from
M109
,M190
, andM303
because hosts are savvy enough to know these commands do not reply with "ok" until they do, and they supply regular output, which indicate that the commands are operating correctly.However, some hosts in recent versions have chosen to go into "only 'busy:' messages count" mode the first time they see a "busy:" message. From then on, they treat
M109
,M190
, andM303
the same as every other command, expecting an "ok" reply within the timeout or else assuming potential trouble.As a result of this host implementation feature, these commands can no longer rely on their frequent output to keep the host from hanging up. The host will continue to wait for "ok" only if it sees a "busy:" message. Temperature messages and other output while waiting for these commands to complete are not sufficient to reset their "wait for ok" timer.
Workaround: This PR intersperses busy messages in the output of
M109
,M190
, andM303
to satisfy hosts that have chosen to work this way.With this change applied, for hosts like Pronterface which don't filter output, or direct serial terminal connections as used in your development environment, it is recommended to disable the "host keepalive" feature with
M113 S0
, or setDEFAULT_KEEPALIVE_INTERVAL
to 0.The option
BUSY_WHILE_HEATING
has been added to allow users to revert to the previous behavior —no busy messages during heating— for hosts that don't adopt a strict mode.It is my recommendation that hosts revert to their previous methodology for the three heating commands, taking any temperature output as an indication that the commands are still operating, and that they do not specifically require "busy" for
M109
,M190
, and —especially—M303
.Reference: #3642 Keepalive not needed while waiting for temperatures