-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Host Keepalive serial output with multi-serial #21283
Fix Host Keepalive serial output with multi-serial #21283
Conversation
It looks like |
yes, can be. But remember that the second idle is called inside another running command.... so, it may set the serial port to the current command... and the other command just hang (it's what happens). |
This behaviour happened always in my tests: every time I generate a wait having commands for another serial, one serial loses a command and get timeout. With busy broadcast, I got no more |
But, |
Yes, but its value will be the last value set, right? That is the value of the current command being executed. You can easy test it: then, In the serial 2, send a M114... Marlin will not respond anything to this serial, never..... even if, in fact, marlin is currently busy... So, this serial will timeout, if the command is queued... so, after the serial 1 release, marlin will execute the M114, and the host may send it again!! That is the reason I sent the PR, because makes sense, for me, that keep alive should broadcast (as all host commands). But yes, maybe we have more hidden issues hehehe... |
The current command does redirect its output, and presumably it wants to also redirect the output of anything within |
…so you are correct to redirect the output of keepalive. |
And now, to fix this exp32 compile before I go ahead and merge…. |
I found ... the lib we can point
|
bugfix-2.0.x fails to compile in Arduino IDE after this merge. Was working yesterday. How do I fix this?
|
@adolson take a look if it solves: https://github.com/rhapsodyv/Marlin/tree/21283-followup |
Yes, that compiles successfully. |
Followup to #21283 Co-authored-by: Scott Lahteine <[email protected]>
Followup to #21283 Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Followup to MarlinFirmware#21283 Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Followup to MarlinFirmware#21283 Co-authored-by: Scott Lahteine <[email protected]>
* bugfix-2.0.x: (248 commits) [cron] Bump distribution date (2021-03-11) Fix password menu stickiness before first auth (MarlinFirmware#21295) Lerdge-K TMC 2208/9 UART pins (MarlinFirmware#21299) Fix LERDGE 'extends' env references (MarlinFirmware#21305) Fix TouchMI stow in G34 (MarlinFirmware#21291) Fix MeatPack with per-serial-port instances (MarlinFirmware#21306) Tricked-out declaration Update MEATPACK test Number serial from 1 to match settings Clean up spaces and words Fix serial index types Add binary file transfer test fix meat pack internal buffer for multi serial [cron] Bump distribution date (2021-03-10) Fix LPC + TMC boot loop (MarlinFirmware#21298) Distinguish serial index from mask (MarlinFirmware#21287) Host Keepalive followup (MarlinFirmware#21290) [cron] Bump distribution date (2021-03-09) CUSTOM_USER_BUTTONS followup (MarlinFirmware#21284) Fix Host Keepalive serial target (MarlinFirmware#21283) ... # Conflicts: # Marlin/Configuration.h # Marlin/Configuration_adv.h
Followup to MarlinFirmware#21283 Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Followup to MarlinFirmware#21283 Co-authored-by: Scott Lahteine <[email protected]>
Co-authored-by: Scott Lahteine <[email protected]>
Followup to #21283 Co-authored-by: Scott Lahteine <[email protected]>
Description
This is a continuation of the stress tests I'm doing on multi serial, to fix corner cases.
I found an issue that happens in a very specific combination of events, but that can happen very often on a real printing operation: multi serial + idle stacking (slow commands that call idle until finished) + keep alive code.
When marlin is executing some slow commands, it may stay in a loop waiting for it to complete. Inside that loop, marlin may call idle periodically. So, the idle will check for new serial commands (in the other serial) to enqueue. When it receive the command, it will reply "busy" (on keep alive function), but it send to the wrong serial port.
Call stack:
I could simulate resend commands on octoprint this way. And I fixed making the keep alive reply "busy" for all serial ports...
That in fact it seems correct, because marlin will only handle one command at time, so the keep alive should warns all serial ports that marlin is busy, to avoid timeout or false-resend commands everywhere.
Benefits
More robust multi serial.
May fix #21010 and #21244
Related Issues
#21249