probonopd / WirelessPrinting

Print wirelessly from Cura, PrusaSlicer or Slic3r to your 3D printer connected to an ESP8266 or ESP32 module
352 stars 65 forks source link

Printer won't start printing with Cura #142

Closed cpeuschel closed 4 years ago

cpeuschel commented 4 years ago

im using Cura 4.5 and OctoPrint Version 3.5.12 on Mac OS Catalina (10.15.3) and the Continuous build on my esp8266. if i click "print with OctoPrint", the gcode is uploading and the LCD says "Receiving..." while the upload is done it says "Received" and than nothing happens.

Telnet Output:

M105 <ok T:20.62 /0.00 B:32.47 /0.00 @:0 B@:0#ok# M117 Receiving... <ok#ok# M117 Receiving... <ok#ok# M105 <ok T:20.62 /0.00 B:29.80 /0.00 @:0 B@:0#ok# M105 <ok T:20.62 /0.00 B:29.32 /0.00 @:0 B@:0#ok# M105 <ok T:20.62 /0.00 B:27.39 /0.00 @:0 B@:0#ok# M105 <ok T:20.62 /0.00 B:28.84 /0.00 @:0 B@:0#ok# M105 <ok T:20.62 /0.00 B:29.80 /0.00 @:0 B@:0#ok# M105 <ok T:20.62 /0.00 B:27.87 /0.00 @:0 B@:0#ok# M117 Received <ok#ok# M105 <ok T:20.62 /0.00 B:27.87 /0.00 @:0 B@:0#ok#

if i start the print directly on "http://the-ip-address/" the printer starts the print.

probonopd commented 4 years ago

I suspect Cura is not sending the print parameter:

https://github.com/probonopd/WirelessPrinting/blob/bad8e5166a2f1bbad95a4fb8849b08d1edfc7d3a/ESP8266WirelessPrintAsync/ESP8266WirelessPrintAsync.ino#L685-L692

Can you find a way to see the request that Cura is sending?

probonopd commented 4 years ago

OctoPrint Version 3.5.12

WirelessPrinting does not use nor need OctoPrint; it is a smaller implementation of it that goes on the ESP8266.

Which Cura plugin and version do you use to send the gcode to the printer?

cpeuschel commented 4 years ago

Which Cura plugin and version do you use to send the gcode to the printer?

Im Using Cura 4.5 with the OctoPrint Connection Plugin Version 3.5.12

cpeuschel commented 4 years ago

Can you find a way to see the request that Cura is sending?

Maybe with Wireshark. I will check this

probonopd commented 4 years ago

Im Using Cura 4.5 with the OctoPrint Connection Plugin Version 3.5.12

Ah ok, somehow I was under the impression that one always needs a version of Cura-OctoPrintPlugin that matches Cura, but apparently this is (no longer?) the case.

cpeuschel commented 4 years ago

Cura doesn't send the POST parameter "print", but why?

probonopd commented 4 years ago

Great question. I am trying to reproduce it.

probonopd commented 4 years ago

I can reproduce the issue with Cura 4.5 and the OctoPrint Connection Plugin Version 3.5.12.

It also gives me this:

error

Why does it consider this reponse to be an error?

cpeuschel commented 4 years ago

do u have discord? then we can debug this Problem and post the answer as a comment if we solved the Problem.

probonopd commented 4 years ago

Same issue with Cura 4.4.1 and the OctoPrint Connection Plugin Version 3.5.12. I suspect something in the OctoPrint Connection Plugin has changed.

Logging into Discord is too complicated for me.

probonopd commented 4 years ago
rm -rf ~/.local/share/cura/4.5/plugins/OctoPrintPlugin/*`
cd ~/.local/share/cura/4.5/plugins/OctoPrintPlugin
git clone https://github.com/fieldOfView/Cura-OctoPrintPlugin
cd Cura-OctoPrintPlugin/
git checkout 3cef0a9

Works

So https://github.com/fieldOfView/Cura-OctoPrintPlugin/commit/3cef0a955ae7ccfa5c07d20d9d147c530cc9d6ec (version 3.5.11) is known good.

Do you know how to do a git bisect to find the offending commit?

probonopd commented 4 years ago

Can you post the POST request from a working and a non-working version for comparison?

probonopd commented 4 years ago

Here something was changed regarding the print parameter:

https://github.com/fieldOfView/Cura-OctoPrintPlugin/commit/ab40c033cb36115575380c234340b893df091aad

probonopd commented 4 years ago

I have opened tickets in the https://github.com/fieldOfView/Cura-OctoPrintPlugin project, let's continue there.

probonopd commented 4 years ago

According to https://github.com/fieldOfView/Cura-OctoPrintPlugin/issues/156#issuecomment-596106186 it looks like we either need to support that additional "start printing" command, or just comment out the if (request->hasParam("print", true)) condition so that we always start printing regardless of whether the client requests it or not.

It's a bit unfortunate that the OctoPrint Connection Plugin continues to use more and more of OctoPrint's API, while we are trying to get away with the most minimal subset possible.

cpeuschel commented 4 years ago

Maybe we have to develop an Cura Plugin?

probonopd commented 4 years ago

Fixed in the latest build. Thanks for reporting @cpeuschel