Communication Error

I tried to print a file I uploaded to Octoprint and I got the error below.

Communication Error
There was a communication error while talking to your printer. Please consult the terminal output and OctoPrint.log for details.
Error: Printer keeps requesting line 17 again and again, communication stud.

octoprint.log

2020-02-13 09:15:00,885 - octoprint.filemanager.analysis - INFO - Starting analysis of local:PETG/Left_Arm_PET0.2mm.gcode
2020-02-13 09:15:01,937 - octoprint.filemanager.analysis - INFO - Analysis of entry local:PETG/Left_Arm_PET0.2mm.gcode finished, needed 1.05s
2020-02-13 09:15:08,612 - octoprint.printer.standard.job - INFO - Print job selected - origin: local, path: PETG/Left_Arm_PET0.2mm.gcode, owner: jansenchua, user: jansenchua
2020-02-13 09:15:08,646 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting"
2020-02-13 09:15:08,658 - octoprint.printer.standard.job - INFO - Print job started - origin: local, path: PETG/Left_Arm_PET0.2mm.gcode, owner: jansenchua, user: jansenchua
2020-02-13 09:15:08,670 - octoprint.util.comm - INFO - Changing monitoring state from "Starting" to "Printing"
2020-02-13 09:15:08,686 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-02-13 09:15:08,746 - octoprint.plugins.excluderegion - INFO - File selected, resetting internal state
2020-02-13 09:15:08,852 - octoprint.plugins.excluderegion - INFO - Printing started
2020-02-13 09:15:09,343 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 17, current line = 19
| Last lines in terminal:
| Send: N10 M205 X10 Y10 Z0.3 E5.0*13
| Recv: ok N:10
| Send: N11 M205 S0 T0*19
| Recv: ok N:11
| Send: N12 M117 Heating...*65
| Recv: ok N:12
| Send: N13 M300 S2500 P100*39
| Recv: ok N:13
| Send: N14 M104 S220*80
| Recv: ok N:14
| Send: N15 M140 S85*108
| Recv: ok N:15
| Send: N16 G1 Z20*103
| Recv: ok N:16
| Send: N17 G28 X Y*36
| Recv: //sd cmd error cnt:0 len:15 :N17 G28 X Y*36
| Recv: 
| Recv: ok
| Send: N18 M84*38
| Recv: Resend:17
2020-02-13 09:15:09,347 - octoprint.util.comm - INFO - Firmware didn't send an 'ok' with their resend request. That's a known bug with some firmware variants out there. Simulating an ok to continue...
2020-02-13 09:15:09,363 - octoprint.util.comm - INFO - Got a resend request from the printer: requested line = 17, current line = 19
| Last lines in terminal:
| Recv: ok N:14
| Send: N15 M140 S85*108
| Recv: ok N:15
| Send: N16 G1 Z20*103
| Recv: ok N:16
| Send: N17 G28 X Y*36
| Recv: //sd cmd error cnt:0 len:15 :N17 G28 X Y*36
| Recv: 
| Recv: ok
| Send: N18 M84*38
| Recv: Resend:17
| Recv: //last:16 curr:18 rcv:N18 M84*38
| Send: N17 G28 X Y*36
| Recv: 
| Recv: //callback_pf error
| Recv: //sd cmd error cnt:1 len:15 :N17 G28 X Y*36
| Recv: 
| Recv: ok
| Send: N18 M84*38
| Recv: Resend:17

I am using Tronxy D01 Printer with the latest Octopi.

I can control my printer to move as well as heat the extruder and bed with Octopi without a problem.

Appreciate if anyone can help me. I am very new to OctoPrint

Try installing this

and also changing your G28 X Y in your slicer's start code configuration to G28 X0 Y0 and see if it helps. Your printer has a broken firmware (that is making its rounds more and more and causing a lot of users grief - complain to your printer vendor about this please, I can't!), this might successfully work around that.

Hi sorry I am really very very new to raspberry pi and octopi what shall I change the G28 X Y value to?

Also I am using tronxy not anycubic can I still install that plugin?

:face_with_raised_eyebrow:


Yes.

So what's the G28 X Y value?

Learn your g-code...

https://reprap.org/wiki/G-code

it's the command for homing you axis - X0 and Y0 axis in this case.
If you don't know a gcode just google it with something like G28 gcode

Ok thanks guys let me try

Hi I tried installing the plugin that u suggested now when i press print it doesn't show communication error.

however, the printer doesn't move at all... OctoPrint shows printing..

was thinking could u help me go through my gcode in slic3r to see if there is anything wrong. it works for me when i print directly from the microSD in the printer.

I am sorry I am really very new to 3d printing appreciate your help :slight_smile:

start g-code

M201 X500 Y500 Z100 E5000 ; sets maximum accelerations, mm/sec^2
M203 X500 Y500 Z5 E25 ; sets maximum feedrates, mm/sec
M204 S500 T500 ; sets acceleration (S) and retract acceleration (T)
M205 X10 Y10 Z0.3 E5.0 ; sets the jerk limits, mm/sec
M205 S0 T0 ; sets the minimum extruding and travel feed rate, mm/sec

;M117 Heating... ;Put printing message on LCD screen
M300 S2500 P100; Beep
;M221 S{if layer_height<0.075}100{else}95{endif} ; Set flow
M104 S[first_layer_temperature] ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
G1 Z20 ; this is a good start heating position
G28 X Y; Home XY
M84 ; disable motors
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S[first_layer_temperature] ; wait for extruder temp

; Start of print
G21; metric values
G90 ; absolute positioning
M82; set extruder to absolute mode

G28;

; Prepare nozzle
G92 E0 ; Set extrusion distance to 0
G92 E0 ; Set extrusion distance to 0
G1 F1800 E3;
G92 E0 ; Set extrusion distance to 0
G90;


; You may want to adjust the X and Y here so the nozzle is really above the bed!
G1 X5.0 Y5.0 F7200 ; Move to a position in the left front of the bed
G1 Z0.6; Move nozzle above 0.6 mm of the bed

G91 ; Use relative mode
; Make some jerky zick-zack move at the beginning
; This is supposed to get rid of residue at the nozzle
G1 X1.0 Y5.0 Z-0.1 E-1.0 F7200 ; X6 Y10 Z0.1, retract a tiny bit / 120mm/s
G1 X1.0 Y-5.0 Z0.1 E2.0 F7200 ; X7 Y5 Z0.2 extrude a tiny bit
G1 X2.0 Y5.0 Z-0.1 F7200 ; X9 Y10 Z0.1
G1 X2.0 Y-5.0 Z0.1 F7200 ; X11 Y5 Z0.2
G1 X2.0 Y5.0 F7200 ; X13 Y10
G1 X2.0 Y-5.0 F7200 ; X15 Y5

; now print a line of filament to prepare extrusion
G1 Y50 E20 F1000 ; prints a line in the front
G1 Y50 E40 F1000 ; prints a line in the front

; Done with the dancing :)
G92 E0 ; Set extrusion distance to 0
G90 ; switch back to absolute mode

;M117 Printing... ;Put printing message on LCD screen
; Start of actual GCode for the print

End g-code

G4 ; wait
M221 S100
M106 S0 ; turn off cooling fan
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91
G1 F1800 E-3
G90
{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up
G28 X0 ; home x and y axis
G1 Y180; Remove Print Position
M84 ; disable motors
M300 S2600 P100; Beep

This start and end g-codes, you have them in the slicer or in OctoPrint?
The codes seem to belong to the slicer because the slicer has to fill in the values for the placeholders in brackets: [something] and do the if cases.

When there are no values for the temperatures, the printer assume 0 (zero) for them and a cold printer does not print.

Those are code for slicer I am wondering if anything could go wrong there. Can u help me to take a look :slight_smile:

Upload your output gcode file so we can take a look at how those placeholders are getting interpreted by Slic3r. Please also verify if you are using Prusa Slic3r, the regular Slic3r application, or some other "slicer" application like Cura, Ideamaker, Simplify3D, etc. There are lots of slicers and they all have different feature sets.

Sorry where can I get the output gcode... I am using prusa slicer

can anyone help me here please :frowning:

Open your prusa slicer, add a stl file to the build area, slice, export the file to gcode and upload here.

Tyre Hugger_PET0.12mm.gcode (3.5 MB)

there you go.. hopefully that can help :slight_smile:

i paste the gcode scripts in OctoPrint as well
before print job starts

M140 S[bed0_temperature] T0 ; Start heating bed
M190 S[bed0_temperature] T0 ; Heat bed and wait for temperature to stabilize
M104 S[extruder0_temperature] T0 ; Start heating right extruder
M109 S[extruder0_temperature] T0 ; Heat right extruder and wait for temp to stabilize
G28 XYZ
G1 Z0.25
G92 E0
G1 X100 E10 F600
M201 X1000 Y1000

also my serial.log

2020-02-25 16:38:52,103 - Connecting to: /dev/ttyUSB0
2020-02-25 16:38:52,178 - Changing monitoring state from "Offline" to "Opening serial port"
2020-02-25 16:38:52,180 - Connected to: Serial<id=0xa900e930, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-02-25 16:38:52,183 - Changing monitoring state from "Opening serial port" to "Connecting"
2020-02-25 16:38:52,191 - Send: N0 M110*35
2020-02-25 16:38:52,193 - Send: N0 M110*35
2020-02-25 16:38:52,209 - Recv: ok N:0
2020-02-25 16:38:52,215 - Changing monitoring state from "Connecting" to "Operational"
2020-02-25 16:38:52,225 - Send: N0 M110*35
2020-02-25 16:38:52,230 - Recv: ok N:0
2020-02-25 16:38:52,237 - Recv: ok N:0
2020-02-25 16:38:52,237 - Send: N1 M115*39
2020-02-25 16:38:52,257 - Send: N2 M21*18
2020-02-25 16:38:52,261 - Recv: ok CBD make it.Date:Aug 29 2019 Time:11:00:30
2020-02-25 16:38:52,274 - Recv: ok N:2
2020-02-25 16:38:54,643 - Changing monitoring state from "Operational" to "Starting"
2020-02-25 16:38:54,689 - Send: N3 M140 S[bed0_temperature] T0*116
2020-02-25 16:38:54,702 - Send: N0 M110*35
2020-02-25 16:38:54,708 - Recv: //sd cmd error cnt:124 len:35 :N3 M140 S[bed0_temperature] T0*116
2020-02-25 16:38:54,710 - Recv: 
2020-02-25 16:38:54,712 - Recv: ok
2020-02-25 16:38:54,720 - Recv: ok N:0
2020-02-25 16:38:54,720 - Send: N1 M190 S[bed0_temperature] T0*123
2020-02-25 16:38:54,723 - Send: N2 M104 S[extruder0_temperature] T0*11
2020-02-25 16:38:54,738 - Recv: //sd cmd error cnt:125 len:74 :N1 M190 S[bed0_temperature] T0*123
2020-02-25 16:38:54,749 - Recv: N2 M104 S[extruder0_temperature] T0*11
2020-02-25 16:38:54,755 - Recv: 
2020-02-25 16:38:54,759 - Recv: ok
2020-02-25 16:38:54,765 - Send: N3 M109 S[extruder0_temperature] T0*7
2020-02-25 16:38:54,780 - Recv: //sd cmd error cnt:126 len:38 :N3 M109 S[extruder0_temperature] T0*7
2020-02-25 16:38:54,783 - Recv: 
2020-02-25 16:39:09,781 - Recv: ok
2020-02-25 16:39:09,794 - Send: N4 G28 XYZ*108
2020-02-25 16:39:09,807 - Recv: //sd cmd error cnt:127 len:15 :N4 G28 XYZ*108
2020-02-25 16:39:09,809 - Recv: 

That's the problem. Remove that from OctoPrint GCODE scripts section, your gcode is fine.

i removed that gcode from before print job starts

the printer did try to heat up the bed and extruder for about 1 sec then disconnected with the below msg

Communication error

There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: Printer keeps requesting line 16 again and again, communication stuck