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

Adding SD Card Upload support for Creator Pro 2 #83

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

Conversation

msmthng
Copy link
Collaborator

@msmthng msmthng commented Mar 2, 2023

The Upload is working also the start to print from SD Card.
The printer is not answering to the SD listening request (not supported by the firmware used).
does it make sense to fake the M27 support based on a filedatabase what is uploaded to the printer using octoprint but i don't know if it is possible to inject that command in a way that the printer serial response is modified by the plugin.

adding special path handling for e.g. Creator Pro 2 on SD Upload
updating Creator Pro 2 printing limitation
@Mrnt
Copy link
Owner

Mrnt commented Mar 4, 2023

It looks like the upload path is different for the CP2, but otherwise the behavior is the same?

Out of curiosity - were you able to sniff the USB traffic between FlashPrint and the printer when it controls the printer (lights, etc) and does the SD card upload? Wondering how much they changed the communication from the other printers.

What about making the file path a string that goes with the printer profile, eg:

	0x000e: {"name": "Creator Pro 2", "sd_path":"1:%s\r\n"},

and then the upload could be:

	def process_upload():
		error = ""
		errormsg = "Unable to upload to SD card"
		if "sd_path" in self._printer_profile:
		    "sd_path" = self._printer_profile["sd_path"]
		else:
		    "sd_path" = "0:/user/%s\r\n"

and then the upload could be something like:

 	ok, answer = self._serial_obj.sendcommand(b"M28 %d "+sd_path % (file_size, remote_name.encode()), 5000)

and the print command something like:

	self._comm.selectFile(sd_path % remote_name, True)

Then special casing for other printers would be as simple as adding a path string to the printer profile.

@msmthng
Copy link
Collaborator Author

msmthng commented Mar 6, 2023

image

for sniffing the usb traffic i was able to get information for the sd card upload, turning the lights using flashprint isn't possilbe. se the falshprint screenshot for ffcp2 they don't provide the details window.

@msmthng
Copy link
Collaborator Author

msmthng commented Mar 6, 2023

i think your file path apporach is better then using this special var, i will change my implementation

@Mrnt
Copy link
Owner

Mrnt commented Mar 6, 2023

image

for sniffing the usb traffic i was able to get information for the sd card upload, turning the lights using flashprint isn't possilbe. se the falshprint screenshot for ffcp2 they don't provide the details window.

Good that you were able to sniff it!

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.

2 participants