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

Fix mmu crc #1009

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix mmu crc #1009

wants to merge 2 commits into from

Conversation

3d-gussner
Copy link
Collaborator

User reported an issue with Prusa-Firmware 3.14.1 + MMU 3.0.3, PrusaLink 0.8.1 and PrusaConnect see prusa3d/Prusa-Firmware#4818

After troubleshooting I have found that the MMU 3.0.3 crc value is only one char long instead of being two chars. PrusaLink REGEX expected to have exactly two chars for the crc and so failed to get the correct MMU version including the build number. This causes PrusaLink and PrusaConnect to show the printer as "BUSY" and so not usable with PrusaLink and PrusaConnect.

Prusa-Firmware 3.14.0 with MMU 3.0.2 works fine as the MMU crc is two chars.

This fix accepts one AND two char crc which are 0-9 and a-f.

Changing the Prusa-Firmware and MMU3 firmware isn't a real option as this would also cause the need to change the Prusa-Firmware-Buddy and maybe other 3rd party solutions.

Test:
Before PR:

  1. Flash FW 3.14.1 and MMU 3.0.3 firmware
  2. Enable MMU
  3. Restart the printer
  4. Start PrusaLink 0.8.1
  5. Open PrusaLink and PrusaConnect
    a. Both show BUSY state and the printer is "locked"
  6. As a workaround you can disable temporary the MMU in the printer menu, but that also doesn't work always. And after a reboot or new startup the issue is back.

After PR:

  1. Flash FW 3.14.1 and MMU 3.0.3 firmware
  2. Enable MMU
  3. Restart the printer
  4. Start PrusaLink 0.8.2
  5. Open PrusaLink and PrusaConnect
    a. both show IDLE

Also the log files of 0.8.1 in combination of FW 3.14.1+MMU3 shows ERROR: Gather of mmu_version has failed

Copy link

@Nailig Nailig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on an mk3s+ fw 3.14.1-revo with mmu3 fw 3.0.3 by manually editing the files on the RPI zero 2w. This solves the "BUSY" problem in my case.

@3d-gussner
Copy link
Collaborator Author

Here how you can manually solve the issue, until the release.

Search for the file regular_expressions.py, the other file __init__.py is less important.
See also https://github.com/prusa3d/Prusa-Link/pull/1009/files.

The path to the file may be different, depending on the Python version.

I personally do not own a RPi, but have PrusaLink running on my PC with Ubuntu.

I can find this file in
~/.local/lib/python3.10/site-packages/prusa/link/printer_adapter/structures
or /home/<my user account/.local/lib/python3.10/site-packages/prusa/link/printer_adapter/structure

but also in ~/.local/lib/python3.9/site-packages/prusa/link/printer_adapter/structures PL has been installed with this Python version.

Search and replace in regluar_expressions.py

\*..\.$”

with

\*[0-9a-f]{1,2}\.$”

again see my PR for the needed changes.

There should be 6 lines that need to be changed.

I also tested if PrusaLink and PrusaConnect work with the customized 0.8.2 version in `init.py.

Hope that helps.

Advantage of the manual change is that you don't lose your configuration you already have.

In case you have ssh enabled on the RPi then you can connect to it and change it there.
As I don't own any RPis you may need to search if you can edit these files on the SD card directly.

@mgtmadness141879
Copy link

Email sent

@belousevgen
Copy link

Looks like a small change, but crucial for MMU owners. Is there a way to upvote for it?

I have 8x MK3S+ MMU3 and it's really annoying that I can't send MMU sliced gcode over prusaConnect due to this issue.
Since Printer fail to get MMU version it identified it self as regular MK3S+ and not showing up in the list of available printers when you try to send gcode to the printer.

I am familiar with git, but not familiar with Rpi images.
I could fork this PR and build a new image myself If anyone can tell me how to do it. Thanks.

@3d-gussner
Copy link
Collaborator Author

3d-gussner commented Mar 10, 2025

@belousevgen

Please send me an email.

@sturze
Copy link

sturze commented Mar 11, 2025

+1 on this issue
has anyone figured out what files to change on the SD?

@3d-gussner
Copy link
Collaborator Author

See my comment above. Some users were able to modify the files and fix the issue

@sturze
Copy link

sturze commented Mar 11, 2025

See my comment above. Some users were able to modify the files and fix the issue

I did, but I can't find any "regular_expressions.py" in the whole bootfs/rootfs of the PI's SD. that's why I was asking

@sturze
Copy link

sturze commented Mar 11, 2025

nevermind... I think I found it.

for all others: in rootfs its
cd .//home/jo/.local/lib/python3.11/site-packages/prusa/link/printer_adapter/structures/

@pjmoskowitz
Copy link

pjmoskowitz commented Mar 18, 2025

I am very confused where I am supposed to search for the file to edit... Do I search in the rpi directories? I do not see any file that is labeled as "structures" or "expressions" when i search the SD card... The only files I am seeing on the SD card that I am able to edit on my Mac is are "config.txt", "cmdline.txt", "firstrun.sh", "issue.txt"... all others are .dat, .elf, .dtb and .dtbo which I cant open... please advise.. thanks

I have also attempted to ssh to the rpi but am getting an error "port 22 connection refused"

@sturze
Copy link

sturze commented Mar 18, 2025

I am very confused where I am supposed to search for the file to edit... Do I search in the rpi directories? I do not see any file that is labeled as "structures" or "expressions" when i search the SD card... The only files I am seeing on the SD card that I am able to edit on my Mac is are "config.txt", "cmdline.txt", "firstrun.sh", "issue.txt"... all others are .dat, .elf, .dtb and .dtbo which I cant open... please advise.. thanks

I have also attempted to ssh to the rpi but am getting an error "port 22 connection refused"

when plugging the sd into a card reader I got two partitions: bootfs and rootfs. rootfs should be the one.

i also might have found a workaround: you can try to print directly from SD and cancel the print. that worked for me once

@3d-gussner
Copy link
Collaborator Author

@pjmoskowitz @sturze Please send me an email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants