Skip to content
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

[BUG] Too much MK3S<->MMU2 communication logging on serial port #4414

Closed
thess opened this issue Sep 27, 2023 · 6 comments
Closed

[BUG] Too much MK3S<->MMU2 communication logging on serial port #4414

thess opened this issue Sep 27, 2023 · 6 comments
Labels
feature request A request for adding a specific feature of change of behaviour known issue Our developers are aware of the issue. They will work on it. MMU MMU2s and MMU3 octoprint Prusa-Link_Connect Prusa Link and Prusa Connect related

Comments

@thess
Copy link

thess commented Sep 27, 2023

Printer type - MK3S
Printer firmware version - 3.13.1+

MMU upgrade - MMU2S
MMU upgrade firmware version - 3.0.0, 3.0.1

SD card or USB/Octoprint
Mainly USB/Octoprint

Describe the bug
Serial communications between the printer and MMU are continually output on the USB port.

To Reproduce
Connect to USB serial and notice continual chatter.

Expected behavior
We need a way to suppress these messages from log output either by:

  1. Providing menu option to disable (LogRequestMsg, LogResponse)
  2. Conditional DEBUG build
  3. Remove altogether

I suppose one could write an Octoprint serial filter to remove the transactions from the console but I would prefer not to have the excess data always clogging the serial communications path.

@thess thess added the bug label Sep 27, 2023
@gudnimg
Copy link
Collaborator

gudnimg commented Sep 28, 2023

I agree with this. It would be nice to hide the Query (Q0) if nothing has changed since the last Q0.

Q0 triggers every 1 second

@3d-gussner
Copy link
Collaborator

3d-gussner commented Sep 28, 2023

@thess Nice to see you back on this repo. We have been discussing this few times and we gonna keep it for the moment.
Reason to keep it is to be able to check in the serial logs what happens BEFORE an error occurs. We don't have the resources to keep some lines in the buffer to read this buffer when an error is reported.
If you have an idea how we could ensure that we get access to the communication between MMU3 and printer please let us know.

Here my OctoPrint Filter for the Terminal output:
Settings -> Terminal Filter -> Name: Suppress MMU RegExp : echo:MMU2

Some parts of my config.yaml

....
feature:
  autoUppercaseBlacklist:
  - M117
  - M118
  - M707
  - M708
  - M850
  - D3
  
...


terminalFilters:
- name: Suppress temperature messages
  regex: '(Send: (N\d+\s+)?M105)|(Recv:\s+(ok\s+([PBN]\d+\s+)*)?([BCLPR]|T\d*):-?\d+)'
- name: Suppress SD status messages
  regex: '(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)|(Recv: Not SD printing)'
- name: Suppress position messages
  regex: (Send:\s+(N\d+\s+)?M114)|(Recv:\s+(ok\s+)?X:[+-]?([0-9]*[.])?[0-9]+\s+Y:[+-]?([0-9]*[.])?[0-9]+\s+Z:[+-]?([0-9]*[.])?[0-9]+\s+E\d*:[+-]?([0-9]*[.])?[0-9]+).*
- name: Suppress wait responses
  regex: 'Recv: wait'
- name: Suppress processing responses
  regex: 'Recv: (echo:\s*)?busy:\s*processing'
- name: Suppress MMU
  regex: echo:MMU2

Changed bug label as it doesn't break things it is just annoying to feature request and octoprint

BTW: PrusLink/PrusaConnect and OctoPrint Plugins may/could use this serial logging to check the state/operations of the MMU3 😉

@3d-gussner 3d-gussner added feature request A request for adding a specific feature of change of behaviour octoprint known issue Our developers are aware of the issue. They will work on it. and removed bug labels Sep 28, 2023
@gudnimg gudnimg added the MMU MMU2s and MMU3 label Oct 3, 2023
@gudnimg gudnimg added the Prusa-Link_Connect Prusa Link and Prusa Connect related label Oct 15, 2023
@gudnimg
Copy link
Collaborator

gudnimg commented Oct 19, 2023

@thess I have a working pull request which shrinks the logging activity quite a bit. My proposal is to allow the full logging activity while the MMU is running a toolchange or any other command. But while it's sitting idle (e.g. after the toolchange is done) none of the "spammy" messages will get logged.

Would this be an acceptable solution in your opinion? My proposal only costs around ~40 bytes of flash memory.

@thess
Copy link
Author

thess commented Oct 19, 2023

I'll give your PR a try next week and see how it goes. I am using the Octoprint MMU2 plugin now in conjunction with serial filters. You proposal looks like the best compromise (so far).

I also did a version of the firmware for my own use with the MMU serial logging disabled but then the Octoprint plugin is not usable.

@thess
Copy link
Author

thess commented Nov 14, 2023

Sorry for the late response -- Suppressing logging when idle is an acceptable solution. The Octoprint plugin is definitely usable. There may be some status info missed by the plugin at startup but I haven't done enough checking.

OK to close this if #4455 is merged.

@3d-gussner
Copy link
Collaborator

@thess I closing this issue as Prusalink and Octoprint MMU plugin use the serial output. Also #4455 has been closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request for adding a specific feature of change of behaviour known issue Our developers are aware of the issue. They will work on it. MMU MMU2s and MMU3 octoprint Prusa-Link_Connect Prusa Link and Prusa Connect related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants