Open hak-isaiah opened 3 years ago
I think other printers that use chitubox should actually work with mariner. Maybe a few adjustments here and there would be required, but I think it should largely work.
However, I don't have access to anycubic photon or any other printers other than my Elegoo Mars Pro.
If anyone is willing to help here with testing, code or whatever I'm help to add official support for those printers.
Oh great I'd be willing to help with testing and feedback i have a anycubic photon zero
@hak-isaiah, if you're willing to test with your anycubic photon zero, then give it a go!
I know that the folks from photonsters have been able to get the Anycubic Photon with network on projects like this one: https://github.com/Photonsters/Universal-Photon-Network-Controller/
From looking at their code, the commands that they send to the printer are very similar (if not exactly the same), so I wouldn't be surprised if this worked as is. The instructions should be fairly similar to the ones I outlined here.
That said, this is uncharted territory so proceed at your own risk :)
@luizribeiro the interface is great however the issue that stops this is i think the baud rates of the elegoo mars pro and the anycubic photon zero are different so the rpi cant send commands to the photon yet and it cant read printer status and this doesn't accept .pw0 or .pws file types if there is anything i can do to help with this just message me
I get my phrozen sonic mini 4k on wednesday. Id love to be able to test this out and see what all works as is. looking through the code it seems its all just marlin commands. It would be incredible if this is the start of an octoprint like solution for SLA printers.
We should be able to add support for .pw0
or .pws
files. If you have some simple ones (like just a cube or whatever) I'm happy to look into adding support once I have more time. It shouldn't be too hard to do it if anyone is interested on giving it a shot.
About the baud rate, do you know what baud rate your printers are supposed to use? If so, you should be able to change it here:
The support for .pw0
or .pws
files isn't strictly necessary to check if communication with the printer works, since the file format support is only used for previewing the files (so you'll likely not get any previews, but if you scp
the .pw0
or .pws
file you may be able to get it to print).
Let me know what y'all find! 😄
Schizophrenia scan.zip it's a pw0 file of a brain scan that was turned into a stl
Traceback (most recent call last):
File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/api.py", line 45, in print_status
selected_file = elegoo_mars.get_selected_file()
File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/mars.py", line 102, in get_selected_file
self._extract_response_with_regex("ok '([^']+)'\r\n", data).group(1)
File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/mars.py", line 39, in _extract_response_with_regex
raise UnexpectedPrinterResponse(data)
mariner.exceptions.UnexpectedPrinterResponse
is the result when connecting to my sonic mini 4k. serial port not only was exposed but already had headers on it so connecting was a breeze. Just need to figure out mariner and i can have a remote UI/upload.
@Shabbypenguin, any chance this is because of #180 or do you consistently get that error when taking any action?
It's possible we need to make small tweaks to the protocol to support the Sonic Mini 4k, but want to first rule out that this isn't because of the existing issue.
@Shabbypenguin, any chance this is because of #180 or do you consistently get that error when taking any action?
It's possible we need to make small tweaks to the protocol to support the Sonic Mini 4k, but want to first rule out that this isn't because of the existing issue.
Sadly I've never really delved into hardware hacking previously so this is a new experience for me. How did you go about reading from your serial printer in order to see what commands were used/needed? I see many of them are marlin used gcodes, but some like get selected file uses one I haven't seen before. I have a pi zero hooked up but I'm unsure of how to connect and start debugging to see if its simply a serial speed change, wrong commands, or something else.
for me mariner loads up and on the printer controls screen I get a spinning circle as it tries to load and connect before erroring out with that message. it is worth noting that i can upload ctb's and go to my printer and manually start them. I just cant do any of the core mariner functions/features.
Edit: Ok well i got serial port output finally, i had miscounted the pins and had them shifted over one (away from 5v thankfully). getting OK messages via serial as well as filename
ok ok 'jigglypuff.ctb' ok ok ok ok 'jigglypuff.ctb' ok
@Shabbypenguin, nice. Glad you got the printer to reply to your serial commands. A few questions:
My print will be going on overnight, so I wont be able to test and see the results of get selected file command until tomorrow.
edit: Ok so using serial commands i can issue M23, M6030, and M4006. It sees the file, reads it as a zero byte file, i can tell it to select which it does over on the LCD, but it doesnt bring up the print menu and issuing M6030 gives me an ok response but doesnt start to print. How did you find out what gcode commands were used on your printer?
clicking on the file and clicking print issues the commands but the UI still hits a problem with:
Traceback (most recent call last): File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request rv = self.dispatch_request() File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request return self.view_functionsrule.endpoint File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/api.py", line 45, in print_status selected_file = elegoo_mars.get_selected_file() File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/mars.py", line 102, in get_selected_file self._extract_response_with_regex("ok '([^']+)'\r\n", data).group(1) File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/mars.py", line 39, in _extract_response_with_regex raise UnexpectedPrinterResponse(data) mariner.exceptions.UnexpectedPrinterResponse
Got it!
Select the file with M23. M24 tells it to start printing. Looked at the gcode commands from the photon controller app, looks like Phrozen stuck with the mostly standard ones as well. M27 lets me know its percentage done. So if that Ui issue from #180 can get resolved + make a more generic issue commands python with use whatever commands pulled from configs based on what type of printer you pick. I think this would probably get rolling and add at least 2 more printers support.
Can you summarize what are the differences between the Mars protocol and the Phrozen protocol?
You can tweak https://github.com/luizribeiro/mariner/blob/master/mariner/mars.py to make it work, put up a pull request once you confirm that it is working and I can refactor some of the code so we can have support for multiple printers.
I'm thinking of something along the lines of:
ElegooMars
will now inherit fromSo far it just seems they use different gcode commands. phrozen opted for
as the workflow to selecting a file and then printing it. Ill take some time to edit mars.py and hope it works.
it seems it needed no changes to mars.py. I happened to reboot everything on a clean boot and it didnt give me the get_selected_file() error as mentioned previously. So I was able to select the print via web ui and click print and it started. The ui updates in the background and shows progress. Every now and again I get the error from issue 180 but outside of that it looks like mariner already works well on phrozen printers.
Cool! I'll update the README.md
to include the Phrozen Sonic Mini 4K. Thanks @Shabbypenguin!
@hak-isaiah, I'm going to keep this issue open for the Anycubic Photon. Let me know if I can help you with anything there.
Hooked Up Anycubic Photon. After working through a few issues. The print status said ready.
Mariner doesn't take .photon files but I scp'd them to the directory and started a print from the printers ui. At that point the mariner UI gave 500 response.
Log:
Sep 30 03:44:04 resin mariner[255]: AssertionError Sep 30 03:45:04 resin mariner[255]: ERROR:waitress:Exception while serving /api/print_status Sep 30 03:45:04 resin mariner[255]: Traceback (most recent call last): Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/channel.py", line 397, in service Sep 30 03:45:04 resin mariner[255]: task.service() Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/task.py", line 168, in service Sep 30 03:45:04 resin mariner[255]: self.execute() Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/task.py", line 434, in execute Sep 30 03:45:04 resin mariner[255]: app_iter = self.channel.server.application(environ, start_response) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2464, in call Sep 30 03:45:04 resin mariner[255]: return self.wsgi_app(environ, start_response) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/whitenoise/base.py", line 85, in call Sep 30 03:45:04 resin mariner[255]: return self.application(environ, start_response) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app Sep 30 03:45:04 resin mariner[255]: response = self.handle_exception(e) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception Sep 30 03:45:04 resin mariner[255]: reraise(exc_type, exc_value, tb) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Sep 30 03:45:04 resin mariner[255]: raise value Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Sep 30 03:45:04 resin mariner[255]: response = self.full_dispatch_request() Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Sep 30 03:45:04 resin mariner[255]: rv = self.handle_user_exception(e) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Sep 30 03:45:04 resin mariner[255]: reraise(exc_type, exc_value, tb) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Sep 30 03:45:04 resin mariner[255]: raise value Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request Sep 30 03:45:04 resin mariner[255]: rv = self.dispatch_request() Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request Sep 30 03:45:04 resin mariner[255]: return self.view_functionsrule.endpoint Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/api.py", line 54, in print_status Sep 30 03:45:04 resin mariner[255]: FILES_DIRECTORY / selected_file Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask_caching/init.py", line 952, in decorated_function Sep 30 03:45:04 resin mariner[255]: rv = f(args, kwargs) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/utils.py", line 19, in read_cached_sliced_model_fil Sep 30 03:45:04 resin mariner[255]: file_format = get_file_format(filename) Sep 30 03:45:04 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/file_formats/utils.py", line 22, in get_file_format Sep 30 03:45:04 resin mariner[255]: assert file_format is not None Sep 30 03:45:04 resin mariner[255]: AssertionError Sep 30 03:46:05 resin mariner[255]: ERROR:waitress:Exception while serving /api/print_status Sep 30 03:46:05 resin mariner[255]: Traceback (most recent call last): Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/channel.py", line 397, in service Sep 30 03:46:05 resin mariner[255]: task.service() Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/task.py", line 168, in service Sep 30 03:46:05 resin mariner[255]: self.execute() Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/waitress/task.py", line 434, in execute Sep 30 03:46:05 resin mariner[255]: app_iter = self.channel.server.application(environ, start_response) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2464, in call Sep 30 03:46:05 resin mariner[255]: return self.wsgi_app(environ, start_response) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/whitenoise/base.py", line 85, in call Sep 30 03:46:05 resin mariner[255]: return self.application(environ, start_response) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app Sep 30 03:46:05 resin mariner[255]: response = self.handle_exception(e) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception Sep 30 03:46:05 resin mariner[255]: reraise(exc_type, exc_value, tb) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Sep 30 03:46:05 resin mariner[255]: raise value Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app Sep 30 03:46:05 resin mariner[255]: response = self.full_dispatch_request() Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request Sep 30 03:46:05 resin mariner[255]: rv = self.handle_user_exception(e) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception Sep 30 03:46:05 resin mariner[255]: reraise(exc_type, exc_value, tb) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise Sep 30 03:46:05 resin mariner[255]: raise value Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request Sep 30 03:46:05 resin mariner[255]: rv = self.dispatch_request() Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request Sep 30 03:46:05 resin mariner[255]: return self.view_functions[rule.endpoint](req.view_args) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/api.py", line 54, in print_status Sep 30 03:46:05 resin mariner[255]: FILES_DIRECTORY / selected_file Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/flask_caching/init.py", line 952, in decorated_function Sep 30 03:46:05 resin mariner[255]: rv = f(args, **kwargs) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/server/utils.py", line 19, in read_cached_sliced_model_fil Sep 30 03:46:05 resin mariner[255]: file_format = get_file_format(filename) Sep 30 03:46:05 resin mariner[255]: File "/opt/venvs/mariner3d/lib/python3.7/site-packages/mariner/file_formats/utils.py", line 22, in get_file_format Sep 30 03:46:05 resin mariner[255]: assert file_format is not None Sep 30 03:46:05 resin mariner[255]: AssertionError
Anycubic Mono X will be add to the list?
I think it would be a cool feature to allow people to implement their own machine settings like the resolution and build area so we can use this with printers like the anycubic photon which lots of people dislike the fact that we cant wirelessly print with it and the process of using mariner is more efficient than using something like nanodlp