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

Communication timeout after heatup when printing a file from SD #1409

foosel opened this issue Jul 13, 2016 · 0 comments


None yet
1 participant
Copy link

commented Jul 13, 2016


When printing a file from SD that includes an M109 line triggering a heatup segment (temperature report every second), no ok will be sent at the end of this heatup segment. The "external heatup" detection within OctoPrint's comm layer however will set the internal heatup flag, preventing M105 and M27 commands from being sent until an ok is seen. That will cause a communication timeout at the end of the heatup segment, since no ok will be sent but no other commands will be sent from OctoPrint to the printer either. See the log excerpt below for an example of this behaviour.

Changing monitoring state from 'Operational' to 'Printing from SD'
Send: N0 M110 N0*125
Send: N1 M117 Print started*21
Recv: ok 0
Recv: ok 1
Send: N2 M23 /20mm-b~1.gco*88
Send: N3 M24*22
Recv: File opened: 20mm-b~1.gco  Size: 117087
Recv: File selected
Recv: ok 2
Recv: ok 3
Send: N4 M27*18
Recv: T:0.05
Recv: SD printing byte 47/117087
Recv: ok 4
Recv: T:10.06
Recv: T:20.06
Recv: T:30.06
Recv: T:40.07
Recv: T:50.07
Recv: T:60.07
Recv: T:70.07
Recv: T:80.07
Recv: T:90.08
Recv: T:100.08
Recv: T:110.08
Recv: T:120.09
Recv: T:130.09
Recv: T:140.10
Recv: T:150.10
Recv: T:160.11
Recv: T:170.11
Recv: T:180.11
Recv: T:190.11
Recv: T:200.12
Communication timeout while printing, trying to trigger response from printer. Configure long running commands or increase communication timeout if that happens regularly on specific commands or long moves.
Send: N5 M105*34
Recv: ok B:1.00 /1.00 T0:209.04 /210.00 T1:0.00 /0.00 @:64

Note that this does not negatively influence the print in any way, but it is still ugly.


Set the read and comm timeouts to a lower value during heatup so that the end of it can be detected faster, don't print scary timeout message if a heatup is active and a timeout is encountered.

@foosel foosel added this to the 1.2.14 milestone Jul 13, 2016

@foosel foosel self-assigned this Jul 13, 2016

foosel added a commit that referenced this issue Jul 13, 2016

Shorter timeout during heatup & no scary message on end
Set read timeout on serial port to a much shorter value (default 2.0s)
during a heatup. Firmware should usually send the current temperature
back every second, so if that stops we can consider the heatup to be finished
even if we don't see an ok.

That is important in cases such as SD printing, where we might see a
heatup sequence we didn't trigger ourselves, during which we shouldn't spam
the printer with commands it potentially can't process but after which we
still should take up normal communication again. In case of a heatup sequence
triggered by an SD print we won't see an ok and hence only can now through a
timeout that things are now done printer side. In such a case the user should not
get thrown a scary timeout message in their general direction either.

Solves #1409

@foosel foosel closed this Jul 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.