-
Notifications
You must be signed in to change notification settings - Fork 65
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
No Control of Mars Pro Printer at Firmware 4.4.3 #453
Comments
I installed Mariner on a Pi3B and can also reproduce the same problem there. Additionally, I run the following script, designed to mimic what Mariner's printer.py does, and with both this script and mariner communicating on the serial port, I see the \r\n in the serial monitor for my python script, but not from mariner.
I am completely at a loss to understand what I am seeing unless the mariner I am running is not the same as the code on github. Hopefully this additional information will help someone more knowledgeable than I to point me in the right direction. Many thanks |
Answering my own question, I've just seen commit 599f4b0 so I guess I am running a version of mariner from before this. Is there a Debian package which includes the latest mariner code? |
Hey, I'm still not sure why mariner doesn't seem to be sending line breaks for you. I'll get back to this thread once I have a bit more of time, but thanks for your investigation so far!
Yes, every commit on GitHub has an Action that runs on CI for packaging that build as a That said, I don't expect the latest commit on |
Development build of the latest github code now shows the CR LF. Miniterm shows that the printer can be controlled via the UART, but M4006's always seem to be rejected with the increasing 'N:xx' response. The Mars Pro also gives an error to M4002 (get firmware version). |
Thanks! |
Not a big surprise, but the new .deb gives the same results as the development build ie the commands correctly have a CR LF at then end of them. Unfortunately, this does not solve the problem of not being able to print from mariner. My test scenario is that I select a file in mariner, and press "Print". Nothing happens on the printer.
nnn is an incrementing number. I also see plain old "OK"'s appearing regularly which I presume is some sort of heart-beating. M20, M24, M25, M27 and M33 work as I would expect. From what I see, OK's with an "N:" are a response to a command (as opposed to plain old "OK") so they should definitely not generate an exception. One point I will make is that I recently updated my Mars Pro to V4.4.3_c1_LCDF System EL3D-3.0.1 which was a requirement for ChituBox 1.9. Not sure if this is relevant, and I would rather not remove this firmware, but I thought I would highlight this. Next stop is to look through printer.py to see if I can determine why my Mars Pro dislikes what mariner is sending. |
So.... If I want to print a file, I need to do the following:
For all of the M400x codes that I have issued, I only get "ok N:nnn" responses and nothing else. I also think that if commands arrive at my printer too quickly, then the printer can get into a strange state and appear to become unresponsive and it can take a bit of coaxing to get the printer to action commands again. @luizribeiro My conclusion is that for Mariner to work with my Mars Pro, printer.py would need a reasonable amount of rework. For printer.py to work with my Mars Pro and continue to work as it does today for all of the printers currently supported, then I think there is an even bigger task ahead. I'm interested in your thoughts. I also don't think printer.py can afford to ignore the line numbers on the responses coming back from the printer which are resulting in exceptions at the moment. NB M6030 is needed to start the print and change the screen to the "printing screen" so that is obviously better than the M24 in the example above. |
Notes: Mainly using https://docs.google.com/document/d/14UBMO0Vhh9Lr0V3xcdetQ2_4UDnjFnho7OnbNxLOs3o/view# gcode reference. |
I've forked Mariner, and my forked Mariner is mostly working for Mars Pro firmware 4.4.3. There are a few issues to be ironed out, but it is mostly working with a few kludges necessitated by the lack of information from M400n commands. The code is intolerant of earlier firmware so not fit for a PR. Several of the tests are also broken. Finally, I've removed the need to have the #180 fix. My conclusions from further testing is that the "new" UART code in my printer's firmware is a little buggy when it comes to output buffer management for multi-line responses. As as example, the text response to M27 should be something like
or
or
I also get pretty messed up file lists from M20 If the UART is important to ChiTu, I can only imagine that they will fix these bugs with the result that any mariner code written to accommodate these bugs in the responses is likely to break in the future. My thinking is that the newer firmware levels should be monitored for a while to see if further changes are made (or rolled back) so unless there is increasing pressure from users who install the problematic firmware levels, I'd suggest not making lots of changes as a result of my experiences. Happy to discuss further. My code is mostly in printer.py https://github.com/BlueFinBima/mariner/blob/master/mariner/printer.py |
@BlueFinBima I'm on the same new firmware on my Mars 2 Pro and just installed your fork. Seems to be working well so far. Ran my first print entirely from the web interface for the first time, looks like it's holding up so far. Thank you @luizribeiro for creating this project And BluefinBima for the update. I'll let you know if there are any snags in the new code for me. |
@BenStein1 thanks for the feedback. I have opened a few issues on my fork describing the problems I know about. I do not remotely suggest that the current inventory is the extent of the problems. |
Thanks for digging into this @BlueFinBima! I was looking at the changes on your repo and I think it should be possible for us to just create a separate It will lead to some duplicated code and I guess the fact that firmware 4.4.3 doesn't support certain commands is a bit unfortunate, but we do what we can :) If you or anyone has interest on merging these changes in I'm happy to review a PR |
@luizribeiro Thanks for taking a look at this. I still feel that further changes by Chitu in this area are likely / possible so with my current workload, I personally won't revisit this until yet another firmware is released which is incompatible with this Mariner3D. |
Hello @BlueFinBima and @luizribeiro, As I was also facing troubles with the specific firmware mentioned above (running on a mars pro 2), I finally managed to find this great explanation (and the even better solution) here! On top I want to ask for a couple of lines on how to get the code running by ‘git-cloning’ it (at least for Bima’s repo, there are no .deb files available). Thanks again for all the great work! Please keep it up. |
I thought this might solve the issue of encrypted .ctb files causing 500 errors. Unfortunately, not. |
Hi, I have not used my SLA printer for a while so I have not encountered
the problem you describe, however, from the outset it appeared that the
internal firmware was in a state of flux, and I guess that this continues
with the encryption. Fundamentally, the encryption should not in itself be
a problem because the printer firmware knows how to decrypt it, but if the
information about the print being exposed on the serial port is different
or worse, non-existent, then this could spell the end of mariner.
Unfortunately, until someone more knowledgeable than I fixes the build
problems, changes on my fork are not going to happen.
…On Sun, 16 Jan 2022 at 11:32, fcollingwood ***@***.***> wrote:
I thought this might solve the issue of encrypted .ctb files causing 500
errors. Unfortunately, not.
—
Reply to this email directly, view it on GitHub
<#453 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AENLAGGD3QTRPZ7OEFFCQPTUWKUEXANCNFSM5CGK7BTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Can anyone explain how to install this forked version over the original? The docs listed point to the original mariner & I dont know enough about this to make it install this fork instead. I presume its fairly simple, thanks for any help. |
@Blanks82 I ran into the same problem with my Mars 3. It seems there isn't much development happening on this anymore... I tried to replace the .py files in /opt/venvs/mariner3d/lib/python3.9/site-packages and /opt/venvs/mariner3d/lib/python3.7/site-packages (don't even know at this point what directory should be used lol) with the ones from @BlueFinBima's fork. However, the behaviour stays the same for me: Webfrontend throughs a HTTP 500 when anything file-related is happening. Unfortunately reporting the status via the (undocumented) API seems to count as file related... Even through the serial line is still being read and there is info, because of the file read function not working, the client doesn't get the reply: DEBUG:mariner.printer:Obtain Print Status Command Requested ERROR:waitress:Exception while serving /api/print_status Maybe I will just delete the file handling stuff, so I can at least get a status reply... |
@Blanks82 the deb got deleted from the packaging action, and I was unable to get a successful package to recreate it. I have now finally managed to get this to work (I think) and the deb is now available here https://github.com/BlueFinBima/mariner/releases/tag/v0.2.0-1 |
Have you been able to test your fork with newer firmware versions such is 4.5.1? |
@jremen I have not used Mariner or my SLA printer for quite some time (there was a major resin spillage which dampened my enthusiasm for the technology). Anyway, my fork is dormant, at least until I have a need to use the machine again, and from the experiences of others, I probably won't update the firmware unless there is some very compelling reason to do so. Good luck with your project. |
@BlueFinBima I merged your work with @Desterly's downstream changes to read encrypted CTB files. I had to update the build workflow too. It's now here. Happy to raise a PR back on your fork or keep it here? |
I had an issue that wouldn't allow me to upload files on the web and got your fork, now I can upload files and preview them but I don't have the ability to start a print on the web or view printer status while its printing (i can manually start the print that I uploaded on the web and it prints just fine). |
I'm a new user (ie Mariner3D has never worked completely for me) I get the #180 symptom, however I do not get any control of the printer which seems different from the experiences of others who get this symptom.
Looking at the serial data being sent from the Pi Zero W to the Mars Pro, I see the following
M23 /first file.ctbM4006M4006M4006M4006M23 /second file.ctbM4006M4006M4006M4006M4006M4006M4006M4006
that is, a constant stream of commands without CR LF.
In order to rule out my serial monitor, I performed the following on the Pi Zero W
cat 1.txt > /dev/ttyS0
where 1.txt contains three words separated by CR LF.
I see the following in the serial monitor
My conclusion from this is that Mariner3D / Python is not sending the CR LF even though I can see from the Mariner code that it should be sent.
Assuming my observations are reliable, then I think that the commands from Mariner cannot be digested by the printer. I cannot escape the fact that nobody else sees this problem so it is likely to be a problem of my own making rather than Mariner.
A short description of what the bug is that the printer cannot be controlled via the UART.
Expected Behavior
I expect that the printer will be sent commands terminated with an "\r\n". I can see in printer.py that this is the intent of what Mariner3D is doing. I don't see why this seems not to be happening.
There is nothing of interest in the Mariner3D log.
Details:
Other
cmdline.txt is
root=PARTUUID=82934f69-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2
[all] clause of config.txt contains
Python is 3.7.
The text was updated successfully, but these errors were encountered: