Guest User

klippy.log

a guest
Nov 18th, 2025
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 222.16 KB | None | 0 0
  1. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  2. Git version: 'v0.13.0-320-gc80324946'
  3. Branch: master
  4. Remote: origin
  5. Tracked URL: https://github.com/Klipper3d/klipper.git
  6. CPU: 4 core ?
  7. Device: Raspberry Pi 3 Model B Rev 1.2
  8. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  9. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  10. =============== Log rollover at Tue Nov 18 18:32:14 2025 ===============
  11. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  12. Git version: 'v0.13.0-320-gc80324946'
  13. Branch: master
  14. Remote: origin
  15. Tracked URL: https://github.com/Klipper3d/klipper.git
  16. CPU: 4 core ?
  17. Device: Raspberry Pi 3 Model B Rev 1.2
  18. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  19. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  20. Building C code module c_helper.so
  21. Start printer at Tue Nov 18 18:33:05 2025 (1763490785.9 111.9)
  22. Unable to open config file /home/pi/printer_data/config/printer.cfg
  23. Traceback (most recent call last):
  24. File "/home/pi/klipper/klippy/configfile.py", line 150, in read_config_file
  25. f = open(filename, 'r')
  26. ^^^^^^^^^^^^^^^^^^^
  27. FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg'
  28. Config error
  29. Traceback (most recent call last):
  30. File "/home/pi/klipper/klippy/configfile.py", line 150, in read_config_file
  31. f = open(filename, 'r')
  32. ^^^^^^^^^^^^^^^^^^^
  33. FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg'
  34.  
  35. During handling of the above exception, another exception occurred:
  36.  
  37. Traceback (most recent call last):
  38. File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
  39. self._read_config()
  40. File "/home/pi/klipper/klippy/klippy.py", line 116, in _read_config
  41. config = pconfig.read_main_config()
  42. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  43. File "/home/pi/klipper/klippy/configfile.py", line 483, in read_main_config
  44. fileconfig, autosave_fileconfig = self.autosave.load_main_config()
  45. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  46. File "/home/pi/klipper/klippy/configfile.py", line 304, in load_main_config
  47. data = cfgrdr.read_config_file(filename)
  48. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  49. File "/home/pi/klipper/klippy/configfile.py", line 156, in read_config_file
  50. raise error(msg)
  51. configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg
  52. webhooks client 547695440144: New connection
  53. webhooks client 547695440144: Client info {'program': 'Moonraker', 'version': 'v0.9.3-120-g5836eab'}
  54. Starting Klippy...
  55. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  56. Git version: 'v0.13.0-403-gb4c7cf4a3'
  57. Branch: master
  58. Remote: origin
  59. Tracked URL: https://github.com/Klipper3d/klipper.git
  60. CPU: 4 core ?
  61. Device: Raspberry Pi 3 Model B Rev 1.2
  62. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  63. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  64. Building C code module c_helper.so
  65. Start printer at Tue Nov 18 18:34:39 2025 (1763490879.1 205.0)
  66. Unable to open config file /home/pi/printer_data/config/printer.cfg
  67. Traceback (most recent call last):
  68. File "/home/pi/klipper/klippy/configfile.py", line 150, in read_config_file
  69. f = open(filename, 'r')
  70. ^^^^^^^^^^^^^^^^^^^
  71. FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg'
  72. Config error
  73. Traceback (most recent call last):
  74. File "/home/pi/klipper/klippy/configfile.py", line 150, in read_config_file
  75. f = open(filename, 'r')
  76. ^^^^^^^^^^^^^^^^^^^
  77. FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/printer_data/config/printer.cfg'
  78.  
  79. During handling of the above exception, another exception occurred:
  80.  
  81. Traceback (most recent call last):
  82. File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
  83. self._read_config()
  84. File "/home/pi/klipper/klippy/klippy.py", line 116, in _read_config
  85. config = pconfig.read_main_config()
  86. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  87. File "/home/pi/klipper/klippy/configfile.py", line 483, in read_main_config
  88. fileconfig, autosave_fileconfig = self.autosave.load_main_config()
  89. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  90. File "/home/pi/klipper/klippy/configfile.py", line 304, in load_main_config
  91. data = cfgrdr.read_config_file(filename)
  92. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  93. File "/home/pi/klipper/klippy/configfile.py", line 156, in read_config_file
  94. raise error(msg)
  95. configparser.Error: Unable to open config file /home/pi/printer_data/config/printer.cfg
  96. webhooks client 548004477328: New connection
  97. webhooks client 548004477328: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  98. webhooks client 548004477328: Disconnected
  99. Restarting printer
  100. Start printer at Tue Nov 18 19:00:33 2025 (1763492433.4 1759.4)
  101. ===== Config file =====
  102. [virtual_sdcard]
  103. path = /home/klipper/printer_data/gcodes/
  104. on_error_gcode = CANCEL_PRINT
  105.  
  106. [pause_resume]
  107.  
  108. [display_status]
  109.  
  110. [respond]
  111.  
  112. [gcode_macro CANCEL_PRINT]
  113. description = Cancel the actual running print
  114. rename_existing = CANCEL_PRINT_BASE
  115. gcode =
  116.  
  117. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  118. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  119. {% set retract = client.cancel_retract|default(5.0)|abs %}
  120.  
  121. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  122. else "X=" ~ client.park_at_cancel_x %}
  123. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  124. else "Y=" ~ client.park_at_cancel_y %}
  125. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  126.  
  127.  
  128. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  129. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  130. {% endif %}
  131. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  132. _CLIENT_RETRACT LENGTH={retract}
  133. TURN_OFF_HEATERS
  134. M106 S0
  135. {client.user_cancel_macro|default("")}
  136. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  137.  
  138. SET_PAUSE_NEXT_LAYER ENABLE=0
  139. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  140. CANCEL_PRINT_BASE
  141.  
  142. [gcode_macro PAUSE]
  143. description = Pause the actual running print
  144. rename_existing = PAUSE_BASE
  145. gcode =
  146.  
  147. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  148. {% set idle_timeout = client.idle_timeout|default(0) %}
  149. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  150. {% set restore = False if printer.toolhead.extruder == ''
  151. else True if params.RESTORE|default(1)|int == 1 else False %}
  152.  
  153. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  154.  
  155. {% if idle_timeout > 0 %}
  156. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  157. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  158. {% endif %}
  159. PAUSE_BASE
  160. {client.user_pause_macro|default("")}
  161. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  162.  
  163. [gcode_macro RESUME]
  164. description = Resume the actual running print
  165. rename_existing = RESUME_BASE
  166. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  167. variable_restore_idle_timeout = 0
  168. variable_idle_state = False
  169. gcode =
  170.  
  171. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  172. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  173. {% set sp_move = client.speed_move|default(velocity) %}
  174. {% set runout_resume = True if client.runout_sensor|default("") == ""
  175. else True if not printer[client.runout_sensor].enabled
  176. else printer[client.runout_sensor].filament_detected %}
  177. {% set can_extrude = True if printer.toolhead.extruder == ''
  178. else printer[printer.toolhead.extruder].can_extrude %}
  179. {% set do_resume = False %}
  180. {% set prompt_txt = [] %}
  181.  
  182.  
  183. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  184. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  185. {% if last_extruder_temp.restore %}
  186.  
  187. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  188. M109 S{last_extruder_temp.temp}
  189. {% set do_resume = True %}
  190. {% elif can_extrude %}
  191. {% set do_resume = True %}
  192. {% else %}
  193. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  194. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  195. {% endif %}
  196.  
  197. {% elif can_extrude %}
  198. {% set do_resume = True %}
  199. {% else %}
  200. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  201. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  202. {% endif %}
  203. {% if runout_resume %}
  204. {% if do_resume %}
  205. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  206. {client.user_resume_macro|default("")}
  207. _CLIENT_EXTRUDE
  208. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  209. {% endif %}
  210. {% else %}
  211. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  212. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  213. {% endif %}
  214.  
  215. {% if not (runout_resume and do_resume) %}
  216. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  217. {% for element in prompt_txt %}
  218. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  219. {% endfor %}
  220. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  221. RESPOND TYPE=command MSG="action:prompt_show"
  222. {% endif %}
  223.  
  224. [gcode_macro SET_PAUSE_NEXT_LAYER]
  225. description = Enable a pause if the next layer is reached
  226. gcode =
  227. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  228. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  229. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  230. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  231.  
  232. [gcode_macro SET_PAUSE_AT_LAYER]
  233. description = Enable/disable a pause if a given layer number is reached
  234. gcode =
  235. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  236. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  237. else params.LAYER is defined %}
  238. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  239. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  240. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  241.  
  242. [gcode_macro SET_PRINT_STATS_INFO]
  243. rename_existing = SET_PRINT_STATS_INFO_BASE
  244. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  245. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  246. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  247. gcode =
  248. {% if pause_next_layer.enable %}
  249. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  250. {pause_next_layer.call}
  251. SET_PAUSE_NEXT_LAYER ENABLE=0
  252. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  253. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  254. {pause_at_layer.call}
  255. SET_PAUSE_AT_LAYER ENABLE=0
  256. {% endif %}
  257. SET_PRINT_STATS_INFO_BASE {rawparams}
  258.  
  259. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  260. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  261. gcode =
  262.  
  263. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  264. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  265. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  266. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  267. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  268. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  269. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  270. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  271.  
  272. {% set origin = printer.gcode_move.homing_origin %}
  273. {% set act = printer.gcode_move.gcode_position %}
  274. {% set max = printer.toolhead.axis_maximum %}
  275. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  276. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  277. else False %}
  278.  
  279. {% set z_min = params.Z_MIN|default(0)|float %}
  280. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  281. {% set x_park = params.X if params.X is defined
  282. else custom_park_x if use_custom
  283. else 0.0 if round_bed
  284. else (max.x - 5.0) %}
  285. {% set y_park = params.Y if params.Y is defined
  286. else custom_park_y if use_custom
  287. else (max.y - 5.0) if round_bed and z_park < cone
  288. else 0.0 if round_bed
  289. else (max.y - 5.0) %}
  290.  
  291. _CLIENT_RETRACT
  292. {% if "xyz" in printer.toolhead.homed_axes %}
  293. G90
  294. G1 Z{z_park} F{sp_hop}
  295. G1 X{x_park} Y{y_park} F{sp_move}
  296. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  297. {% else %}
  298. RESPOND TYPE=echo MSG='Printer not homed'
  299. {% endif %}
  300.  
  301. [gcode_macro _CLIENT_EXTRUDE]
  302. description = Extrudes, if the extruder is hot enough
  303. gcode =
  304.  
  305. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  306. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  307. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  308. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  309. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  310.  
  311. {% if printer.toolhead.extruder != '' %}
  312. {% if printer[printer.toolhead.extruder].can_extrude %}
  313. {% if use_fw_retract %}
  314. {% if length < 0 %}
  315. G10
  316. {% else %}
  317. G11
  318. {% endif %}
  319. {% else %}
  320. M83
  321. G1 E{length} F{(speed|float|abs) * 60}
  322. {% if absolute_extrude %}
  323. M82
  324. {% endif %}
  325. {% endif %}
  326. {% else %}
  327. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  328. {% endif %}
  329. {% endif %}
  330.  
  331. [gcode_macro _CLIENT_RETRACT]
  332. description = Retracts, if the extruder is hot enough
  333. gcode =
  334. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  335. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  336. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  337.  
  338. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  339.  
  340. [gcode_macro _CLIENT_LINEAR_MOVE]
  341. description = Linear move with save and restore of the gcode state
  342. gcode =
  343. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  344. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  345. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  346. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  347. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  348. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  349. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  350. SAVE_GCODE_STATE NAME=_client_movement
  351. {% if x_move or y_move or z_move %}
  352. G9{ 0 if ABSOLUTE else 1 }
  353. {% endif %}
  354. {% if e_move %}
  355. M8{ 2 if ABSOLUTE_E else 3 }
  356. {% endif %}
  357. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  358. RESTORE_GCODE_STATE NAME=_client_movement
  359.  
  360. [stepper_x]
  361. step_pin = PD7
  362. dir_pin = !PC5
  363. enable_pin = !PD6
  364. microsteps = 16
  365. rotation_distance = 40
  366. endstop_pin = ^PC2
  367. position_endstop = 0
  368. position_max = 235
  369. homing_speed = 25
  370.  
  371. [stepper_y]
  372. step_pin = PC6
  373. dir_pin = !PC7
  374. enable_pin = !PD6
  375. microsteps = 16
  376. rotation_distance = 40
  377. endstop_pin = ^PC3
  378. position_endstop = 0
  379. position_max = 235
  380. homing_speed = 25
  381.  
  382. [stepper_z]
  383. step_pin = PB3
  384. dir_pin = PB2
  385. enable_pin = !PA5
  386. microsteps = 16
  387. rotation_distance = 8
  388. endstop_pin = probe:z_virtual_endstop
  389. position_min = -5
  390. position_max = 240
  391.  
  392. [extruder]
  393. max_extrude_only_distance = 100.0
  394. step_pin = PB1
  395. dir_pin = !PB0
  396. enable_pin = !PD6
  397. microsteps = 16
  398. rotation_distance = 33.683
  399. nozzle_diameter = 0.400
  400. filament_diameter = 1.750
  401. heater_pin = PD5
  402. sensor_type = EPCOS 100K B57560G104F
  403. sensor_pin = PA7
  404. control = pid
  405. pid_kp = 29.211
  406. pid_ki = 10.819
  407. pid_kd = 19.717
  408. min_temp = 0
  409. max_temp = 300
  410.  
  411. [heater_bed]
  412. heater_pin = PD4
  413. sensor_type = EPCOS 100K B57560G104F
  414. sensor_pin = PA6
  415. control = pid
  416. pid_kp = 73.853
  417. pid_ki = 1.901
  418. pid_kd = 717.301
  419. min_temp = 0
  420. max_temp = 130
  421.  
  422. [fan]
  423. pin = PB4
  424.  
  425. [mcu]
  426. serial = /dev/ttyUSB0
  427. baud = 115200
  428.  
  429. [printer]
  430. kinematics = cartesian
  431. max_velocity = 500
  432. max_accel = 6000
  433. max_z_velocity = 5
  434. max_z_accel = 100
  435.  
  436. [bed_screws]
  437. screw1 = 30.5, 37
  438. screw2 = 30.5, 207
  439. screw3 = 204.5, 207
  440. screw4 = 204.5, 37
  441.  
  442. [display]
  443. lcd_type = st7920
  444. cs_pin = PA3
  445. sclk_pin = PA1
  446. sid_pin = PC1
  447. encoder_pins = ^PD2, ^PD3
  448. click_pin = ^!PC0
  449.  
  450. [bltouch]
  451. sensor_pin = ^PC4
  452. control_pin = PA4
  453. x_offset = -45
  454. z_offset = 2.540
  455. speed = 10
  456. samples = 3
  457. probe_with_touch_mode = False
  458. samples_tolerance = 0.1
  459. sample_retract_dist = 5.0
  460.  
  461. [safe_z_home]
  462. home_xy_position = 117, 117
  463. speed = 25
  464. z_hop = 5
  465. z_hop_speed = 10
  466.  
  467. [bed_mesh]
  468. speed = 25
  469. horizontal_move_z = 5
  470. mesh_min = 47,56
  471. mesh_max = 190,210
  472. probe_count = 5,5
  473. =======================
  474. Extruder max_extrude_ratio=0.266081
  475. mcu 'mcu': Starting serial connect
  476. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  477. webhooks client 547981908368: New connection
  478. webhooks client 547981908368: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  479. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  480. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  481. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  482. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  483. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  484. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  485. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  486. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  487. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  488. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  489. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  490. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  491. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  492. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  493. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  494. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  495. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  496. MCU error during connect
  497. Traceback (most recent call last):
  498. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  499. self._serial.connect_uart(self._serialport, self._baud, rts)
  500. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  501. self._error("Unable to connect")
  502. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  503. raise error(self.warn_prefix + (msg % params))
  504. serialhdl.error: mcu 'mcu': Unable to connect
  505.  
  506. During handling of the above exception, another exception occurred:
  507.  
  508. Traceback (most recent call last):
  509. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  510. self.send_event("klippy:mcu_identify")
  511. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  512. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  513. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  514. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  515. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  516. ^^^^^^^^^^^
  517. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  518. self._attach()
  519. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  520. raise error(str(e))
  521. mcu.error: mcu 'mcu': Unable to connect
  522. mcu 'mcu': Unable to connect
  523. Once the underlying issue is corrected, use the
  524. "FIRMWARE_RESTART" command to reset the firmware, reload the
  525. config, and restart the host software.
  526. Error configuring printer
  527.  
  528. No build file /home/pi/klipper/klippy/../.config
  529. No build file /home/pi/klipper/klippy/../out/klipper.dict
  530. No build file /home/pi/klipper/klippy/../out/klipper.elf
  531. Starting Klippy...
  532. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  533. Git version: 'v0.13.0-403-gb4c7cf4a3'
  534. Branch: master
  535. Remote: origin
  536. Tracked URL: https://github.com/Klipper3d/klipper.git
  537. CPU: 4 core ?
  538. Device: Raspberry Pi 3 Model B Rev 1.2
  539. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  540. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  541. Start printer at Tue Nov 18 19:06:03 2025 (1763492763.5 26.9)
  542. ===== Config file =====
  543. [virtual_sdcard]
  544. path = /home/klipper/printer_data/gcodes/
  545. on_error_gcode = CANCEL_PRINT
  546.  
  547. [pause_resume]
  548.  
  549. [display_status]
  550.  
  551. [respond]
  552.  
  553. [gcode_macro CANCEL_PRINT]
  554. description = Cancel the actual running print
  555. rename_existing = CANCEL_PRINT_BASE
  556. gcode =
  557.  
  558. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  559. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  560. {% set retract = client.cancel_retract|default(5.0)|abs %}
  561.  
  562. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  563. else "X=" ~ client.park_at_cancel_x %}
  564. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  565. else "Y=" ~ client.park_at_cancel_y %}
  566. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  567.  
  568.  
  569. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  570. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  571. {% endif %}
  572. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  573. _CLIENT_RETRACT LENGTH={retract}
  574. TURN_OFF_HEATERS
  575. M106 S0
  576. {client.user_cancel_macro|default("")}
  577. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  578.  
  579. SET_PAUSE_NEXT_LAYER ENABLE=0
  580. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  581. CANCEL_PRINT_BASE
  582.  
  583. [gcode_macro PAUSE]
  584. description = Pause the actual running print
  585. rename_existing = PAUSE_BASE
  586. gcode =
  587.  
  588. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  589. {% set idle_timeout = client.idle_timeout|default(0) %}
  590. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  591. {% set restore = False if printer.toolhead.extruder == ''
  592. else True if params.RESTORE|default(1)|int == 1 else False %}
  593.  
  594. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  595.  
  596. {% if idle_timeout > 0 %}
  597. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  598. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  599. {% endif %}
  600. PAUSE_BASE
  601. {client.user_pause_macro|default("")}
  602. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  603.  
  604. [gcode_macro RESUME]
  605. description = Resume the actual running print
  606. rename_existing = RESUME_BASE
  607. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  608. variable_restore_idle_timeout = 0
  609. variable_idle_state = False
  610. gcode =
  611.  
  612. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  613. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  614. {% set sp_move = client.speed_move|default(velocity) %}
  615. {% set runout_resume = True if client.runout_sensor|default("") == ""
  616. else True if not printer[client.runout_sensor].enabled
  617. else printer[client.runout_sensor].filament_detected %}
  618. {% set can_extrude = True if printer.toolhead.extruder == ''
  619. else printer[printer.toolhead.extruder].can_extrude %}
  620. {% set do_resume = False %}
  621. {% set prompt_txt = [] %}
  622.  
  623.  
  624. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  625. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  626. {% if last_extruder_temp.restore %}
  627.  
  628. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  629. M109 S{last_extruder_temp.temp}
  630. {% set do_resume = True %}
  631. {% elif can_extrude %}
  632. {% set do_resume = True %}
  633. {% else %}
  634. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  635. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  636. {% endif %}
  637.  
  638. {% elif can_extrude %}
  639. {% set do_resume = True %}
  640. {% else %}
  641. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  642. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  643. {% endif %}
  644. {% if runout_resume %}
  645. {% if do_resume %}
  646. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  647. {client.user_resume_macro|default("")}
  648. _CLIENT_EXTRUDE
  649. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  650. {% endif %}
  651. {% else %}
  652. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  653. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  654. {% endif %}
  655.  
  656. {% if not (runout_resume and do_resume) %}
  657. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  658. {% for element in prompt_txt %}
  659. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  660. {% endfor %}
  661. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  662. RESPOND TYPE=command MSG="action:prompt_show"
  663. {% endif %}
  664.  
  665. [gcode_macro SET_PAUSE_NEXT_LAYER]
  666. description = Enable a pause if the next layer is reached
  667. gcode =
  668. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  669. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  670. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  671. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  672.  
  673. [gcode_macro SET_PAUSE_AT_LAYER]
  674. description = Enable/disable a pause if a given layer number is reached
  675. gcode =
  676. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  677. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  678. else params.LAYER is defined %}
  679. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  680. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  681. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  682.  
  683. [gcode_macro SET_PRINT_STATS_INFO]
  684. rename_existing = SET_PRINT_STATS_INFO_BASE
  685. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  686. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  687. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  688. gcode =
  689. {% if pause_next_layer.enable %}
  690. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  691. {pause_next_layer.call}
  692. SET_PAUSE_NEXT_LAYER ENABLE=0
  693. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  694. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  695. {pause_at_layer.call}
  696. SET_PAUSE_AT_LAYER ENABLE=0
  697. {% endif %}
  698. SET_PRINT_STATS_INFO_BASE {rawparams}
  699.  
  700. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  701. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  702. gcode =
  703.  
  704. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  705. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  706. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  707. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  708. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  709. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  710. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  711. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  712.  
  713. {% set origin = printer.gcode_move.homing_origin %}
  714. {% set act = printer.gcode_move.gcode_position %}
  715. {% set max = printer.toolhead.axis_maximum %}
  716. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  717. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  718. else False %}
  719.  
  720. {% set z_min = params.Z_MIN|default(0)|float %}
  721. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  722. {% set x_park = params.X if params.X is defined
  723. else custom_park_x if use_custom
  724. else 0.0 if round_bed
  725. else (max.x - 5.0) %}
  726. {% set y_park = params.Y if params.Y is defined
  727. else custom_park_y if use_custom
  728. else (max.y - 5.0) if round_bed and z_park < cone
  729. else 0.0 if round_bed
  730. else (max.y - 5.0) %}
  731.  
  732. _CLIENT_RETRACT
  733. {% if "xyz" in printer.toolhead.homed_axes %}
  734. G90
  735. G1 Z{z_park} F{sp_hop}
  736. G1 X{x_park} Y{y_park} F{sp_move}
  737. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  738. {% else %}
  739. RESPOND TYPE=echo MSG='Printer not homed'
  740. {% endif %}
  741.  
  742. [gcode_macro _CLIENT_EXTRUDE]
  743. description = Extrudes, if the extruder is hot enough
  744. gcode =
  745.  
  746. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  747. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  748. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  749. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  750. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  751.  
  752. {% if printer.toolhead.extruder != '' %}
  753. {% if printer[printer.toolhead.extruder].can_extrude %}
  754. {% if use_fw_retract %}
  755. {% if length < 0 %}
  756. G10
  757. {% else %}
  758. G11
  759. {% endif %}
  760. {% else %}
  761. M83
  762. G1 E{length} F{(speed|float|abs) * 60}
  763. {% if absolute_extrude %}
  764. M82
  765. {% endif %}
  766. {% endif %}
  767. {% else %}
  768. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  769. {% endif %}
  770. {% endif %}
  771.  
  772. [gcode_macro _CLIENT_RETRACT]
  773. description = Retracts, if the extruder is hot enough
  774. gcode =
  775. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  776. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  777. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  778.  
  779. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  780.  
  781. [gcode_macro _CLIENT_LINEAR_MOVE]
  782. description = Linear move with save and restore of the gcode state
  783. gcode =
  784. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  785. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  786. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  787. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  788. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  789. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  790. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  791. SAVE_GCODE_STATE NAME=_client_movement
  792. {% if x_move or y_move or z_move %}
  793. G9{ 0 if ABSOLUTE else 1 }
  794. {% endif %}
  795. {% if e_move %}
  796. M8{ 2 if ABSOLUTE_E else 3 }
  797. {% endif %}
  798. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  799. RESTORE_GCODE_STATE NAME=_client_movement
  800.  
  801. [stepper_x]
  802. step_pin = PD7
  803. dir_pin = !PC5
  804. enable_pin = !PD6
  805. microsteps = 16
  806. rotation_distance = 40
  807. endstop_pin = ^PC2
  808. position_endstop = 0
  809. position_max = 235
  810. homing_speed = 25
  811.  
  812. [stepper_y]
  813. step_pin = PC6
  814. dir_pin = !PC7
  815. enable_pin = !PD6
  816. microsteps = 16
  817. rotation_distance = 40
  818. endstop_pin = ^PC3
  819. position_endstop = 0
  820. position_max = 235
  821. homing_speed = 25
  822.  
  823. [stepper_z]
  824. step_pin = PB3
  825. dir_pin = PB2
  826. enable_pin = !PA5
  827. microsteps = 16
  828. rotation_distance = 8
  829. endstop_pin = probe:z_virtual_endstop
  830. position_min = -5
  831. position_max = 240
  832.  
  833. [extruder]
  834. max_extrude_only_distance = 100.0
  835. step_pin = PB1
  836. dir_pin = !PB0
  837. enable_pin = !PD6
  838. microsteps = 16
  839. rotation_distance = 33.683
  840. nozzle_diameter = 0.400
  841. filament_diameter = 1.750
  842. heater_pin = PD5
  843. sensor_type = EPCOS 100K B57560G104F
  844. sensor_pin = PA7
  845. control = pid
  846. pid_kp = 29.211
  847. pid_ki = 10.819
  848. pid_kd = 19.717
  849. min_temp = 0
  850. max_temp = 300
  851.  
  852. [heater_bed]
  853. heater_pin = PD4
  854. sensor_type = EPCOS 100K B57560G104F
  855. sensor_pin = PA6
  856. control = pid
  857. pid_kp = 73.853
  858. pid_ki = 1.901
  859. pid_kd = 717.301
  860. min_temp = 0
  861. max_temp = 130
  862.  
  863. [fan]
  864. pin = PB4
  865.  
  866. [mcu]
  867. serial = /dev/ttyUSB0
  868. baud = 115200
  869.  
  870. [printer]
  871. kinematics = cartesian
  872. max_velocity = 500
  873. max_accel = 6000
  874. max_z_velocity = 5
  875. max_z_accel = 100
  876.  
  877. [bed_screws]
  878. screw1 = 30.5, 37
  879. screw2 = 30.5, 207
  880. screw3 = 204.5, 207
  881. screw4 = 204.5, 37
  882.  
  883. [display]
  884. lcd_type = st7920
  885. cs_pin = PA3
  886. sclk_pin = PA1
  887. sid_pin = PC1
  888. encoder_pins = ^PD2, ^PD3
  889. click_pin = ^!PC0
  890.  
  891. [bltouch]
  892. sensor_pin = ^PC4
  893. control_pin = PA4
  894. x_offset = -45
  895. z_offset = 2.540
  896. speed = 10
  897. samples = 3
  898. probe_with_touch_mode = False
  899. samples_tolerance = 0.1
  900. sample_retract_dist = 5.0
  901.  
  902. [safe_z_home]
  903. home_xy_position = 117, 117
  904. speed = 25
  905. z_hop = 5
  906. z_hop_speed = 10
  907.  
  908. [bed_mesh]
  909. speed = 25
  910. horizontal_move_z = 5
  911. mesh_min = 47,56
  912. mesh_max = 190,210
  913. probe_count = 5,5
  914. =======================
  915. Extruder max_extrude_ratio=0.266081
  916. mcu 'mcu': Starting serial connect
  917. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  918. webhooks client 548416658576: New connection
  919. webhooks client 548416658576: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  920. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  921. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  922. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  923. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  924. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  925. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  926. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  927. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  928. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  929. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  930. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  931. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  932. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  933. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  934. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  935. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  936. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  937. MCU error during connect
  938. Traceback (most recent call last):
  939. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  940. self._serial.connect_uart(self._serialport, self._baud, rts)
  941. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  942. self._error("Unable to connect")
  943. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  944. raise error(self.warn_prefix + (msg % params))
  945. serialhdl.error: mcu 'mcu': Unable to connect
  946.  
  947. During handling of the above exception, another exception occurred:
  948.  
  949. Traceback (most recent call last):
  950. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  951. self.send_event("klippy:mcu_identify")
  952. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  953. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  954. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  955. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  956. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  957. ^^^^^^^^^^^
  958. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  959. self._attach()
  960. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  961. raise error(str(e))
  962. mcu.error: mcu 'mcu': Unable to connect
  963. mcu 'mcu': Unable to connect
  964. Once the underlying issue is corrected, use the
  965. "FIRMWARE_RESTART" command to reset the firmware, reload the
  966. config, and restart the host software.
  967. Error configuring printer
  968.  
  969. No build file /home/pi/klipper/klippy/../.config
  970. No build file /home/pi/klipper/klippy/../out/klipper.dict
  971. No build file /home/pi/klipper/klippy/../out/klipper.elf
  972. Attempting MCU 'mcu' reset
  973. Unhandled exception during post run
  974. Traceback (most recent call last):
  975. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 265, in open
  976. self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
  977. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  978. FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  979.  
  980. During handling of the above exception, another exception occurred:
  981.  
  982. Traceback (most recent call last):
  983. File "/home/pi/klipper/klippy/klippy.py", line 194, in run
  984. self.send_event("klippy:firmware_restart")
  985. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  986. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  987. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  988. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  989. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  990. ^^^^^^^^^^^
  991. File "/home/pi/klipper/klippy/mcu.py", line 672, in _firmware_restart
  992. self._restart_arduino()
  993. File "/home/pi/klipper/klippy/mcu.py", line 632, in _restart_arduino
  994. serialhdl.arduino_reset(serialport, self._reactor)
  995. File "/home/pi/klipper/klippy/serialhdl.py", line 392, in arduino_reset
  996. ser = serial.Serial(serialport, 2400, timeout=0, exclusive=True)
  997. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  998. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialutil.py", line 240, in __init__
  999. self.open()
  1000. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 268, in open
  1001. raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
  1002. serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1003. Restarting printer
  1004. Start printer at Tue Nov 18 19:30:26 2025 (1763494226.1 1489.5)
  1005. ===== Config file =====
  1006. [virtual_sdcard]
  1007. path = /home/klipper/printer_data/gcodes/
  1008. on_error_gcode = CANCEL_PRINT
  1009.  
  1010. [pause_resume]
  1011.  
  1012. [display_status]
  1013.  
  1014. [respond]
  1015.  
  1016. [gcode_macro CANCEL_PRINT]
  1017. description = Cancel the actual running print
  1018. rename_existing = CANCEL_PRINT_BASE
  1019. gcode =
  1020.  
  1021. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1022. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  1023. {% set retract = client.cancel_retract|default(5.0)|abs %}
  1024.  
  1025. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  1026. else "X=" ~ client.park_at_cancel_x %}
  1027. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  1028. else "Y=" ~ client.park_at_cancel_y %}
  1029. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  1030.  
  1031.  
  1032. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  1033. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  1034. {% endif %}
  1035. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  1036. _CLIENT_RETRACT LENGTH={retract}
  1037. TURN_OFF_HEATERS
  1038. M106 S0
  1039. {client.user_cancel_macro|default("")}
  1040. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  1041.  
  1042. SET_PAUSE_NEXT_LAYER ENABLE=0
  1043. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  1044. CANCEL_PRINT_BASE
  1045.  
  1046. [gcode_macro PAUSE]
  1047. description = Pause the actual running print
  1048. rename_existing = PAUSE_BASE
  1049. gcode =
  1050.  
  1051. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1052. {% set idle_timeout = client.idle_timeout|default(0) %}
  1053. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  1054. {% set restore = False if printer.toolhead.extruder == ''
  1055. else True if params.RESTORE|default(1)|int == 1 else False %}
  1056.  
  1057. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  1058.  
  1059. {% if idle_timeout > 0 %}
  1060. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  1061. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  1062. {% endif %}
  1063. PAUSE_BASE
  1064. {client.user_pause_macro|default("")}
  1065. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  1066.  
  1067. [gcode_macro RESUME]
  1068. description = Resume the actual running print
  1069. rename_existing = RESUME_BASE
  1070. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  1071. variable_restore_idle_timeout = 0
  1072. variable_idle_state = False
  1073. gcode =
  1074.  
  1075. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1076. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  1077. {% set sp_move = client.speed_move|default(velocity) %}
  1078. {% set runout_resume = True if client.runout_sensor|default("") == ""
  1079. else True if not printer[client.runout_sensor].enabled
  1080. else printer[client.runout_sensor].filament_detected %}
  1081. {% set can_extrude = True if printer.toolhead.extruder == ''
  1082. else printer[printer.toolhead.extruder].can_extrude %}
  1083. {% set do_resume = False %}
  1084. {% set prompt_txt = [] %}
  1085.  
  1086.  
  1087. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  1088. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  1089. {% if last_extruder_temp.restore %}
  1090.  
  1091. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  1092. M109 S{last_extruder_temp.temp}
  1093. {% set do_resume = True %}
  1094. {% elif can_extrude %}
  1095. {% set do_resume = True %}
  1096. {% else %}
  1097. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  1098. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  1099. {% endif %}
  1100.  
  1101. {% elif can_extrude %}
  1102. {% set do_resume = True %}
  1103. {% else %}
  1104. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  1105. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  1106. {% endif %}
  1107. {% if runout_resume %}
  1108. {% if do_resume %}
  1109. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  1110. {client.user_resume_macro|default("")}
  1111. _CLIENT_EXTRUDE
  1112. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  1113. {% endif %}
  1114. {% else %}
  1115. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  1116. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  1117. {% endif %}
  1118.  
  1119. {% if not (runout_resume and do_resume) %}
  1120. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  1121. {% for element in prompt_txt %}
  1122. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  1123. {% endfor %}
  1124. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  1125. RESPOND TYPE=command MSG="action:prompt_show"
  1126. {% endif %}
  1127.  
  1128. [gcode_macro SET_PAUSE_NEXT_LAYER]
  1129. description = Enable a pause if the next layer is reached
  1130. gcode =
  1131. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  1132. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  1133. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  1134. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  1135.  
  1136. [gcode_macro SET_PAUSE_AT_LAYER]
  1137. description = Enable/disable a pause if a given layer number is reached
  1138. gcode =
  1139. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  1140. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  1141. else params.LAYER is defined %}
  1142. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  1143. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  1144. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  1145.  
  1146. [gcode_macro SET_PRINT_STATS_INFO]
  1147. rename_existing = SET_PRINT_STATS_INFO_BASE
  1148. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  1149. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  1150. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  1151. gcode =
  1152. {% if pause_next_layer.enable %}
  1153. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  1154. {pause_next_layer.call}
  1155. SET_PAUSE_NEXT_LAYER ENABLE=0
  1156. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  1157. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  1158. {pause_at_layer.call}
  1159. SET_PAUSE_AT_LAYER ENABLE=0
  1160. {% endif %}
  1161. SET_PRINT_STATS_INFO_BASE {rawparams}
  1162.  
  1163. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  1164. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  1165. gcode =
  1166.  
  1167. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1168. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  1169. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  1170. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  1171. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  1172. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  1173. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  1174. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  1175.  
  1176. {% set origin = printer.gcode_move.homing_origin %}
  1177. {% set act = printer.gcode_move.gcode_position %}
  1178. {% set max = printer.toolhead.axis_maximum %}
  1179. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  1180. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  1181. else False %}
  1182.  
  1183. {% set z_min = params.Z_MIN|default(0)|float %}
  1184. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  1185. {% set x_park = params.X if params.X is defined
  1186. else custom_park_x if use_custom
  1187. else 0.0 if round_bed
  1188. else (max.x - 5.0) %}
  1189. {% set y_park = params.Y if params.Y is defined
  1190. else custom_park_y if use_custom
  1191. else (max.y - 5.0) if round_bed and z_park < cone
  1192. else 0.0 if round_bed
  1193. else (max.y - 5.0) %}
  1194.  
  1195. _CLIENT_RETRACT
  1196. {% if "xyz" in printer.toolhead.homed_axes %}
  1197. G90
  1198. G1 Z{z_park} F{sp_hop}
  1199. G1 X{x_park} Y{y_park} F{sp_move}
  1200. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  1201. {% else %}
  1202. RESPOND TYPE=echo MSG='Printer not homed'
  1203. {% endif %}
  1204.  
  1205. [gcode_macro _CLIENT_EXTRUDE]
  1206. description = Extrudes, if the extruder is hot enough
  1207. gcode =
  1208.  
  1209. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1210. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  1211. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  1212. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  1213. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  1214.  
  1215. {% if printer.toolhead.extruder != '' %}
  1216. {% if printer[printer.toolhead.extruder].can_extrude %}
  1217. {% if use_fw_retract %}
  1218. {% if length < 0 %}
  1219. G10
  1220. {% else %}
  1221. G11
  1222. {% endif %}
  1223. {% else %}
  1224. M83
  1225. G1 E{length} F{(speed|float|abs) * 60}
  1226. {% if absolute_extrude %}
  1227. M82
  1228. {% endif %}
  1229. {% endif %}
  1230. {% else %}
  1231. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  1232. {% endif %}
  1233. {% endif %}
  1234.  
  1235. [gcode_macro _CLIENT_RETRACT]
  1236. description = Retracts, if the extruder is hot enough
  1237. gcode =
  1238. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1239. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  1240. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  1241.  
  1242. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  1243.  
  1244. [gcode_macro _CLIENT_LINEAR_MOVE]
  1245. description = Linear move with save and restore of the gcode state
  1246. gcode =
  1247. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  1248. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  1249. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  1250. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  1251. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  1252. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  1253. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  1254. SAVE_GCODE_STATE NAME=_client_movement
  1255. {% if x_move or y_move or z_move %}
  1256. G9{ 0 if ABSOLUTE else 1 }
  1257. {% endif %}
  1258. {% if e_move %}
  1259. M8{ 2 if ABSOLUTE_E else 3 }
  1260. {% endif %}
  1261. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  1262. RESTORE_GCODE_STATE NAME=_client_movement
  1263.  
  1264. [stepper_x]
  1265. step_pin = PD7
  1266. dir_pin = !PC5
  1267. enable_pin = !PD6
  1268. microsteps = 16
  1269. rotation_distance = 40
  1270. endstop_pin = ^PC2
  1271. position_endstop = 0
  1272. position_max = 235
  1273. homing_speed = 25
  1274.  
  1275. [stepper_y]
  1276. step_pin = PC6
  1277. dir_pin = !PC7
  1278. enable_pin = !PD6
  1279. microsteps = 16
  1280. rotation_distance = 40
  1281. endstop_pin = ^PC3
  1282. position_endstop = 0
  1283. position_max = 235
  1284. homing_speed = 25
  1285.  
  1286. [stepper_z]
  1287. step_pin = PB3
  1288. dir_pin = PB2
  1289. enable_pin = !PA5
  1290. microsteps = 16
  1291. rotation_distance = 8
  1292. endstop_pin = probe:z_virtual_endstop
  1293. position_min = -5
  1294. position_max = 240
  1295.  
  1296. [extruder]
  1297. max_extrude_only_distance = 100.0
  1298. step_pin = PB1
  1299. dir_pin = !PB0
  1300. enable_pin = !PD6
  1301. microsteps = 16
  1302. rotation_distance = 33.683
  1303. nozzle_diameter = 0.400
  1304. filament_diameter = 1.750
  1305. heater_pin = PD5
  1306. sensor_type = EPCOS 100K B57560G104F
  1307. sensor_pin = PA7
  1308. control = pid
  1309. pid_kp = 29.211
  1310. pid_ki = 10.819
  1311. pid_kd = 19.717
  1312. min_temp = 0
  1313. max_temp = 300
  1314.  
  1315. [heater_bed]
  1316. heater_pin = PD4
  1317. sensor_type = EPCOS 100K B57560G104F
  1318. sensor_pin = PA6
  1319. control = pid
  1320. pid_kp = 73.853
  1321. pid_ki = 1.901
  1322. pid_kd = 717.301
  1323. min_temp = 0
  1324. max_temp = 130
  1325.  
  1326. [fan]
  1327. pin = PB4
  1328.  
  1329. [mcu]
  1330. serial = /dev/ttyUSB0
  1331. baud = 115200
  1332.  
  1333. [printer]
  1334. kinematics = cartesian
  1335. max_velocity = 500
  1336. max_accel = 6000
  1337. max_z_velocity = 5
  1338. max_z_accel = 100
  1339.  
  1340. [bed_screws]
  1341. screw1 = 30.5, 37
  1342. screw2 = 30.5, 207
  1343. screw3 = 204.5, 207
  1344. screw4 = 204.5, 37
  1345.  
  1346. [display]
  1347. lcd_type = st7920
  1348. cs_pin = PA3
  1349. sclk_pin = PA1
  1350. sid_pin = PC1
  1351. encoder_pins = ^PD2, ^PD3
  1352. click_pin = ^!PC0
  1353.  
  1354. [bltouch]
  1355. sensor_pin = ^PC4
  1356. control_pin = PA4
  1357. x_offset = -45
  1358. z_offset = 2.540
  1359. speed = 10
  1360. samples = 3
  1361. probe_with_touch_mode = False
  1362. samples_tolerance = 0.1
  1363. sample_retract_dist = 5.0
  1364.  
  1365. [safe_z_home]
  1366. home_xy_position = 117, 117
  1367. speed = 25
  1368. z_hop = 5
  1369. z_hop_speed = 10
  1370.  
  1371. [bed_mesh]
  1372. speed = 25
  1373. horizontal_move_z = 5
  1374. mesh_min = 47,56
  1375. mesh_max = 190,210
  1376. probe_count = 5,5
  1377. =======================
  1378. Extruder max_extrude_ratio=0.266081
  1379. mcu 'mcu': Starting serial connect
  1380. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1381. webhooks client 548414719568: New connection
  1382. webhooks client 548414719568: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  1383. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1384. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1385. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1386. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1387. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1388. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1389. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1390. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1391. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1392. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1393. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1394. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1395. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1396. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1397. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1398. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1399. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1400. MCU error during connect
  1401. Traceback (most recent call last):
  1402. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  1403. self._serial.connect_uart(self._serialport, self._baud, rts)
  1404. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  1405. self._error("Unable to connect")
  1406. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  1407. raise error(self.warn_prefix + (msg % params))
  1408. serialhdl.error: mcu 'mcu': Unable to connect
  1409.  
  1410. During handling of the above exception, another exception occurred:
  1411.  
  1412. Traceback (most recent call last):
  1413. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  1414. self.send_event("klippy:mcu_identify")
  1415. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  1416. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  1417. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1418. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  1419. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  1420. ^^^^^^^^^^^
  1421. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  1422. self._attach()
  1423. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  1424. raise error(str(e))
  1425. mcu.error: mcu 'mcu': Unable to connect
  1426. mcu 'mcu': Unable to connect
  1427. Once the underlying issue is corrected, use the
  1428. "FIRMWARE_RESTART" command to reset the firmware, reload the
  1429. config, and restart the host software.
  1430. Error configuring printer
  1431.  
  1432. No build file /home/pi/klipper/klippy/../.config
  1433. No build file /home/pi/klipper/klippy/../out/klipper.dict
  1434. No build file /home/pi/klipper/klippy/../out/klipper.elf
  1435. webhooks client 548414719568: Disconnected
  1436. Starting Klippy...
  1437. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  1438. Git version: 'v0.13.0-403-gb4c7cf4a3'
  1439. Branch: master
  1440. Remote: origin
  1441. Tracked URL: https://github.com/Klipper3d/klipper.git
  1442. CPU: 4 core ?
  1443. Device: Raspberry Pi 3 Model B Rev 1.2
  1444. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  1445. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  1446. Start printer at Tue Nov 18 19:56:45 2025 (1763495805.9 20.9)
  1447. ===== Config file =====
  1448. [virtual_sdcard]
  1449. path = /home/klipper/printer_data/gcodes/
  1450. on_error_gcode = CANCEL_PRINT
  1451.  
  1452. [pause_resume]
  1453.  
  1454. [display_status]
  1455.  
  1456. [respond]
  1457.  
  1458. [gcode_macro CANCEL_PRINT]
  1459. description = Cancel the actual running print
  1460. rename_existing = CANCEL_PRINT_BASE
  1461. gcode =
  1462.  
  1463. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1464. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  1465. {% set retract = client.cancel_retract|default(5.0)|abs %}
  1466.  
  1467. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  1468. else "X=" ~ client.park_at_cancel_x %}
  1469. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  1470. else "Y=" ~ client.park_at_cancel_y %}
  1471. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  1472.  
  1473.  
  1474. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  1475. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  1476. {% endif %}
  1477. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  1478. _CLIENT_RETRACT LENGTH={retract}
  1479. TURN_OFF_HEATERS
  1480. M106 S0
  1481. {client.user_cancel_macro|default("")}
  1482. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  1483.  
  1484. SET_PAUSE_NEXT_LAYER ENABLE=0
  1485. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  1486. CANCEL_PRINT_BASE
  1487.  
  1488. [gcode_macro PAUSE]
  1489. description = Pause the actual running print
  1490. rename_existing = PAUSE_BASE
  1491. gcode =
  1492.  
  1493. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1494. {% set idle_timeout = client.idle_timeout|default(0) %}
  1495. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  1496. {% set restore = False if printer.toolhead.extruder == ''
  1497. else True if params.RESTORE|default(1)|int == 1 else False %}
  1498.  
  1499. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  1500.  
  1501. {% if idle_timeout > 0 %}
  1502. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  1503. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  1504. {% endif %}
  1505. PAUSE_BASE
  1506. {client.user_pause_macro|default("")}
  1507. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  1508.  
  1509. [gcode_macro RESUME]
  1510. description = Resume the actual running print
  1511. rename_existing = RESUME_BASE
  1512. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  1513. variable_restore_idle_timeout = 0
  1514. variable_idle_state = False
  1515. gcode =
  1516.  
  1517. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1518. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  1519. {% set sp_move = client.speed_move|default(velocity) %}
  1520. {% set runout_resume = True if client.runout_sensor|default("") == ""
  1521. else True if not printer[client.runout_sensor].enabled
  1522. else printer[client.runout_sensor].filament_detected %}
  1523. {% set can_extrude = True if printer.toolhead.extruder == ''
  1524. else printer[printer.toolhead.extruder].can_extrude %}
  1525. {% set do_resume = False %}
  1526. {% set prompt_txt = [] %}
  1527.  
  1528.  
  1529. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  1530. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  1531. {% if last_extruder_temp.restore %}
  1532.  
  1533. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  1534. M109 S{last_extruder_temp.temp}
  1535. {% set do_resume = True %}
  1536. {% elif can_extrude %}
  1537. {% set do_resume = True %}
  1538. {% else %}
  1539. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  1540. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  1541. {% endif %}
  1542.  
  1543. {% elif can_extrude %}
  1544. {% set do_resume = True %}
  1545. {% else %}
  1546. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  1547. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  1548. {% endif %}
  1549. {% if runout_resume %}
  1550. {% if do_resume %}
  1551. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  1552. {client.user_resume_macro|default("")}
  1553. _CLIENT_EXTRUDE
  1554. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  1555. {% endif %}
  1556. {% else %}
  1557. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  1558. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  1559. {% endif %}
  1560.  
  1561. {% if not (runout_resume and do_resume) %}
  1562. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  1563. {% for element in prompt_txt %}
  1564. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  1565. {% endfor %}
  1566. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  1567. RESPOND TYPE=command MSG="action:prompt_show"
  1568. {% endif %}
  1569.  
  1570. [gcode_macro SET_PAUSE_NEXT_LAYER]
  1571. description = Enable a pause if the next layer is reached
  1572. gcode =
  1573. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  1574. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  1575. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  1576. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  1577.  
  1578. [gcode_macro SET_PAUSE_AT_LAYER]
  1579. description = Enable/disable a pause if a given layer number is reached
  1580. gcode =
  1581. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  1582. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  1583. else params.LAYER is defined %}
  1584. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  1585. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  1586. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  1587.  
  1588. [gcode_macro SET_PRINT_STATS_INFO]
  1589. rename_existing = SET_PRINT_STATS_INFO_BASE
  1590. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  1591. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  1592. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  1593. gcode =
  1594. {% if pause_next_layer.enable %}
  1595. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  1596. {pause_next_layer.call}
  1597. SET_PAUSE_NEXT_LAYER ENABLE=0
  1598. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  1599. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  1600. {pause_at_layer.call}
  1601. SET_PAUSE_AT_LAYER ENABLE=0
  1602. {% endif %}
  1603. SET_PRINT_STATS_INFO_BASE {rawparams}
  1604.  
  1605. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  1606. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  1607. gcode =
  1608.  
  1609. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1610. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  1611. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  1612. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  1613. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  1614. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  1615. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  1616. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  1617.  
  1618. {% set origin = printer.gcode_move.homing_origin %}
  1619. {% set act = printer.gcode_move.gcode_position %}
  1620. {% set max = printer.toolhead.axis_maximum %}
  1621. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  1622. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  1623. else False %}
  1624.  
  1625. {% set z_min = params.Z_MIN|default(0)|float %}
  1626. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  1627. {% set x_park = params.X if params.X is defined
  1628. else custom_park_x if use_custom
  1629. else 0.0 if round_bed
  1630. else (max.x - 5.0) %}
  1631. {% set y_park = params.Y if params.Y is defined
  1632. else custom_park_y if use_custom
  1633. else (max.y - 5.0) if round_bed and z_park < cone
  1634. else 0.0 if round_bed
  1635. else (max.y - 5.0) %}
  1636.  
  1637. _CLIENT_RETRACT
  1638. {% if "xyz" in printer.toolhead.homed_axes %}
  1639. G90
  1640. G1 Z{z_park} F{sp_hop}
  1641. G1 X{x_park} Y{y_park} F{sp_move}
  1642. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  1643. {% else %}
  1644. RESPOND TYPE=echo MSG='Printer not homed'
  1645. {% endif %}
  1646.  
  1647. [gcode_macro _CLIENT_EXTRUDE]
  1648. description = Extrudes, if the extruder is hot enough
  1649. gcode =
  1650.  
  1651. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1652. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  1653. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  1654. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  1655. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  1656.  
  1657. {% if printer.toolhead.extruder != '' %}
  1658. {% if printer[printer.toolhead.extruder].can_extrude %}
  1659. {% if use_fw_retract %}
  1660. {% if length < 0 %}
  1661. G10
  1662. {% else %}
  1663. G11
  1664. {% endif %}
  1665. {% else %}
  1666. M83
  1667. G1 E{length} F{(speed|float|abs) * 60}
  1668. {% if absolute_extrude %}
  1669. M82
  1670. {% endif %}
  1671. {% endif %}
  1672. {% else %}
  1673. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  1674. {% endif %}
  1675. {% endif %}
  1676.  
  1677. [gcode_macro _CLIENT_RETRACT]
  1678. description = Retracts, if the extruder is hot enough
  1679. gcode =
  1680. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1681. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  1682. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  1683.  
  1684. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  1685.  
  1686. [gcode_macro _CLIENT_LINEAR_MOVE]
  1687. description = Linear move with save and restore of the gcode state
  1688. gcode =
  1689. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  1690. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  1691. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  1692. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  1693. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  1694. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  1695. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  1696. SAVE_GCODE_STATE NAME=_client_movement
  1697. {% if x_move or y_move or z_move %}
  1698. G9{ 0 if ABSOLUTE else 1 }
  1699. {% endif %}
  1700. {% if e_move %}
  1701. M8{ 2 if ABSOLUTE_E else 3 }
  1702. {% endif %}
  1703. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  1704. RESTORE_GCODE_STATE NAME=_client_movement
  1705.  
  1706. [stepper_x]
  1707. step_pin = PD7
  1708. dir_pin = !PC5
  1709. enable_pin = !PD6
  1710. microsteps = 16
  1711. rotation_distance = 40
  1712. endstop_pin = ^PC2
  1713. position_endstop = 0
  1714. position_max = 235
  1715. homing_speed = 25
  1716.  
  1717. [stepper_y]
  1718. step_pin = PC6
  1719. dir_pin = !PC7
  1720. enable_pin = !PD6
  1721. microsteps = 16
  1722. rotation_distance = 40
  1723. endstop_pin = ^PC3
  1724. position_endstop = 0
  1725. position_max = 235
  1726. homing_speed = 25
  1727.  
  1728. [stepper_z]
  1729. step_pin = PB3
  1730. dir_pin = PB2
  1731. enable_pin = !PA5
  1732. microsteps = 16
  1733. rotation_distance = 8
  1734. endstop_pin = probe:z_virtual_endstop
  1735. position_min = -5
  1736. position_max = 240
  1737.  
  1738. [extruder]
  1739. max_extrude_only_distance = 100.0
  1740. step_pin = PB1
  1741. dir_pin = !PB0
  1742. enable_pin = !PD6
  1743. microsteps = 16
  1744. rotation_distance = 33.683
  1745. nozzle_diameter = 0.400
  1746. filament_diameter = 1.750
  1747. heater_pin = PD5
  1748. sensor_type = EPCOS 100K B57560G104F
  1749. sensor_pin = PA7
  1750. control = pid
  1751. pid_kp = 29.211
  1752. pid_ki = 10.819
  1753. pid_kd = 19.717
  1754. min_temp = 0
  1755. max_temp = 300
  1756.  
  1757. [heater_bed]
  1758. heater_pin = PD4
  1759. sensor_type = EPCOS 100K B57560G104F
  1760. sensor_pin = PA6
  1761. control = pid
  1762. pid_kp = 73.853
  1763. pid_ki = 1.901
  1764. pid_kd = 717.301
  1765. min_temp = 0
  1766. max_temp = 130
  1767.  
  1768. [fan]
  1769. pin = PB4
  1770.  
  1771. [mcu]
  1772. serial = /dev/ttyUSB0
  1773. baud = 115200
  1774.  
  1775. [printer]
  1776. kinematics = cartesian
  1777. max_velocity = 500
  1778. max_accel = 6000
  1779. max_z_velocity = 5
  1780. max_z_accel = 100
  1781.  
  1782. [bed_screws]
  1783. screw1 = 30.5, 37
  1784. screw2 = 30.5, 207
  1785. screw3 = 204.5, 207
  1786. screw4 = 204.5, 37
  1787.  
  1788. [display]
  1789. lcd_type = st7920
  1790. cs_pin = PA3
  1791. sclk_pin = PA1
  1792. sid_pin = PC1
  1793. encoder_pins = ^PD2, ^PD3
  1794. click_pin = ^!PC0
  1795.  
  1796. [bltouch]
  1797. sensor_pin = ^PC4
  1798. control_pin = PA4
  1799. x_offset = -45
  1800. z_offset = 2.540
  1801. speed = 10
  1802. samples = 3
  1803. probe_with_touch_mode = False
  1804. samples_tolerance = 0.1
  1805. sample_retract_dist = 5.0
  1806.  
  1807. [safe_z_home]
  1808. home_xy_position = 117, 117
  1809. speed = 25
  1810. z_hop = 5
  1811. z_hop_speed = 10
  1812.  
  1813. [bed_mesh]
  1814. speed = 25
  1815. horizontal_move_z = 5
  1816. mesh_min = 47,56
  1817. mesh_max = 190,210
  1818. probe_count = 5,5
  1819. =======================
  1820. Extruder max_extrude_ratio=0.266081
  1821. mcu 'mcu': Starting serial connect
  1822. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1823. webhooks client 548024465360: New connection
  1824. webhooks client 548024465360: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  1825. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1826. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1827. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1828. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1829. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1830. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1831. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1832. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1833. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1834. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1835. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1836. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1837. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1838. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1839. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1840. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1841. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  1842. MCU error during connect
  1843. Traceback (most recent call last):
  1844. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  1845. self._serial.connect_uart(self._serialport, self._baud, rts)
  1846. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  1847. self._error("Unable to connect")
  1848. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  1849. raise error(self.warn_prefix + (msg % params))
  1850. serialhdl.error: mcu 'mcu': Unable to connect
  1851.  
  1852. During handling of the above exception, another exception occurred:
  1853.  
  1854. Traceback (most recent call last):
  1855. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  1856. self.send_event("klippy:mcu_identify")
  1857. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  1858. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  1859. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  1860. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  1861. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  1862. ^^^^^^^^^^^
  1863. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  1864. self._attach()
  1865. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  1866. raise error(str(e))
  1867. mcu.error: mcu 'mcu': Unable to connect
  1868. mcu 'mcu': Unable to connect
  1869. Once the underlying issue is corrected, use the
  1870. "FIRMWARE_RESTART" command to reset the firmware, reload the
  1871. config, and restart the host software.
  1872. Error configuring printer
  1873.  
  1874. Build file /home/pi/klipper/klippy/../.config(1858): Tue Nov 18 19:44:05 2025
  1875. ========= Last MCU build config =========
  1876. # CONFIG_LOW_LEVEL_OPTIONS is not set
  1877. CONFIG_MACH_AVR=y
  1878. # CONFIG_MACH_ATSAM is not set
  1879. # CONFIG_MACH_ATSAMD is not set
  1880. # CONFIG_MACH_LPC176X is not set
  1881. # CONFIG_MACH_STM32 is not set
  1882. # CONFIG_MACH_HC32F460 is not set
  1883. # CONFIG_MACH_RPXXXX is not set
  1884. # CONFIG_MACH_PRU is not set
  1885. # CONFIG_MACH_AR100 is not set
  1886. # CONFIG_MACH_LINUX is not set
  1887. # CONFIG_MACH_SIMU is not set
  1888. CONFIG_AVR_SELECT=y
  1889. CONFIG_BOARD_DIRECTORY="avr"
  1890. CONFIG_MACH_atmega2560=y
  1891. # CONFIG_MACH_atmega1280 is not set
  1892. # CONFIG_MACH_at90usb1286 is not set
  1893. # CONFIG_MACH_at90usb646 is not set
  1894. # CONFIG_MACH_atmega32u4 is not set
  1895. # CONFIG_MACH_atmega1284p is not set
  1896. # CONFIG_MACH_atmega644p is not set
  1897. # CONFIG_MACH_atmega328p is not set
  1898. # CONFIG_MACH_atmega328 is not set
  1899. # CONFIG_MACH_atmega168 is not set
  1900. CONFIG_MCU="atmega2560"
  1901. CONFIG_AVRDUDE_PROTOCOL="wiring"
  1902. CONFIG_CLOCK_FREQ=16000000
  1903. CONFIG_AVR_CLKPR=-1
  1904. CONFIG_AVR_STACK_SIZE=256
  1905. CONFIG_AVR_WATCHDOG=y
  1906. CONFIG_SERIAL=y
  1907. CONFIG_SERIAL_BAUD_U2X=y
  1908. CONFIG_SERIAL_PORT=0
  1909. CONFIG_SERIAL_BAUD=250000
  1910. CONFIG_USB_VENDOR_ID=0x1d50
  1911. CONFIG_USB_DEVICE_ID=0x614e
  1912. CONFIG_USB_SERIAL_NUMBER="12345"
  1913. CONFIG_WANT_ADC=y
  1914. CONFIG_WANT_SPI=y
  1915. CONFIG_WANT_SOFTWARE_SPI=y
  1916. CONFIG_WANT_I2C=y
  1917. CONFIG_WANT_SOFTWARE_I2C=y
  1918. CONFIG_WANT_HARD_PWM=y
  1919. CONFIG_WANT_BUTTONS=y
  1920. CONFIG_WANT_TMCUART=y
  1921. CONFIG_WANT_NEOPIXEL=y
  1922. CONFIG_WANT_PULSE_COUNTER=y
  1923. CONFIG_WANT_ST7920=y
  1924. CONFIG_WANT_HD44780=y
  1925. CONFIG_WANT_ADXL345=y
  1926. CONFIG_WANT_LIS2DW=y
  1927. CONFIG_WANT_MPU9250=y
  1928. CONFIG_WANT_ICM20948=y
  1929. CONFIG_WANT_THERMOCOUPLE=y
  1930. CONFIG_WANT_HX71X=y
  1931. CONFIG_WANT_ADS1220=y
  1932. CONFIG_WANT_LDC1612=y
  1933. CONFIG_WANT_SENSOR_ANGLE=y
  1934. CONFIG_NEED_SENSOR_BULK=y
  1935. CONFIG_WANT_LOAD_CELL_PROBE=y
  1936. CONFIG_NEED_SOS_FILTER=y
  1937. CONFIG_CANBUS_FREQUENCY=1000000
  1938. CONFIG_INLINE_STEPPER_HACK=y
  1939. CONFIG_HAVE_GPIO=y
  1940. CONFIG_HAVE_GPIO_ADC=y
  1941. CONFIG_HAVE_GPIO_SPI=y
  1942. CONFIG_HAVE_GPIO_I2C=y
  1943. CONFIG_HAVE_GPIO_HARD_PWM=y
  1944. CONFIG_HAVE_STRICT_TIMING=y
  1945. =======================
  1946. No build file /home/pi/klipper/klippy/../out/klipper.dict
  1947. No build file /home/pi/klipper/klippy/../out/klipper.elf
  1948. Starting Klippy...
  1949. Args: ['/home/pi/klipper/klippy/klippy.py', '/home/pi/printer_data/config/printer.cfg', '-l', '/home/pi/printer_data/logs/klippy.log', '-I', '/home/pi/printer_data/comms/klippy.serial', '-a', '/home/pi/printer_data/comms/klippy.sock']
  1950. Git version: 'v0.13.0-403-gb4c7cf4a3'
  1951. Branch: master
  1952. Remote: origin
  1953. Tracked URL: https://github.com/Klipper3d/klipper.git
  1954. CPU: 4 core ?
  1955. Device: Raspberry Pi 3 Model B Rev 1.2
  1956. Linux: Linux version 6.12.47+rpt-rpi-v8 ([email protected]) (aarch64-linux-gnu-gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1~bookworm (2025-09-16)
  1957. Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
  1958. Start printer at Tue Nov 18 20:02:20 2025 (1763496140.9 355.9)
  1959. ===== Config file =====
  1960. [virtual_sdcard]
  1961. path = /home/klipper/printer_data/gcodes/
  1962. on_error_gcode = CANCEL_PRINT
  1963.  
  1964. [pause_resume]
  1965.  
  1966. [display_status]
  1967.  
  1968. [respond]
  1969.  
  1970. [gcode_macro CANCEL_PRINT]
  1971. description = Cancel the actual running print
  1972. rename_existing = CANCEL_PRINT_BASE
  1973. gcode =
  1974.  
  1975. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  1976. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  1977. {% set retract = client.cancel_retract|default(5.0)|abs %}
  1978.  
  1979. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  1980. else "X=" ~ client.park_at_cancel_x %}
  1981. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  1982. else "Y=" ~ client.park_at_cancel_y %}
  1983. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  1984.  
  1985.  
  1986. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  1987. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  1988. {% endif %}
  1989. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  1990. _CLIENT_RETRACT LENGTH={retract}
  1991. TURN_OFF_HEATERS
  1992. M106 S0
  1993. {client.user_cancel_macro|default("")}
  1994. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  1995.  
  1996. SET_PAUSE_NEXT_LAYER ENABLE=0
  1997. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  1998. CANCEL_PRINT_BASE
  1999.  
  2000. [gcode_macro PAUSE]
  2001. description = Pause the actual running print
  2002. rename_existing = PAUSE_BASE
  2003. gcode =
  2004.  
  2005. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2006. {% set idle_timeout = client.idle_timeout|default(0) %}
  2007. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  2008. {% set restore = False if printer.toolhead.extruder == ''
  2009. else True if params.RESTORE|default(1)|int == 1 else False %}
  2010.  
  2011. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  2012.  
  2013. {% if idle_timeout > 0 %}
  2014. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  2015. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  2016. {% endif %}
  2017. PAUSE_BASE
  2018. {client.user_pause_macro|default("")}
  2019. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  2020.  
  2021. [gcode_macro RESUME]
  2022. description = Resume the actual running print
  2023. rename_existing = RESUME_BASE
  2024. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  2025. variable_restore_idle_timeout = 0
  2026. variable_idle_state = False
  2027. gcode =
  2028.  
  2029. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2030. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  2031. {% set sp_move = client.speed_move|default(velocity) %}
  2032. {% set runout_resume = True if client.runout_sensor|default("") == ""
  2033. else True if not printer[client.runout_sensor].enabled
  2034. else printer[client.runout_sensor].filament_detected %}
  2035. {% set can_extrude = True if printer.toolhead.extruder == ''
  2036. else printer[printer.toolhead.extruder].can_extrude %}
  2037. {% set do_resume = False %}
  2038. {% set prompt_txt = [] %}
  2039.  
  2040.  
  2041. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  2042. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  2043. {% if last_extruder_temp.restore %}
  2044.  
  2045. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  2046. M109 S{last_extruder_temp.temp}
  2047. {% set do_resume = True %}
  2048. {% elif can_extrude %}
  2049. {% set do_resume = True %}
  2050. {% else %}
  2051. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  2052. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  2053. {% endif %}
  2054.  
  2055. {% elif can_extrude %}
  2056. {% set do_resume = True %}
  2057. {% else %}
  2058. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  2059. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  2060. {% endif %}
  2061. {% if runout_resume %}
  2062. {% if do_resume %}
  2063. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  2064. {client.user_resume_macro|default("")}
  2065. _CLIENT_EXTRUDE
  2066. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  2067. {% endif %}
  2068. {% else %}
  2069. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  2070. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  2071. {% endif %}
  2072.  
  2073. {% if not (runout_resume and do_resume) %}
  2074. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  2075. {% for element in prompt_txt %}
  2076. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  2077. {% endfor %}
  2078. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  2079. RESPOND TYPE=command MSG="action:prompt_show"
  2080. {% endif %}
  2081.  
  2082. [gcode_macro SET_PAUSE_NEXT_LAYER]
  2083. description = Enable a pause if the next layer is reached
  2084. gcode =
  2085. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  2086. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  2087. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  2088. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  2089.  
  2090. [gcode_macro SET_PAUSE_AT_LAYER]
  2091. description = Enable/disable a pause if a given layer number is reached
  2092. gcode =
  2093. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  2094. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  2095. else params.LAYER is defined %}
  2096. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  2097. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  2098. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  2099.  
  2100. [gcode_macro SET_PRINT_STATS_INFO]
  2101. rename_existing = SET_PRINT_STATS_INFO_BASE
  2102. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  2103. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  2104. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  2105. gcode =
  2106. {% if pause_next_layer.enable %}
  2107. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  2108. {pause_next_layer.call}
  2109. SET_PAUSE_NEXT_LAYER ENABLE=0
  2110. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  2111. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  2112. {pause_at_layer.call}
  2113. SET_PAUSE_AT_LAYER ENABLE=0
  2114. {% endif %}
  2115. SET_PRINT_STATS_INFO_BASE {rawparams}
  2116.  
  2117. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  2118. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  2119. gcode =
  2120.  
  2121. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2122. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  2123. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  2124. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  2125. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  2126. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  2127. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  2128. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  2129.  
  2130. {% set origin = printer.gcode_move.homing_origin %}
  2131. {% set act = printer.gcode_move.gcode_position %}
  2132. {% set max = printer.toolhead.axis_maximum %}
  2133. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  2134. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  2135. else False %}
  2136.  
  2137. {% set z_min = params.Z_MIN|default(0)|float %}
  2138. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  2139. {% set x_park = params.X if params.X is defined
  2140. else custom_park_x if use_custom
  2141. else 0.0 if round_bed
  2142. else (max.x - 5.0) %}
  2143. {% set y_park = params.Y if params.Y is defined
  2144. else custom_park_y if use_custom
  2145. else (max.y - 5.0) if round_bed and z_park < cone
  2146. else 0.0 if round_bed
  2147. else (max.y - 5.0) %}
  2148.  
  2149. _CLIENT_RETRACT
  2150. {% if "xyz" in printer.toolhead.homed_axes %}
  2151. G90
  2152. G1 Z{z_park} F{sp_hop}
  2153. G1 X{x_park} Y{y_park} F{sp_move}
  2154. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  2155. {% else %}
  2156. RESPOND TYPE=echo MSG='Printer not homed'
  2157. {% endif %}
  2158.  
  2159. [gcode_macro _CLIENT_EXTRUDE]
  2160. description = Extrudes, if the extruder is hot enough
  2161. gcode =
  2162.  
  2163. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2164. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  2165. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  2166. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  2167. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  2168.  
  2169. {% if printer.toolhead.extruder != '' %}
  2170. {% if printer[printer.toolhead.extruder].can_extrude %}
  2171. {% if use_fw_retract %}
  2172. {% if length < 0 %}
  2173. G10
  2174. {% else %}
  2175. G11
  2176. {% endif %}
  2177. {% else %}
  2178. M83
  2179. G1 E{length} F{(speed|float|abs) * 60}
  2180. {% if absolute_extrude %}
  2181. M82
  2182. {% endif %}
  2183. {% endif %}
  2184. {% else %}
  2185. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  2186. {% endif %}
  2187. {% endif %}
  2188.  
  2189. [gcode_macro _CLIENT_RETRACT]
  2190. description = Retracts, if the extruder is hot enough
  2191. gcode =
  2192. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2193. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  2194. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  2195.  
  2196. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  2197.  
  2198. [gcode_macro _CLIENT_LINEAR_MOVE]
  2199. description = Linear move with save and restore of the gcode state
  2200. gcode =
  2201. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  2202. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  2203. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  2204. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  2205. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  2206. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  2207. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  2208. SAVE_GCODE_STATE NAME=_client_movement
  2209. {% if x_move or y_move or z_move %}
  2210. G9{ 0 if ABSOLUTE else 1 }
  2211. {% endif %}
  2212. {% if e_move %}
  2213. M8{ 2 if ABSOLUTE_E else 3 }
  2214. {% endif %}
  2215. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  2216. RESTORE_GCODE_STATE NAME=_client_movement
  2217.  
  2218. [stepper_x]
  2219. step_pin = PD7
  2220. dir_pin = !PC5
  2221. enable_pin = !PD6
  2222. microsteps = 16
  2223. rotation_distance = 40
  2224. endstop_pin = ^PC2
  2225. position_endstop = 0
  2226. position_max = 235
  2227. homing_speed = 25
  2228.  
  2229. [stepper_y]
  2230. step_pin = PC6
  2231. dir_pin = !PC7
  2232. enable_pin = !PD6
  2233. microsteps = 16
  2234. rotation_distance = 40
  2235. endstop_pin = ^PC3
  2236. position_endstop = 0
  2237. position_max = 235
  2238. homing_speed = 25
  2239.  
  2240. [stepper_z]
  2241. step_pin = PB3
  2242. dir_pin = PB2
  2243. enable_pin = !PA5
  2244. microsteps = 16
  2245. rotation_distance = 8
  2246. endstop_pin = probe:z_virtual_endstop
  2247. position_min = -5
  2248. position_max = 240
  2249.  
  2250. [extruder]
  2251. max_extrude_only_distance = 100.0
  2252. step_pin = PB1
  2253. dir_pin = !PB0
  2254. enable_pin = !PD6
  2255. microsteps = 16
  2256. rotation_distance = 33.683
  2257. nozzle_diameter = 0.400
  2258. filament_diameter = 1.750
  2259. heater_pin = PD5
  2260. sensor_type = EPCOS 100K B57560G104F
  2261. sensor_pin = PA7
  2262. control = pid
  2263. pid_kp = 29.211
  2264. pid_ki = 10.819
  2265. pid_kd = 19.717
  2266. min_temp = 0
  2267. max_temp = 300
  2268.  
  2269. [heater_bed]
  2270. heater_pin = PD4
  2271. sensor_type = EPCOS 100K B57560G104F
  2272. sensor_pin = PA6
  2273. control = pid
  2274. pid_kp = 73.853
  2275. pid_ki = 1.901
  2276. pid_kd = 717.301
  2277. min_temp = 0
  2278. max_temp = 130
  2279.  
  2280. [fan]
  2281. pin = PB4
  2282.  
  2283. [mcu]
  2284. serial = /dev/ttyUSB0
  2285. baud = 115200
  2286.  
  2287. [printer]
  2288. kinematics = cartesian
  2289. max_velocity = 500
  2290. max_accel = 6000
  2291. max_z_velocity = 5
  2292. max_z_accel = 100
  2293.  
  2294. [bed_screws]
  2295. screw1 = 30.5, 37
  2296. screw2 = 30.5, 207
  2297. screw3 = 204.5, 207
  2298. screw4 = 204.5, 37
  2299.  
  2300. [display]
  2301. lcd_type = st7920
  2302. cs_pin = PA3
  2303. sclk_pin = PA1
  2304. sid_pin = PC1
  2305. encoder_pins = ^PD2, ^PD3
  2306. click_pin = ^!PC0
  2307.  
  2308. [bltouch]
  2309. sensor_pin = ^PC4
  2310. control_pin = PA4
  2311. x_offset = -45
  2312. z_offset = 2.540
  2313. speed = 10
  2314. samples = 3
  2315. probe_with_touch_mode = False
  2316. samples_tolerance = 0.1
  2317. sample_retract_dist = 5.0
  2318.  
  2319. [safe_z_home]
  2320. home_xy_position = 117, 117
  2321. speed = 25
  2322. z_hop = 5
  2323. z_hop_speed = 10
  2324.  
  2325. [bed_mesh]
  2326. speed = 25
  2327. horizontal_move_z = 5
  2328. mesh_min = 47,56
  2329. mesh_max = 190,210
  2330. probe_count = 5,5
  2331. =======================
  2332. Extruder max_extrude_ratio=0.266081
  2333. mcu 'mcu': Starting serial connect
  2334. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2335. webhooks client 548127052688: New connection
  2336. webhooks client 548127052688: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  2337. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2338. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2339. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2340. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2341. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2342. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2343. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2344. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2345. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2346. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2347. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2348. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2349. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2350. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2351. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2352. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2353. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2354. MCU error during connect
  2355. Traceback (most recent call last):
  2356. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  2357. self._serial.connect_uart(self._serialport, self._baud, rts)
  2358. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  2359. self._error("Unable to connect")
  2360. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  2361. raise error(self.warn_prefix + (msg % params))
  2362. serialhdl.error: mcu 'mcu': Unable to connect
  2363.  
  2364. During handling of the above exception, another exception occurred:
  2365.  
  2366. Traceback (most recent call last):
  2367. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  2368. self.send_event("klippy:mcu_identify")
  2369. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  2370. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2371. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2372. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  2373. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2374. ^^^^^^^^^^^
  2375. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  2376. self._attach()
  2377. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  2378. raise error(str(e))
  2379. mcu.error: mcu 'mcu': Unable to connect
  2380. mcu 'mcu': Unable to connect
  2381. Once the underlying issue is corrected, use the
  2382. "FIRMWARE_RESTART" command to reset the firmware, reload the
  2383. config, and restart the host software.
  2384. Error configuring printer
  2385.  
  2386. Build file /home/pi/klipper/klippy/../.config(1272): Tue Nov 18 20:00:58 2025
  2387. ========= Last MCU build config =========
  2388. # CONFIG_LOW_LEVEL_OPTIONS is not set
  2389. # CONFIG_MACH_AVR is not set
  2390. # CONFIG_MACH_ATSAM is not set
  2391. # CONFIG_MACH_ATSAMD is not set
  2392. # CONFIG_MACH_LPC176X is not set
  2393. # CONFIG_MACH_STM32 is not set
  2394. # CONFIG_MACH_HC32F460 is not set
  2395. # CONFIG_MACH_RPXXXX is not set
  2396. # CONFIG_MACH_PRU is not set
  2397. # CONFIG_MACH_AR100 is not set
  2398. CONFIG_MACH_LINUX=y
  2399. # CONFIG_MACH_SIMU is not set
  2400. CONFIG_BOARD_DIRECTORY="linux"
  2401. CONFIG_CLOCK_FREQ=50000000
  2402. CONFIG_LINUX_SELECT=y
  2403. CONFIG_USB_VENDOR_ID=0x1d50
  2404. CONFIG_USB_DEVICE_ID=0x614e
  2405. CONFIG_USB_SERIAL_NUMBER="12345"
  2406. CONFIG_WANT_ADC=y
  2407. CONFIG_WANT_SPI=y
  2408. CONFIG_WANT_SOFTWARE_SPI=y
  2409. CONFIG_WANT_I2C=y
  2410. CONFIG_WANT_SOFTWARE_I2C=y
  2411. CONFIG_WANT_HARD_PWM=y
  2412. CONFIG_WANT_BUTTONS=y
  2413. CONFIG_WANT_TMCUART=y
  2414. CONFIG_WANT_NEOPIXEL=y
  2415. CONFIG_WANT_PULSE_COUNTER=y
  2416. CONFIG_WANT_ST7920=y
  2417. CONFIG_WANT_HD44780=y
  2418. CONFIG_WANT_ADXL345=y
  2419. CONFIG_WANT_LIS2DW=y
  2420. CONFIG_WANT_MPU9250=y
  2421. CONFIG_WANT_ICM20948=y
  2422. CONFIG_WANT_THERMOCOUPLE=y
  2423. CONFIG_WANT_HX71X=y
  2424. CONFIG_WANT_ADS1220=y
  2425. CONFIG_WANT_LDC1612=y
  2426. CONFIG_WANT_SENSOR_ANGLE=y
  2427. CONFIG_NEED_SENSOR_BULK=y
  2428. CONFIG_WANT_LOAD_CELL_PROBE=y
  2429. CONFIG_NEED_SOS_FILTER=y
  2430. CONFIG_CANBUS_FREQUENCY=1000000
  2431. CONFIG_INLINE_STEPPER_HACK=y
  2432. CONFIG_HAVE_GPIO=y
  2433. CONFIG_HAVE_GPIO_ADC=y
  2434. CONFIG_HAVE_GPIO_SPI=y
  2435. CONFIG_HAVE_GPIO_I2C=y
  2436. CONFIG_HAVE_GPIO_HARD_PWM=y
  2437. =======================
  2438. Build file /home/pi/klipper/klippy/../out/klipper.dict(11210): Tue Nov 18 20:01:38 2025
  2439. Last MCU build version: v0.13.0-403-gb4c7cf4a3
  2440. Last MCU build tools: gcc: (Debian 12.2.0-14+deb12u1) 12.2.0 binutils: (GNU Binutils for Debian) 2.40
  2441. Last MCU build config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 STEPPER_STEP_BOTH_EDGE=1
  2442. Build file /home/pi/klipper/klippy/../out/klipper.elf(897288): Tue Nov 18 20:01:51 2025
  2443. Attempting MCU 'mcu' reset
  2444. Unhandled exception during post run
  2445. Traceback (most recent call last):
  2446. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 265, in open
  2447. self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
  2448. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2449. FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2450.  
  2451. During handling of the above exception, another exception occurred:
  2452.  
  2453. Traceback (most recent call last):
  2454. File "/home/pi/klipper/klippy/klippy.py", line 194, in run
  2455. self.send_event("klippy:firmware_restart")
  2456. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  2457. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2458. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2459. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  2460. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2461. ^^^^^^^^^^^
  2462. File "/home/pi/klipper/klippy/mcu.py", line 672, in _firmware_restart
  2463. self._restart_arduino()
  2464. File "/home/pi/klipper/klippy/mcu.py", line 632, in _restart_arduino
  2465. serialhdl.arduino_reset(serialport, self._reactor)
  2466. File "/home/pi/klipper/klippy/serialhdl.py", line 392, in arduino_reset
  2467. ser = serial.Serial(serialport, 2400, timeout=0, exclusive=True)
  2468. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2469. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialutil.py", line 240, in __init__
  2470. self.open()
  2471. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 268, in open
  2472. raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
  2473. serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2474. Restarting printer
  2475. Start printer at Tue Nov 18 20:05:20 2025 (1763496321.0 536.0)
  2476. ===== Config file =====
  2477. [virtual_sdcard]
  2478. path = /home/klipper/printer_data/gcodes/
  2479. on_error_gcode = CANCEL_PRINT
  2480.  
  2481. [pause_resume]
  2482.  
  2483. [display_status]
  2484.  
  2485. [respond]
  2486.  
  2487. [gcode_macro CANCEL_PRINT]
  2488. description = Cancel the actual running print
  2489. rename_existing = CANCEL_PRINT_BASE
  2490. gcode =
  2491.  
  2492. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2493. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  2494. {% set retract = client.cancel_retract|default(5.0)|abs %}
  2495.  
  2496. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  2497. else "X=" ~ client.park_at_cancel_x %}
  2498. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  2499. else "Y=" ~ client.park_at_cancel_y %}
  2500. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  2501.  
  2502.  
  2503. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  2504. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  2505. {% endif %}
  2506. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  2507. _CLIENT_RETRACT LENGTH={retract}
  2508. TURN_OFF_HEATERS
  2509. M106 S0
  2510. {client.user_cancel_macro|default("")}
  2511. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  2512.  
  2513. SET_PAUSE_NEXT_LAYER ENABLE=0
  2514. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  2515. CANCEL_PRINT_BASE
  2516.  
  2517. [gcode_macro PAUSE]
  2518. description = Pause the actual running print
  2519. rename_existing = PAUSE_BASE
  2520. gcode =
  2521.  
  2522. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2523. {% set idle_timeout = client.idle_timeout|default(0) %}
  2524. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  2525. {% set restore = False if printer.toolhead.extruder == ''
  2526. else True if params.RESTORE|default(1)|int == 1 else False %}
  2527.  
  2528. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  2529.  
  2530. {% if idle_timeout > 0 %}
  2531. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  2532. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  2533. {% endif %}
  2534. PAUSE_BASE
  2535. {client.user_pause_macro|default("")}
  2536. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  2537.  
  2538. [gcode_macro RESUME]
  2539. description = Resume the actual running print
  2540. rename_existing = RESUME_BASE
  2541. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  2542. variable_restore_idle_timeout = 0
  2543. variable_idle_state = False
  2544. gcode =
  2545.  
  2546. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2547. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  2548. {% set sp_move = client.speed_move|default(velocity) %}
  2549. {% set runout_resume = True if client.runout_sensor|default("") == ""
  2550. else True if not printer[client.runout_sensor].enabled
  2551. else printer[client.runout_sensor].filament_detected %}
  2552. {% set can_extrude = True if printer.toolhead.extruder == ''
  2553. else printer[printer.toolhead.extruder].can_extrude %}
  2554. {% set do_resume = False %}
  2555. {% set prompt_txt = [] %}
  2556.  
  2557.  
  2558. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  2559. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  2560. {% if last_extruder_temp.restore %}
  2561.  
  2562. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  2563. M109 S{last_extruder_temp.temp}
  2564. {% set do_resume = True %}
  2565. {% elif can_extrude %}
  2566. {% set do_resume = True %}
  2567. {% else %}
  2568. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  2569. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  2570. {% endif %}
  2571.  
  2572. {% elif can_extrude %}
  2573. {% set do_resume = True %}
  2574. {% else %}
  2575. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  2576. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  2577. {% endif %}
  2578. {% if runout_resume %}
  2579. {% if do_resume %}
  2580. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  2581. {client.user_resume_macro|default("")}
  2582. _CLIENT_EXTRUDE
  2583. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  2584. {% endif %}
  2585. {% else %}
  2586. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  2587. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  2588. {% endif %}
  2589.  
  2590. {% if not (runout_resume and do_resume) %}
  2591. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  2592. {% for element in prompt_txt %}
  2593. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  2594. {% endfor %}
  2595. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  2596. RESPOND TYPE=command MSG="action:prompt_show"
  2597. {% endif %}
  2598.  
  2599. [gcode_macro SET_PAUSE_NEXT_LAYER]
  2600. description = Enable a pause if the next layer is reached
  2601. gcode =
  2602. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  2603. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  2604. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  2605. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  2606.  
  2607. [gcode_macro SET_PAUSE_AT_LAYER]
  2608. description = Enable/disable a pause if a given layer number is reached
  2609. gcode =
  2610. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  2611. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  2612. else params.LAYER is defined %}
  2613. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  2614. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  2615. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  2616.  
  2617. [gcode_macro SET_PRINT_STATS_INFO]
  2618. rename_existing = SET_PRINT_STATS_INFO_BASE
  2619. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  2620. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  2621. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  2622. gcode =
  2623. {% if pause_next_layer.enable %}
  2624. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  2625. {pause_next_layer.call}
  2626. SET_PAUSE_NEXT_LAYER ENABLE=0
  2627. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  2628. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  2629. {pause_at_layer.call}
  2630. SET_PAUSE_AT_LAYER ENABLE=0
  2631. {% endif %}
  2632. SET_PRINT_STATS_INFO_BASE {rawparams}
  2633.  
  2634. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  2635. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  2636. gcode =
  2637.  
  2638. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2639. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  2640. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  2641. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  2642. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  2643. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  2644. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  2645. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  2646.  
  2647. {% set origin = printer.gcode_move.homing_origin %}
  2648. {% set act = printer.gcode_move.gcode_position %}
  2649. {% set max = printer.toolhead.axis_maximum %}
  2650. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  2651. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  2652. else False %}
  2653.  
  2654. {% set z_min = params.Z_MIN|default(0)|float %}
  2655. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  2656. {% set x_park = params.X if params.X is defined
  2657. else custom_park_x if use_custom
  2658. else 0.0 if round_bed
  2659. else (max.x - 5.0) %}
  2660. {% set y_park = params.Y if params.Y is defined
  2661. else custom_park_y if use_custom
  2662. else (max.y - 5.0) if round_bed and z_park < cone
  2663. else 0.0 if round_bed
  2664. else (max.y - 5.0) %}
  2665.  
  2666. _CLIENT_RETRACT
  2667. {% if "xyz" in printer.toolhead.homed_axes %}
  2668. G90
  2669. G1 Z{z_park} F{sp_hop}
  2670. G1 X{x_park} Y{y_park} F{sp_move}
  2671. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  2672. {% else %}
  2673. RESPOND TYPE=echo MSG='Printer not homed'
  2674. {% endif %}
  2675.  
  2676. [gcode_macro _CLIENT_EXTRUDE]
  2677. description = Extrudes, if the extruder is hot enough
  2678. gcode =
  2679.  
  2680. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2681. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  2682. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  2683. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  2684. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  2685.  
  2686. {% if printer.toolhead.extruder != '' %}
  2687. {% if printer[printer.toolhead.extruder].can_extrude %}
  2688. {% if use_fw_retract %}
  2689. {% if length < 0 %}
  2690. G10
  2691. {% else %}
  2692. G11
  2693. {% endif %}
  2694. {% else %}
  2695. M83
  2696. G1 E{length} F{(speed|float|abs) * 60}
  2697. {% if absolute_extrude %}
  2698. M82
  2699. {% endif %}
  2700. {% endif %}
  2701. {% else %}
  2702. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  2703. {% endif %}
  2704. {% endif %}
  2705.  
  2706. [gcode_macro _CLIENT_RETRACT]
  2707. description = Retracts, if the extruder is hot enough
  2708. gcode =
  2709. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  2710. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  2711. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  2712.  
  2713. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  2714.  
  2715. [gcode_macro _CLIENT_LINEAR_MOVE]
  2716. description = Linear move with save and restore of the gcode state
  2717. gcode =
  2718. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  2719. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  2720. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  2721. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  2722. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  2723. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  2724. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  2725. SAVE_GCODE_STATE NAME=_client_movement
  2726. {% if x_move or y_move or z_move %}
  2727. G9{ 0 if ABSOLUTE else 1 }
  2728. {% endif %}
  2729. {% if e_move %}
  2730. M8{ 2 if ABSOLUTE_E else 3 }
  2731. {% endif %}
  2732. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  2733. RESTORE_GCODE_STATE NAME=_client_movement
  2734.  
  2735. [stepper_x]
  2736. step_pin = PD7
  2737. dir_pin = !PC5
  2738. enable_pin = !PD6
  2739. microsteps = 16
  2740. rotation_distance = 40
  2741. endstop_pin = ^PC2
  2742. position_endstop = 0
  2743. position_max = 235
  2744. homing_speed = 25
  2745.  
  2746. [stepper_y]
  2747. step_pin = PC6
  2748. dir_pin = !PC7
  2749. enable_pin = !PD6
  2750. microsteps = 16
  2751. rotation_distance = 40
  2752. endstop_pin = ^PC3
  2753. position_endstop = 0
  2754. position_max = 235
  2755. homing_speed = 25
  2756.  
  2757. [stepper_z]
  2758. step_pin = PB3
  2759. dir_pin = PB2
  2760. enable_pin = !PA5
  2761. microsteps = 16
  2762. rotation_distance = 8
  2763. endstop_pin = probe:z_virtual_endstop
  2764. position_min = -5
  2765. position_max = 240
  2766.  
  2767. [extruder]
  2768. max_extrude_only_distance = 100.0
  2769. step_pin = PB1
  2770. dir_pin = !PB0
  2771. enable_pin = !PD6
  2772. microsteps = 16
  2773. rotation_distance = 33.683
  2774. nozzle_diameter = 0.400
  2775. filament_diameter = 1.750
  2776. heater_pin = PD5
  2777. sensor_type = EPCOS 100K B57560G104F
  2778. sensor_pin = PA7
  2779. control = pid
  2780. pid_kp = 29.211
  2781. pid_ki = 10.819
  2782. pid_kd = 19.717
  2783. min_temp = 0
  2784. max_temp = 300
  2785.  
  2786. [heater_bed]
  2787. heater_pin = PD4
  2788. sensor_type = EPCOS 100K B57560G104F
  2789. sensor_pin = PA6
  2790. control = pid
  2791. pid_kp = 73.853
  2792. pid_ki = 1.901
  2793. pid_kd = 717.301
  2794. min_temp = 0
  2795. max_temp = 130
  2796.  
  2797. [fan]
  2798. pin = PB4
  2799.  
  2800. [mcu]
  2801. serial = /dev/ttyUSB0
  2802. baud = 115200
  2803.  
  2804. [printer]
  2805. kinematics = cartesian
  2806. max_velocity = 500
  2807. max_accel = 6000
  2808. max_z_velocity = 5
  2809. max_z_accel = 100
  2810.  
  2811. [bed_screws]
  2812. screw1 = 30.5, 37
  2813. screw2 = 30.5, 207
  2814. screw3 = 204.5, 207
  2815. screw4 = 204.5, 37
  2816.  
  2817. [display]
  2818. lcd_type = st7920
  2819. cs_pin = PA3
  2820. sclk_pin = PA1
  2821. sid_pin = PC1
  2822. encoder_pins = ^PD2, ^PD3
  2823. click_pin = ^!PC0
  2824.  
  2825. [bltouch]
  2826. sensor_pin = ^PC4
  2827. control_pin = PA4
  2828. x_offset = -45
  2829. z_offset = 2.540
  2830. speed = 10
  2831. samples = 3
  2832. probe_with_touch_mode = False
  2833. samples_tolerance = 0.1
  2834. sample_retract_dist = 5.0
  2835.  
  2836. [safe_z_home]
  2837. home_xy_position = 117, 117
  2838. speed = 25
  2839. z_hop = 5
  2840. z_hop_speed = 10
  2841.  
  2842. [bed_mesh]
  2843. speed = 25
  2844. horizontal_move_z = 5
  2845. mesh_min = 47,56
  2846. mesh_max = 190,210
  2847. probe_count = 5,5
  2848. =======================
  2849. Extruder max_extrude_ratio=0.266081
  2850. mcu 'mcu': Starting serial connect
  2851. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2852. webhooks client 548127920400: New connection
  2853. webhooks client 548127920400: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  2854. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2855. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2856. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2857. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2858. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2859. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2860. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2861. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2862. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2863. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2864. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2865. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2866. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2867. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2868. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2869. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2870. mcu 'mcu': Unable to open serial port: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2871. MCU error during connect
  2872. Traceback (most recent call last):
  2873. File "/home/pi/klipper/klippy/mcu.py", line 774, in _attach
  2874. self._serial.connect_uart(self._serialport, self._baud, rts)
  2875. File "/home/pi/klipper/klippy/serialhdl.py", line 191, in connect_uart
  2876. self._error("Unable to connect")
  2877. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  2878. raise error(self.warn_prefix + (msg % params))
  2879. serialhdl.error: mcu 'mcu': Unable to connect
  2880.  
  2881. During handling of the above exception, another exception occurred:
  2882.  
  2883. Traceback (most recent call last):
  2884. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  2885. self.send_event("klippy:mcu_identify")
  2886. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  2887. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2888. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2889. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  2890. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2891. ^^^^^^^^^^^
  2892. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  2893. self._attach()
  2894. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  2895. raise error(str(e))
  2896. mcu.error: mcu 'mcu': Unable to connect
  2897. mcu 'mcu': Unable to connect
  2898. Once the underlying issue is corrected, use the
  2899. "FIRMWARE_RESTART" command to reset the firmware, reload the
  2900. config, and restart the host software.
  2901. Error configuring printer
  2902.  
  2903. Build file /home/pi/klipper/klippy/../.config(1272): Tue Nov 18 20:00:58 2025
  2904. ========= Last MCU build config =========
  2905. # CONFIG_LOW_LEVEL_OPTIONS is not set
  2906. # CONFIG_MACH_AVR is not set
  2907. # CONFIG_MACH_ATSAM is not set
  2908. # CONFIG_MACH_ATSAMD is not set
  2909. # CONFIG_MACH_LPC176X is not set
  2910. # CONFIG_MACH_STM32 is not set
  2911. # CONFIG_MACH_HC32F460 is not set
  2912. # CONFIG_MACH_RPXXXX is not set
  2913. # CONFIG_MACH_PRU is not set
  2914. # CONFIG_MACH_AR100 is not set
  2915. CONFIG_MACH_LINUX=y
  2916. # CONFIG_MACH_SIMU is not set
  2917. CONFIG_BOARD_DIRECTORY="linux"
  2918. CONFIG_CLOCK_FREQ=50000000
  2919. CONFIG_LINUX_SELECT=y
  2920. CONFIG_USB_VENDOR_ID=0x1d50
  2921. CONFIG_USB_DEVICE_ID=0x614e
  2922. CONFIG_USB_SERIAL_NUMBER="12345"
  2923. CONFIG_WANT_ADC=y
  2924. CONFIG_WANT_SPI=y
  2925. CONFIG_WANT_SOFTWARE_SPI=y
  2926. CONFIG_WANT_I2C=y
  2927. CONFIG_WANT_SOFTWARE_I2C=y
  2928. CONFIG_WANT_HARD_PWM=y
  2929. CONFIG_WANT_BUTTONS=y
  2930. CONFIG_WANT_TMCUART=y
  2931. CONFIG_WANT_NEOPIXEL=y
  2932. CONFIG_WANT_PULSE_COUNTER=y
  2933. CONFIG_WANT_ST7920=y
  2934. CONFIG_WANT_HD44780=y
  2935. CONFIG_WANT_ADXL345=y
  2936. CONFIG_WANT_LIS2DW=y
  2937. CONFIG_WANT_MPU9250=y
  2938. CONFIG_WANT_ICM20948=y
  2939. CONFIG_WANT_THERMOCOUPLE=y
  2940. CONFIG_WANT_HX71X=y
  2941. CONFIG_WANT_ADS1220=y
  2942. CONFIG_WANT_LDC1612=y
  2943. CONFIG_WANT_SENSOR_ANGLE=y
  2944. CONFIG_NEED_SENSOR_BULK=y
  2945. CONFIG_WANT_LOAD_CELL_PROBE=y
  2946. CONFIG_NEED_SOS_FILTER=y
  2947. CONFIG_CANBUS_FREQUENCY=1000000
  2948. CONFIG_INLINE_STEPPER_HACK=y
  2949. CONFIG_HAVE_GPIO=y
  2950. CONFIG_HAVE_GPIO_ADC=y
  2951. CONFIG_HAVE_GPIO_SPI=y
  2952. CONFIG_HAVE_GPIO_I2C=y
  2953. CONFIG_HAVE_GPIO_HARD_PWM=y
  2954. =======================
  2955. Build file /home/pi/klipper/klippy/../out/klipper.dict(11210): Tue Nov 18 20:01:38 2025
  2956. Last MCU build version: v0.13.0-403-gb4c7cf4a3
  2957. Last MCU build tools: gcc: (Debian 12.2.0-14+deb12u1) 12.2.0 binutils: (GNU Binutils for Debian) 2.40
  2958. Last MCU build config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 STEPPER_STEP_BOTH_EDGE=1
  2959. Build file /home/pi/klipper/klippy/../out/klipper.elf(897288): Tue Nov 18 20:01:51 2025
  2960. Attempting MCU 'mcu' reset
  2961. Unhandled exception during post run
  2962. Traceback (most recent call last):
  2963. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 265, in open
  2964. self.fd = os.open(self.portstr, os.O_RDWR | os.O_NOCTTY | os.O_NONBLOCK)
  2965. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2966. FileNotFoundError: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2967.  
  2968. During handling of the above exception, another exception occurred:
  2969.  
  2970. Traceback (most recent call last):
  2971. File "/home/pi/klipper/klippy/klippy.py", line 194, in run
  2972. self.send_event("klippy:firmware_restart")
  2973. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  2974. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2975. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2976. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  2977. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  2978. ^^^^^^^^^^^
  2979. File "/home/pi/klipper/klippy/mcu.py", line 672, in _firmware_restart
  2980. self._restart_arduino()
  2981. File "/home/pi/klipper/klippy/mcu.py", line 632, in _restart_arduino
  2982. serialhdl.arduino_reset(serialport, self._reactor)
  2983. File "/home/pi/klipper/klippy/serialhdl.py", line 392, in arduino_reset
  2984. ser = serial.Serial(serialport, 2400, timeout=0, exclusive=True)
  2985. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2986. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialutil.py", line 240, in __init__
  2987. self.open()
  2988. File "/home/pi/klippy-env/lib/python3.11/site-packages/serial/serialposix.py", line 268, in open
  2989. raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
  2990. serial.serialutil.SerialException: [Errno 2] could not open port /dev/ttyUSB0: [Errno 2] No such file or directory: '/dev/ttyUSB0'
  2991. Restarting printer
  2992. Start printer at Tue Nov 18 20:10:03 2025 (1763496603.6 818.6)
  2993. ===== Config file =====
  2994. [virtual_sdcard]
  2995. path = /home/klipper/printer_data/gcodes/
  2996. on_error_gcode = CANCEL_PRINT
  2997.  
  2998. [pause_resume]
  2999.  
  3000. [display_status]
  3001.  
  3002. [respond]
  3003.  
  3004. [gcode_macro CANCEL_PRINT]
  3005. description = Cancel the actual running print
  3006. rename_existing = CANCEL_PRINT_BASE
  3007. gcode =
  3008.  
  3009. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3010. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  3011. {% set retract = client.cancel_retract|default(5.0)|abs %}
  3012.  
  3013. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  3014. else "X=" ~ client.park_at_cancel_x %}
  3015. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  3016. else "Y=" ~ client.park_at_cancel_y %}
  3017. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  3018.  
  3019.  
  3020. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  3021. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  3022. {% endif %}
  3023. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  3024. _CLIENT_RETRACT LENGTH={retract}
  3025. TURN_OFF_HEATERS
  3026. M106 S0
  3027. {client.user_cancel_macro|default("")}
  3028. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3029.  
  3030. SET_PAUSE_NEXT_LAYER ENABLE=0
  3031. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  3032. CANCEL_PRINT_BASE
  3033.  
  3034. [gcode_macro PAUSE]
  3035. description = Pause the actual running print
  3036. rename_existing = PAUSE_BASE
  3037. gcode =
  3038.  
  3039. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3040. {% set idle_timeout = client.idle_timeout|default(0) %}
  3041. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  3042. {% set restore = False if printer.toolhead.extruder == ''
  3043. else True if params.RESTORE|default(1)|int == 1 else False %}
  3044.  
  3045. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  3046.  
  3047. {% if idle_timeout > 0 %}
  3048. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  3049. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  3050. {% endif %}
  3051. PAUSE_BASE
  3052. {client.user_pause_macro|default("")}
  3053. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  3054.  
  3055. [gcode_macro RESUME]
  3056. description = Resume the actual running print
  3057. rename_existing = RESUME_BASE
  3058. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  3059. variable_restore_idle_timeout = 0
  3060. variable_idle_state = False
  3061. gcode =
  3062.  
  3063. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3064. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3065. {% set sp_move = client.speed_move|default(velocity) %}
  3066. {% set runout_resume = True if client.runout_sensor|default("") == ""
  3067. else True if not printer[client.runout_sensor].enabled
  3068. else printer[client.runout_sensor].filament_detected %}
  3069. {% set can_extrude = True if printer.toolhead.extruder == ''
  3070. else printer[printer.toolhead.extruder].can_extrude %}
  3071. {% set do_resume = False %}
  3072. {% set prompt_txt = [] %}
  3073.  
  3074.  
  3075. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  3076. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3077. {% if last_extruder_temp.restore %}
  3078.  
  3079. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  3080. M109 S{last_extruder_temp.temp}
  3081. {% set do_resume = True %}
  3082. {% elif can_extrude %}
  3083. {% set do_resume = True %}
  3084. {% else %}
  3085. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3086. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3087. {% endif %}
  3088.  
  3089. {% elif can_extrude %}
  3090. {% set do_resume = True %}
  3091. {% else %}
  3092. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3093. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3094. {% endif %}
  3095. {% if runout_resume %}
  3096. {% if do_resume %}
  3097. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  3098. {client.user_resume_macro|default("")}
  3099. _CLIENT_EXTRUDE
  3100. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  3101. {% endif %}
  3102. {% else %}
  3103. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  3104. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  3105. {% endif %}
  3106.  
  3107. {% if not (runout_resume and do_resume) %}
  3108. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  3109. {% for element in prompt_txt %}
  3110. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  3111. {% endfor %}
  3112. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  3113. RESPOND TYPE=command MSG="action:prompt_show"
  3114. {% endif %}
  3115.  
  3116. [gcode_macro SET_PAUSE_NEXT_LAYER]
  3117. description = Enable a pause if the next layer is reached
  3118. gcode =
  3119. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  3120. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  3121. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  3122. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  3123.  
  3124. [gcode_macro SET_PAUSE_AT_LAYER]
  3125. description = Enable/disable a pause if a given layer number is reached
  3126. gcode =
  3127. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  3128. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  3129. else params.LAYER is defined %}
  3130. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  3131. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  3132. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  3133.  
  3134. [gcode_macro SET_PRINT_STATS_INFO]
  3135. rename_existing = SET_PRINT_STATS_INFO_BASE
  3136. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  3137. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  3138. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  3139. gcode =
  3140. {% if pause_next_layer.enable %}
  3141. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  3142. {pause_next_layer.call}
  3143. SET_PAUSE_NEXT_LAYER ENABLE=0
  3144. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  3145. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  3146. {pause_at_layer.call}
  3147. SET_PAUSE_AT_LAYER ENABLE=0
  3148. {% endif %}
  3149. SET_PRINT_STATS_INFO_BASE {rawparams}
  3150.  
  3151. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  3152. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  3153. gcode =
  3154.  
  3155. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3156. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3157. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  3158. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  3159. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  3160. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  3161. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  3162. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  3163.  
  3164. {% set origin = printer.gcode_move.homing_origin %}
  3165. {% set act = printer.gcode_move.gcode_position %}
  3166. {% set max = printer.toolhead.axis_maximum %}
  3167. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  3168. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  3169. else False %}
  3170.  
  3171. {% set z_min = params.Z_MIN|default(0)|float %}
  3172. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  3173. {% set x_park = params.X if params.X is defined
  3174. else custom_park_x if use_custom
  3175. else 0.0 if round_bed
  3176. else (max.x - 5.0) %}
  3177. {% set y_park = params.Y if params.Y is defined
  3178. else custom_park_y if use_custom
  3179. else (max.y - 5.0) if round_bed and z_park < cone
  3180. else 0.0 if round_bed
  3181. else (max.y - 5.0) %}
  3182.  
  3183. _CLIENT_RETRACT
  3184. {% if "xyz" in printer.toolhead.homed_axes %}
  3185. G90
  3186. G1 Z{z_park} F{sp_hop}
  3187. G1 X{x_park} Y{y_park} F{sp_move}
  3188. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  3189. {% else %}
  3190. RESPOND TYPE=echo MSG='Printer not homed'
  3191. {% endif %}
  3192.  
  3193. [gcode_macro _CLIENT_EXTRUDE]
  3194. description = Extrudes, if the extruder is hot enough
  3195. gcode =
  3196.  
  3197. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3198. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  3199. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  3200. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  3201. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  3202.  
  3203. {% if printer.toolhead.extruder != '' %}
  3204. {% if printer[printer.toolhead.extruder].can_extrude %}
  3205. {% if use_fw_retract %}
  3206. {% if length < 0 %}
  3207. G10
  3208. {% else %}
  3209. G11
  3210. {% endif %}
  3211. {% else %}
  3212. M83
  3213. G1 E{length} F{(speed|float|abs) * 60}
  3214. {% if absolute_extrude %}
  3215. M82
  3216. {% endif %}
  3217. {% endif %}
  3218. {% else %}
  3219. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  3220. {% endif %}
  3221. {% endif %}
  3222.  
  3223. [gcode_macro _CLIENT_RETRACT]
  3224. description = Retracts, if the extruder is hot enough
  3225. gcode =
  3226. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3227. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  3228. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  3229.  
  3230. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  3231.  
  3232. [gcode_macro _CLIENT_LINEAR_MOVE]
  3233. description = Linear move with save and restore of the gcode state
  3234. gcode =
  3235. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  3236. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  3237. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  3238. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  3239. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  3240. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  3241. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  3242. SAVE_GCODE_STATE NAME=_client_movement
  3243. {% if x_move or y_move or z_move %}
  3244. G9{ 0 if ABSOLUTE else 1 }
  3245. {% endif %}
  3246. {% if e_move %}
  3247. M8{ 2 if ABSOLUTE_E else 3 }
  3248. {% endif %}
  3249. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  3250. RESTORE_GCODE_STATE NAME=_client_movement
  3251.  
  3252. [stepper_x]
  3253. step_pin = PD7
  3254. dir_pin = !PC5
  3255. enable_pin = !PD6
  3256. microsteps = 16
  3257. rotation_distance = 40
  3258. endstop_pin = ^PC2
  3259. position_endstop = 0
  3260. position_max = 235
  3261. homing_speed = 25
  3262.  
  3263. [stepper_y]
  3264. step_pin = PC6
  3265. dir_pin = !PC7
  3266. enable_pin = !PD6
  3267. microsteps = 16
  3268. rotation_distance = 40
  3269. endstop_pin = ^PC3
  3270. position_endstop = 0
  3271. position_max = 235
  3272. homing_speed = 25
  3273.  
  3274. [stepper_z]
  3275. step_pin = PB3
  3276. dir_pin = PB2
  3277. enable_pin = !PA5
  3278. microsteps = 16
  3279. rotation_distance = 8
  3280. endstop_pin = probe:z_virtual_endstop
  3281. position_min = -5
  3282. position_max = 240
  3283.  
  3284. [extruder]
  3285. max_extrude_only_distance = 100.0
  3286. step_pin = PB1
  3287. dir_pin = !PB0
  3288. enable_pin = !PD6
  3289. microsteps = 16
  3290. rotation_distance = 33.683
  3291. nozzle_diameter = 0.400
  3292. filament_diameter = 1.750
  3293. heater_pin = PD5
  3294. sensor_type = EPCOS 100K B57560G104F
  3295. sensor_pin = PA7
  3296. control = pid
  3297. pid_kp = 29.211
  3298. pid_ki = 10.819
  3299. pid_kd = 19.717
  3300. min_temp = 0
  3301. max_temp = 300
  3302.  
  3303. [heater_bed]
  3304. heater_pin = PD4
  3305. sensor_type = EPCOS 100K B57560G104F
  3306. sensor_pin = PA6
  3307. control = pid
  3308. pid_kp = 73.853
  3309. pid_ki = 1.901
  3310. pid_kd = 717.301
  3311. min_temp = 0
  3312. max_temp = 130
  3313.  
  3314. [fan]
  3315. pin = PB4
  3316.  
  3317. [mcu]
  3318. serial = /tmp/klipper_host_mcu
  3319. baud = 115200
  3320.  
  3321. [printer]
  3322. kinematics = cartesian
  3323. max_velocity = 500
  3324. max_accel = 6000
  3325. max_z_velocity = 5
  3326. max_z_accel = 100
  3327.  
  3328. [bed_screws]
  3329. screw1 = 30.5, 37
  3330. screw2 = 30.5, 207
  3331. screw3 = 204.5, 207
  3332. screw4 = 204.5, 37
  3333.  
  3334. [display]
  3335. lcd_type = st7920
  3336. cs_pin = PA3
  3337. sclk_pin = PA1
  3338. sid_pin = PC1
  3339. encoder_pins = ^PD2, ^PD3
  3340. click_pin = ^!PC0
  3341.  
  3342. [bltouch]
  3343. sensor_pin = ^PC4
  3344. control_pin = PA4
  3345. x_offset = -45
  3346. z_offset = 2.540
  3347. speed = 10
  3348. samples = 3
  3349. probe_with_touch_mode = False
  3350. samples_tolerance = 0.1
  3351. sample_retract_dist = 5.0
  3352.  
  3353. [safe_z_home]
  3354. home_xy_position = 117, 117
  3355. speed = 25
  3356. z_hop = 5
  3357. z_hop_speed = 10
  3358.  
  3359. [bed_mesh]
  3360. speed = 25
  3361. horizontal_move_z = 5
  3362. mesh_min = 47,56
  3363. mesh_max = 190,210
  3364. probe_count = 5,5
  3365. =======================
  3366. Extruder max_extrude_ratio=0.266081
  3367. Config error
  3368. Traceback (most recent call last):
  3369. File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
  3370. self._read_config()
  3371. File "/home/pi/klipper/klippy/klippy.py", line 127, in _read_config
  3372. pconfig.check_unused_options(config)
  3373. File "/home/pi/klipper/klippy/configfile.py", line 497, in check_unused_options
  3374. self.validate.check_unused(config.fileconfig)
  3375. File "/home/pi/klipper/klippy/configfile.py", line 446, in check_unused
  3376. raise error("Option '%s' is not valid in section '%s'"
  3377. configparser.Error: Option 'baud' is not valid in section 'mcu'
  3378. webhooks client 548127052688: New connection
  3379. webhooks client 548127052688: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  3380. webhooks client 548127052688: Disconnected
  3381. Restarting printer
  3382. Start printer at Tue Nov 18 20:11:35 2025 (1763496695.0 910.0)
  3383. ===== Config file =====
  3384. [virtual_sdcard]
  3385. path = /home/klipper/printer_data/gcodes/
  3386. on_error_gcode = CANCEL_PRINT
  3387.  
  3388. [pause_resume]
  3389.  
  3390. [display_status]
  3391.  
  3392. [respond]
  3393.  
  3394. [gcode_macro CANCEL_PRINT]
  3395. description = Cancel the actual running print
  3396. rename_existing = CANCEL_PRINT_BASE
  3397. gcode =
  3398.  
  3399. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3400. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  3401. {% set retract = client.cancel_retract|default(5.0)|abs %}
  3402.  
  3403. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  3404. else "X=" ~ client.park_at_cancel_x %}
  3405. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  3406. else "Y=" ~ client.park_at_cancel_y %}
  3407. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  3408.  
  3409.  
  3410. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  3411. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  3412. {% endif %}
  3413. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  3414. _CLIENT_RETRACT LENGTH={retract}
  3415. TURN_OFF_HEATERS
  3416. M106 S0
  3417. {client.user_cancel_macro|default("")}
  3418. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3419.  
  3420. SET_PAUSE_NEXT_LAYER ENABLE=0
  3421. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  3422. CANCEL_PRINT_BASE
  3423.  
  3424. [gcode_macro PAUSE]
  3425. description = Pause the actual running print
  3426. rename_existing = PAUSE_BASE
  3427. gcode =
  3428.  
  3429. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3430. {% set idle_timeout = client.idle_timeout|default(0) %}
  3431. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  3432. {% set restore = False if printer.toolhead.extruder == ''
  3433. else True if params.RESTORE|default(1)|int == 1 else False %}
  3434.  
  3435. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  3436.  
  3437. {% if idle_timeout > 0 %}
  3438. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  3439. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  3440. {% endif %}
  3441. PAUSE_BASE
  3442. {client.user_pause_macro|default("")}
  3443. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  3444.  
  3445. [gcode_macro RESUME]
  3446. description = Resume the actual running print
  3447. rename_existing = RESUME_BASE
  3448. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  3449. variable_restore_idle_timeout = 0
  3450. variable_idle_state = False
  3451. gcode =
  3452.  
  3453. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3454. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3455. {% set sp_move = client.speed_move|default(velocity) %}
  3456. {% set runout_resume = True if client.runout_sensor|default("") == ""
  3457. else True if not printer[client.runout_sensor].enabled
  3458. else printer[client.runout_sensor].filament_detected %}
  3459. {% set can_extrude = True if printer.toolhead.extruder == ''
  3460. else printer[printer.toolhead.extruder].can_extrude %}
  3461. {% set do_resume = False %}
  3462. {% set prompt_txt = [] %}
  3463.  
  3464.  
  3465. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  3466. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3467. {% if last_extruder_temp.restore %}
  3468.  
  3469. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  3470. M109 S{last_extruder_temp.temp}
  3471. {% set do_resume = True %}
  3472. {% elif can_extrude %}
  3473. {% set do_resume = True %}
  3474. {% else %}
  3475. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3476. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3477. {% endif %}
  3478.  
  3479. {% elif can_extrude %}
  3480. {% set do_resume = True %}
  3481. {% else %}
  3482. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3483. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3484. {% endif %}
  3485. {% if runout_resume %}
  3486. {% if do_resume %}
  3487. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  3488. {client.user_resume_macro|default("")}
  3489. _CLIENT_EXTRUDE
  3490. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  3491. {% endif %}
  3492. {% else %}
  3493. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  3494. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  3495. {% endif %}
  3496.  
  3497. {% if not (runout_resume and do_resume) %}
  3498. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  3499. {% for element in prompt_txt %}
  3500. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  3501. {% endfor %}
  3502. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  3503. RESPOND TYPE=command MSG="action:prompt_show"
  3504. {% endif %}
  3505.  
  3506. [gcode_macro SET_PAUSE_NEXT_LAYER]
  3507. description = Enable a pause if the next layer is reached
  3508. gcode =
  3509. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  3510. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  3511. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  3512. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  3513.  
  3514. [gcode_macro SET_PAUSE_AT_LAYER]
  3515. description = Enable/disable a pause if a given layer number is reached
  3516. gcode =
  3517. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  3518. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  3519. else params.LAYER is defined %}
  3520. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  3521. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  3522. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  3523.  
  3524. [gcode_macro SET_PRINT_STATS_INFO]
  3525. rename_existing = SET_PRINT_STATS_INFO_BASE
  3526. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  3527. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  3528. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  3529. gcode =
  3530. {% if pause_next_layer.enable %}
  3531. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  3532. {pause_next_layer.call}
  3533. SET_PAUSE_NEXT_LAYER ENABLE=0
  3534. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  3535. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  3536. {pause_at_layer.call}
  3537. SET_PAUSE_AT_LAYER ENABLE=0
  3538. {% endif %}
  3539. SET_PRINT_STATS_INFO_BASE {rawparams}
  3540.  
  3541. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  3542. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  3543. gcode =
  3544.  
  3545. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3546. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3547. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  3548. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  3549. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  3550. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  3551. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  3552. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  3553.  
  3554. {% set origin = printer.gcode_move.homing_origin %}
  3555. {% set act = printer.gcode_move.gcode_position %}
  3556. {% set max = printer.toolhead.axis_maximum %}
  3557. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  3558. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  3559. else False %}
  3560.  
  3561. {% set z_min = params.Z_MIN|default(0)|float %}
  3562. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  3563. {% set x_park = params.X if params.X is defined
  3564. else custom_park_x if use_custom
  3565. else 0.0 if round_bed
  3566. else (max.x - 5.0) %}
  3567. {% set y_park = params.Y if params.Y is defined
  3568. else custom_park_y if use_custom
  3569. else (max.y - 5.0) if round_bed and z_park < cone
  3570. else 0.0 if round_bed
  3571. else (max.y - 5.0) %}
  3572.  
  3573. _CLIENT_RETRACT
  3574. {% if "xyz" in printer.toolhead.homed_axes %}
  3575. G90
  3576. G1 Z{z_park} F{sp_hop}
  3577. G1 X{x_park} Y{y_park} F{sp_move}
  3578. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  3579. {% else %}
  3580. RESPOND TYPE=echo MSG='Printer not homed'
  3581. {% endif %}
  3582.  
  3583. [gcode_macro _CLIENT_EXTRUDE]
  3584. description = Extrudes, if the extruder is hot enough
  3585. gcode =
  3586.  
  3587. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3588. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  3589. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  3590. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  3591. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  3592.  
  3593. {% if printer.toolhead.extruder != '' %}
  3594. {% if printer[printer.toolhead.extruder].can_extrude %}
  3595. {% if use_fw_retract %}
  3596. {% if length < 0 %}
  3597. G10
  3598. {% else %}
  3599. G11
  3600. {% endif %}
  3601. {% else %}
  3602. M83
  3603. G1 E{length} F{(speed|float|abs) * 60}
  3604. {% if absolute_extrude %}
  3605. M82
  3606. {% endif %}
  3607. {% endif %}
  3608. {% else %}
  3609. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  3610. {% endif %}
  3611. {% endif %}
  3612.  
  3613. [gcode_macro _CLIENT_RETRACT]
  3614. description = Retracts, if the extruder is hot enough
  3615. gcode =
  3616. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3617. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  3618. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  3619.  
  3620. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  3621.  
  3622. [gcode_macro _CLIENT_LINEAR_MOVE]
  3623. description = Linear move with save and restore of the gcode state
  3624. gcode =
  3625. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  3626. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  3627. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  3628. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  3629. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  3630. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  3631. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  3632. SAVE_GCODE_STATE NAME=_client_movement
  3633. {% if x_move or y_move or z_move %}
  3634. G9{ 0 if ABSOLUTE else 1 }
  3635. {% endif %}
  3636. {% if e_move %}
  3637. M8{ 2 if ABSOLUTE_E else 3 }
  3638. {% endif %}
  3639. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  3640. RESTORE_GCODE_STATE NAME=_client_movement
  3641.  
  3642. [stepper_x]
  3643. step_pin = PD7
  3644. dir_pin = !PC5
  3645. enable_pin = !PD6
  3646. microsteps = 16
  3647. rotation_distance = 40
  3648. endstop_pin = ^PC2
  3649. position_endstop = 0
  3650. position_max = 235
  3651. homing_speed = 25
  3652.  
  3653. [stepper_y]
  3654. step_pin = PC6
  3655. dir_pin = !PC7
  3656. enable_pin = !PD6
  3657. microsteps = 16
  3658. rotation_distance = 40
  3659. endstop_pin = ^PC3
  3660. position_endstop = 0
  3661. position_max = 235
  3662. homing_speed = 25
  3663.  
  3664. [stepper_z]
  3665. step_pin = PB3
  3666. dir_pin = PB2
  3667. enable_pin = !PA5
  3668. microsteps = 16
  3669. rotation_distance = 8
  3670. endstop_pin = probe:z_virtual_endstop
  3671. position_min = -5
  3672. position_max = 240
  3673.  
  3674. [extruder]
  3675. max_extrude_only_distance = 100.0
  3676. step_pin = PB1
  3677. dir_pin = !PB0
  3678. enable_pin = !PD6
  3679. microsteps = 16
  3680. rotation_distance = 33.683
  3681. nozzle_diameter = 0.400
  3682. filament_diameter = 1.750
  3683. heater_pin = PD5
  3684. sensor_type = EPCOS 100K B57560G104F
  3685. sensor_pin = PA7
  3686. control = pid
  3687. pid_kp = 29.211
  3688. pid_ki = 10.819
  3689. pid_kd = 19.717
  3690. min_temp = 0
  3691. max_temp = 300
  3692.  
  3693. [heater_bed]
  3694. heater_pin = PD4
  3695. sensor_type = EPCOS 100K B57560G104F
  3696. sensor_pin = PA6
  3697. control = pid
  3698. pid_kp = 73.853
  3699. pid_ki = 1.901
  3700. pid_kd = 717.301
  3701. min_temp = 0
  3702. max_temp = 130
  3703.  
  3704. [fan]
  3705. pin = PB4
  3706.  
  3707. [mcu]
  3708. serial = /tmp/klipper_host_mcu
  3709. baud = 250000
  3710.  
  3711. [printer]
  3712. kinematics = cartesian
  3713. max_velocity = 500
  3714. max_accel = 6000
  3715. max_z_velocity = 5
  3716. max_z_accel = 100
  3717.  
  3718. [bed_screws]
  3719. screw1 = 30.5, 37
  3720. screw2 = 30.5, 207
  3721. screw3 = 204.5, 207
  3722. screw4 = 204.5, 37
  3723.  
  3724. [display]
  3725. lcd_type = st7920
  3726. cs_pin = PA3
  3727. sclk_pin = PA1
  3728. sid_pin = PC1
  3729. encoder_pins = ^PD2, ^PD3
  3730. click_pin = ^!PC0
  3731.  
  3732. [bltouch]
  3733. sensor_pin = ^PC4
  3734. control_pin = PA4
  3735. x_offset = -45
  3736. z_offset = 2.540
  3737. speed = 10
  3738. samples = 3
  3739. probe_with_touch_mode = False
  3740. samples_tolerance = 0.1
  3741. sample_retract_dist = 5.0
  3742.  
  3743. [safe_z_home]
  3744. home_xy_position = 117, 117
  3745. speed = 25
  3746. z_hop = 5
  3747. z_hop_speed = 10
  3748.  
  3749. [bed_mesh]
  3750. speed = 25
  3751. horizontal_move_z = 5
  3752. mesh_min = 47,56
  3753. mesh_max = 190,210
  3754. probe_count = 5,5
  3755. =======================
  3756. Extruder max_extrude_ratio=0.266081
  3757. Config error
  3758. Traceback (most recent call last):
  3759. File "/home/pi/klipper/klippy/klippy.py", line 130, in _connect
  3760. self._read_config()
  3761. File "/home/pi/klipper/klippy/klippy.py", line 127, in _read_config
  3762. pconfig.check_unused_options(config)
  3763. File "/home/pi/klipper/klippy/configfile.py", line 497, in check_unused_options
  3764. self.validate.check_unused(config.fileconfig)
  3765. File "/home/pi/klipper/klippy/configfile.py", line 446, in check_unused
  3766. raise error("Option '%s' is not valid in section '%s'"
  3767. configparser.Error: Option 'baud' is not valid in section 'mcu'
  3768. webhooks client 548129457616: New connection
  3769. webhooks client 548129457616: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  3770. Unable to issue reset command on MCU 'mcu'
  3771. webhooks client 548129457616: Disconnected
  3772. Restarting printer
  3773. Start printer at Tue Nov 18 20:14:05 2025 (1763496845.1 1060.1)
  3774. ===== Config file =====
  3775. [virtual_sdcard]
  3776. path = /home/klipper/printer_data/gcodes/
  3777. on_error_gcode = CANCEL_PRINT
  3778.  
  3779. [pause_resume]
  3780.  
  3781. [display_status]
  3782.  
  3783. [respond]
  3784.  
  3785. [gcode_macro CANCEL_PRINT]
  3786. description = Cancel the actual running print
  3787. rename_existing = CANCEL_PRINT_BASE
  3788. gcode =
  3789.  
  3790. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3791. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  3792. {% set retract = client.cancel_retract|default(5.0)|abs %}
  3793.  
  3794. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  3795. else "X=" ~ client.park_at_cancel_x %}
  3796. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  3797. else "Y=" ~ client.park_at_cancel_y %}
  3798. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  3799.  
  3800.  
  3801. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  3802. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  3803. {% endif %}
  3804. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  3805. _CLIENT_RETRACT LENGTH={retract}
  3806. TURN_OFF_HEATERS
  3807. M106 S0
  3808. {client.user_cancel_macro|default("")}
  3809. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3810.  
  3811. SET_PAUSE_NEXT_LAYER ENABLE=0
  3812. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  3813. CANCEL_PRINT_BASE
  3814.  
  3815. [gcode_macro PAUSE]
  3816. description = Pause the actual running print
  3817. rename_existing = PAUSE_BASE
  3818. gcode =
  3819.  
  3820. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3821. {% set idle_timeout = client.idle_timeout|default(0) %}
  3822. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  3823. {% set restore = False if printer.toolhead.extruder == ''
  3824. else True if params.RESTORE|default(1)|int == 1 else False %}
  3825.  
  3826. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  3827.  
  3828. {% if idle_timeout > 0 %}
  3829. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  3830. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  3831. {% endif %}
  3832. PAUSE_BASE
  3833. {client.user_pause_macro|default("")}
  3834. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  3835.  
  3836. [gcode_macro RESUME]
  3837. description = Resume the actual running print
  3838. rename_existing = RESUME_BASE
  3839. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  3840. variable_restore_idle_timeout = 0
  3841. variable_idle_state = False
  3842. gcode =
  3843.  
  3844. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3845. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3846. {% set sp_move = client.speed_move|default(velocity) %}
  3847. {% set runout_resume = True if client.runout_sensor|default("") == ""
  3848. else True if not printer[client.runout_sensor].enabled
  3849. else printer[client.runout_sensor].filament_detected %}
  3850. {% set can_extrude = True if printer.toolhead.extruder == ''
  3851. else printer[printer.toolhead.extruder].can_extrude %}
  3852. {% set do_resume = False %}
  3853. {% set prompt_txt = [] %}
  3854.  
  3855.  
  3856. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  3857. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  3858. {% if last_extruder_temp.restore %}
  3859.  
  3860. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  3861. M109 S{last_extruder_temp.temp}
  3862. {% set do_resume = True %}
  3863. {% elif can_extrude %}
  3864. {% set do_resume = True %}
  3865. {% else %}
  3866. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3867. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3868. {% endif %}
  3869.  
  3870. {% elif can_extrude %}
  3871. {% set do_resume = True %}
  3872. {% else %}
  3873. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  3874. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  3875. {% endif %}
  3876. {% if runout_resume %}
  3877. {% if do_resume %}
  3878. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  3879. {client.user_resume_macro|default("")}
  3880. _CLIENT_EXTRUDE
  3881. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  3882. {% endif %}
  3883. {% else %}
  3884. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  3885. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  3886. {% endif %}
  3887.  
  3888. {% if not (runout_resume and do_resume) %}
  3889. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  3890. {% for element in prompt_txt %}
  3891. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  3892. {% endfor %}
  3893. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  3894. RESPOND TYPE=command MSG="action:prompt_show"
  3895. {% endif %}
  3896.  
  3897. [gcode_macro SET_PAUSE_NEXT_LAYER]
  3898. description = Enable a pause if the next layer is reached
  3899. gcode =
  3900. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  3901. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  3902. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  3903. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  3904.  
  3905. [gcode_macro SET_PAUSE_AT_LAYER]
  3906. description = Enable/disable a pause if a given layer number is reached
  3907. gcode =
  3908. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  3909. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  3910. else params.LAYER is defined %}
  3911. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  3912. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  3913. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  3914.  
  3915. [gcode_macro SET_PRINT_STATS_INFO]
  3916. rename_existing = SET_PRINT_STATS_INFO_BASE
  3917. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  3918. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  3919. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  3920. gcode =
  3921. {% if pause_next_layer.enable %}
  3922. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  3923. {pause_next_layer.call}
  3924. SET_PAUSE_NEXT_LAYER ENABLE=0
  3925. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  3926. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  3927. {pause_at_layer.call}
  3928. SET_PAUSE_AT_LAYER ENABLE=0
  3929. {% endif %}
  3930. SET_PRINT_STATS_INFO_BASE {rawparams}
  3931.  
  3932. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  3933. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  3934. gcode =
  3935.  
  3936. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3937. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  3938. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  3939. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  3940. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  3941. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  3942. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  3943. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  3944.  
  3945. {% set origin = printer.gcode_move.homing_origin %}
  3946. {% set act = printer.gcode_move.gcode_position %}
  3947. {% set max = printer.toolhead.axis_maximum %}
  3948. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  3949. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  3950. else False %}
  3951.  
  3952. {% set z_min = params.Z_MIN|default(0)|float %}
  3953. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  3954. {% set x_park = params.X if params.X is defined
  3955. else custom_park_x if use_custom
  3956. else 0.0 if round_bed
  3957. else (max.x - 5.0) %}
  3958. {% set y_park = params.Y if params.Y is defined
  3959. else custom_park_y if use_custom
  3960. else (max.y - 5.0) if round_bed and z_park < cone
  3961. else 0.0 if round_bed
  3962. else (max.y - 5.0) %}
  3963.  
  3964. _CLIENT_RETRACT
  3965. {% if "xyz" in printer.toolhead.homed_axes %}
  3966. G90
  3967. G1 Z{z_park} F{sp_hop}
  3968. G1 X{x_park} Y{y_park} F{sp_move}
  3969. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  3970. {% else %}
  3971. RESPOND TYPE=echo MSG='Printer not homed'
  3972. {% endif %}
  3973.  
  3974. [gcode_macro _CLIENT_EXTRUDE]
  3975. description = Extrudes, if the extruder is hot enough
  3976. gcode =
  3977.  
  3978. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  3979. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  3980. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  3981. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  3982. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  3983.  
  3984. {% if printer.toolhead.extruder != '' %}
  3985. {% if printer[printer.toolhead.extruder].can_extrude %}
  3986. {% if use_fw_retract %}
  3987. {% if length < 0 %}
  3988. G10
  3989. {% else %}
  3990. G11
  3991. {% endif %}
  3992. {% else %}
  3993. M83
  3994. G1 E{length} F{(speed|float|abs) * 60}
  3995. {% if absolute_extrude %}
  3996. M82
  3997. {% endif %}
  3998. {% endif %}
  3999. {% else %}
  4000. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  4001. {% endif %}
  4002. {% endif %}
  4003.  
  4004. [gcode_macro _CLIENT_RETRACT]
  4005. description = Retracts, if the extruder is hot enough
  4006. gcode =
  4007. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4008. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  4009. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  4010.  
  4011. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  4012.  
  4013. [gcode_macro _CLIENT_LINEAR_MOVE]
  4014. description = Linear move with save and restore of the gcode state
  4015. gcode =
  4016. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  4017. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  4018. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  4019. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  4020. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  4021. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  4022. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  4023. SAVE_GCODE_STATE NAME=_client_movement
  4024. {% if x_move or y_move or z_move %}
  4025. G9{ 0 if ABSOLUTE else 1 }
  4026. {% endif %}
  4027. {% if e_move %}
  4028. M8{ 2 if ABSOLUTE_E else 3 }
  4029. {% endif %}
  4030. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  4031. RESTORE_GCODE_STATE NAME=_client_movement
  4032.  
  4033. [stepper_x]
  4034. step_pin = PD7
  4035. dir_pin = !PC5
  4036. enable_pin = !PD6
  4037. microsteps = 16
  4038. rotation_distance = 40
  4039. endstop_pin = ^PC2
  4040. position_endstop = 0
  4041. position_max = 235
  4042. homing_speed = 25
  4043.  
  4044. [stepper_y]
  4045. step_pin = PC6
  4046. dir_pin = !PC7
  4047. enable_pin = !PD6
  4048. microsteps = 16
  4049. rotation_distance = 40
  4050. endstop_pin = ^PC3
  4051. position_endstop = 0
  4052. position_max = 235
  4053. homing_speed = 25
  4054.  
  4055. [stepper_z]
  4056. step_pin = PB3
  4057. dir_pin = PB2
  4058. enable_pin = !PA5
  4059. microsteps = 16
  4060. rotation_distance = 8
  4061. endstop_pin = probe:z_virtual_endstop
  4062. position_min = -5
  4063. position_max = 240
  4064.  
  4065. [extruder]
  4066. max_extrude_only_distance = 100.0
  4067. step_pin = PB1
  4068. dir_pin = !PB0
  4069. enable_pin = !PD6
  4070. microsteps = 16
  4071. rotation_distance = 33.683
  4072. nozzle_diameter = 0.400
  4073. filament_diameter = 1.750
  4074. heater_pin = PD5
  4075. sensor_type = EPCOS 100K B57560G104F
  4076. sensor_pin = PA7
  4077. control = pid
  4078. pid_kp = 29.211
  4079. pid_ki = 10.819
  4080. pid_kd = 19.717
  4081. min_temp = 0
  4082. max_temp = 300
  4083.  
  4084. [heater_bed]
  4085. heater_pin = PD4
  4086. sensor_type = EPCOS 100K B57560G104F
  4087. sensor_pin = PA6
  4088. control = pid
  4089. pid_kp = 73.853
  4090. pid_ki = 1.901
  4091. pid_kd = 717.301
  4092. min_temp = 0
  4093. max_temp = 130
  4094.  
  4095. [fan]
  4096. pin = PB4
  4097.  
  4098. [mcu]
  4099. serial = /tmp/klipper_host_mcu, baud: 250000
  4100.  
  4101. [printer]
  4102. kinematics = cartesian
  4103. max_velocity = 500
  4104. max_accel = 6000
  4105. max_z_velocity = 5
  4106. max_z_accel = 100
  4107.  
  4108. [bed_screws]
  4109. screw1 = 30.5, 37
  4110. screw2 = 30.5, 207
  4111. screw3 = 204.5, 207
  4112. screw4 = 204.5, 37
  4113.  
  4114. [display]
  4115. lcd_type = st7920
  4116. cs_pin = PA3
  4117. sclk_pin = PA1
  4118. sid_pin = PC1
  4119. encoder_pins = ^PD2, ^PD3
  4120. click_pin = ^!PC0
  4121.  
  4122. [bltouch]
  4123. sensor_pin = ^PC4
  4124. control_pin = PA4
  4125. x_offset = -45
  4126. z_offset = 2.540
  4127. speed = 10
  4128. samples = 3
  4129. probe_with_touch_mode = False
  4130. samples_tolerance = 0.1
  4131. sample_retract_dist = 5.0
  4132.  
  4133. [safe_z_home]
  4134. home_xy_position = 117, 117
  4135. speed = 25
  4136. z_hop = 5
  4137. z_hop_speed = 10
  4138.  
  4139. [bed_mesh]
  4140. speed = 25
  4141. horizontal_move_z = 5
  4142. mesh_min = 47,56
  4143. mesh_max = 190,210
  4144. probe_count = 5,5
  4145. =======================
  4146. Extruder max_extrude_ratio=0.266081
  4147. mcu 'mcu': Starting connect
  4148. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4149. webhooks client 548127376976: New connection
  4150. webhooks client 548127376976: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  4151. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4152. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4153. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4154. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4155. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4156. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4157. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4158. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4159. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4160. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4161. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4162. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4163. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4164. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4165. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4166. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4167. mcu 'mcu': Unable to open port: [Errno 2] No such file or directory: '/tmp/klipper_host_mcu, baud: 250000'
  4168. MCU error during connect
  4169. Traceback (most recent call last):
  4170. File "/home/pi/klipper/klippy/mcu.py", line 776, in _attach
  4171. self._serial.connect_pipe(self._serialport)
  4172. File "/home/pi/klipper/klippy/serialhdl.py", line 173, in connect_pipe
  4173. self._error("Unable to connect")
  4174. File "/home/pi/klipper/klippy/serialhdl.py", line 68, in _error
  4175. raise error(self.warn_prefix + (msg % params))
  4176. serialhdl.error: mcu 'mcu': Unable to connect
  4177.  
  4178. During handling of the above exception, another exception occurred:
  4179.  
  4180. Traceback (most recent call last):
  4181. File "/home/pi/klipper/klippy/klippy.py", line 131, in _connect
  4182. self.send_event("klippy:mcu_identify")
  4183. File "/home/pi/klipper/klippy/klippy.py", line 227, in send_event
  4184. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  4185. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4186. File "/home/pi/klipper/klippy/klippy.py", line 227, in <listcomp>
  4187. return [cb(*params) for cb in self.event_handlers.get(event, [])]
  4188. ^^^^^^^^^^^
  4189. File "/home/pi/klipper/klippy/mcu.py", line 784, in _mcu_identify
  4190. self._attach()
  4191. File "/home/pi/klipper/klippy/mcu.py", line 779, in _attach
  4192. raise error(str(e))
  4193. mcu.error: mcu 'mcu': Unable to connect
  4194. mcu 'mcu': Unable to connect
  4195. Once the underlying issue is corrected, use the
  4196. "FIRMWARE_RESTART" command to reset the firmware, reload the
  4197. config, and restart the host software.
  4198. Error configuring printer
  4199.  
  4200. Build file /home/pi/klipper/klippy/../.config(1272): Tue Nov 18 20:00:58 2025
  4201. ========= Last MCU build config =========
  4202. # CONFIG_LOW_LEVEL_OPTIONS is not set
  4203. # CONFIG_MACH_AVR is not set
  4204. # CONFIG_MACH_ATSAM is not set
  4205. # CONFIG_MACH_ATSAMD is not set
  4206. # CONFIG_MACH_LPC176X is not set
  4207. # CONFIG_MACH_STM32 is not set
  4208. # CONFIG_MACH_HC32F460 is not set
  4209. # CONFIG_MACH_RPXXXX is not set
  4210. # CONFIG_MACH_PRU is not set
  4211. # CONFIG_MACH_AR100 is not set
  4212. CONFIG_MACH_LINUX=y
  4213. # CONFIG_MACH_SIMU is not set
  4214. CONFIG_BOARD_DIRECTORY="linux"
  4215. CONFIG_CLOCK_FREQ=50000000
  4216. CONFIG_LINUX_SELECT=y
  4217. CONFIG_USB_VENDOR_ID=0x1d50
  4218. CONFIG_USB_DEVICE_ID=0x614e
  4219. CONFIG_USB_SERIAL_NUMBER="12345"
  4220. CONFIG_WANT_ADC=y
  4221. CONFIG_WANT_SPI=y
  4222. CONFIG_WANT_SOFTWARE_SPI=y
  4223. CONFIG_WANT_I2C=y
  4224. CONFIG_WANT_SOFTWARE_I2C=y
  4225. CONFIG_WANT_HARD_PWM=y
  4226. CONFIG_WANT_BUTTONS=y
  4227. CONFIG_WANT_TMCUART=y
  4228. CONFIG_WANT_NEOPIXEL=y
  4229. CONFIG_WANT_PULSE_COUNTER=y
  4230. CONFIG_WANT_ST7920=y
  4231. CONFIG_WANT_HD44780=y
  4232. CONFIG_WANT_ADXL345=y
  4233. CONFIG_WANT_LIS2DW=y
  4234. CONFIG_WANT_MPU9250=y
  4235. CONFIG_WANT_ICM20948=y
  4236. CONFIG_WANT_THERMOCOUPLE=y
  4237. CONFIG_WANT_HX71X=y
  4238. CONFIG_WANT_ADS1220=y
  4239. CONFIG_WANT_LDC1612=y
  4240. CONFIG_WANT_SENSOR_ANGLE=y
  4241. CONFIG_NEED_SENSOR_BULK=y
  4242. CONFIG_WANT_LOAD_CELL_PROBE=y
  4243. CONFIG_NEED_SOS_FILTER=y
  4244. CONFIG_CANBUS_FREQUENCY=1000000
  4245. CONFIG_INLINE_STEPPER_HACK=y
  4246. CONFIG_HAVE_GPIO=y
  4247. CONFIG_HAVE_GPIO_ADC=y
  4248. CONFIG_HAVE_GPIO_SPI=y
  4249. CONFIG_HAVE_GPIO_I2C=y
  4250. CONFIG_HAVE_GPIO_HARD_PWM=y
  4251. =======================
  4252. Build file /home/pi/klipper/klippy/../out/klipper.dict(11210): Tue Nov 18 20:01:38 2025
  4253. Last MCU build version: v0.13.0-403-gb4c7cf4a3
  4254. Last MCU build tools: gcc: (Debian 12.2.0-14+deb12u1) 12.2.0 binutils: (GNU Binutils for Debian) 2.40
  4255. Last MCU build config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 STEPPER_STEP_BOTH_EDGE=1
  4256. Build file /home/pi/klipper/klippy/../out/klipper.elf(897288): Tue Nov 18 20:01:51 2025
  4257. Unable to issue reset command on MCU 'mcu'
  4258. webhooks client 548127376976: Disconnected
  4259. Restarting printer
  4260. Start printer at Tue Nov 18 20:18:37 2025 (1763497117.7 1332.7)
  4261. ===== Config file =====
  4262. [virtual_sdcard]
  4263. path = /home/klipper/printer_data/gcodes/
  4264. on_error_gcode = CANCEL_PRINT
  4265.  
  4266. [pause_resume]
  4267.  
  4268. [display_status]
  4269.  
  4270. [respond]
  4271.  
  4272. [gcode_macro CANCEL_PRINT]
  4273. description = Cancel the actual running print
  4274. rename_existing = CANCEL_PRINT_BASE
  4275. gcode =
  4276.  
  4277. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4278. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  4279. {% set retract = client.cancel_retract|default(5.0)|abs %}
  4280.  
  4281. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  4282. else "X=" ~ client.park_at_cancel_x %}
  4283. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  4284. else "Y=" ~ client.park_at_cancel_y %}
  4285. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  4286.  
  4287.  
  4288. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  4289. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  4290. {% endif %}
  4291. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  4292. _CLIENT_RETRACT LENGTH={retract}
  4293. TURN_OFF_HEATERS
  4294. M106 S0
  4295. {client.user_cancel_macro|default("")}
  4296. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  4297.  
  4298. SET_PAUSE_NEXT_LAYER ENABLE=0
  4299. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  4300. CANCEL_PRINT_BASE
  4301.  
  4302. [gcode_macro PAUSE]
  4303. description = Pause the actual running print
  4304. rename_existing = PAUSE_BASE
  4305. gcode =
  4306.  
  4307. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4308. {% set idle_timeout = client.idle_timeout|default(0) %}
  4309. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  4310. {% set restore = False if printer.toolhead.extruder == ''
  4311. else True if params.RESTORE|default(1)|int == 1 else False %}
  4312.  
  4313. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  4314.  
  4315. {% if idle_timeout > 0 %}
  4316. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  4317. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  4318. {% endif %}
  4319. PAUSE_BASE
  4320. {client.user_pause_macro|default("")}
  4321. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  4322.  
  4323. [gcode_macro RESUME]
  4324. description = Resume the actual running print
  4325. rename_existing = RESUME_BASE
  4326. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  4327. variable_restore_idle_timeout = 0
  4328. variable_idle_state = False
  4329. gcode =
  4330.  
  4331. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4332. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  4333. {% set sp_move = client.speed_move|default(velocity) %}
  4334. {% set runout_resume = True if client.runout_sensor|default("") == ""
  4335. else True if not printer[client.runout_sensor].enabled
  4336. else printer[client.runout_sensor].filament_detected %}
  4337. {% set can_extrude = True if printer.toolhead.extruder == ''
  4338. else printer[printer.toolhead.extruder].can_extrude %}
  4339. {% set do_resume = False %}
  4340. {% set prompt_txt = [] %}
  4341.  
  4342.  
  4343. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  4344. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  4345. {% if last_extruder_temp.restore %}
  4346.  
  4347. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  4348. M109 S{last_extruder_temp.temp}
  4349. {% set do_resume = True %}
  4350. {% elif can_extrude %}
  4351. {% set do_resume = True %}
  4352. {% else %}
  4353. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  4354. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  4355. {% endif %}
  4356.  
  4357. {% elif can_extrude %}
  4358. {% set do_resume = True %}
  4359. {% else %}
  4360. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  4361. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  4362. {% endif %}
  4363. {% if runout_resume %}
  4364. {% if do_resume %}
  4365. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  4366. {client.user_resume_macro|default("")}
  4367. _CLIENT_EXTRUDE
  4368. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  4369. {% endif %}
  4370. {% else %}
  4371. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  4372. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  4373. {% endif %}
  4374.  
  4375. {% if not (runout_resume and do_resume) %}
  4376. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  4377. {% for element in prompt_txt %}
  4378. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  4379. {% endfor %}
  4380. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  4381. RESPOND TYPE=command MSG="action:prompt_show"
  4382. {% endif %}
  4383.  
  4384. [gcode_macro SET_PAUSE_NEXT_LAYER]
  4385. description = Enable a pause if the next layer is reached
  4386. gcode =
  4387. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  4388. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  4389. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  4390. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  4391.  
  4392. [gcode_macro SET_PAUSE_AT_LAYER]
  4393. description = Enable/disable a pause if a given layer number is reached
  4394. gcode =
  4395. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  4396. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  4397. else params.LAYER is defined %}
  4398. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  4399. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  4400. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  4401.  
  4402. [gcode_macro SET_PRINT_STATS_INFO]
  4403. rename_existing = SET_PRINT_STATS_INFO_BASE
  4404. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  4405. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  4406. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  4407. gcode =
  4408. {% if pause_next_layer.enable %}
  4409. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  4410. {pause_next_layer.call}
  4411. SET_PAUSE_NEXT_LAYER ENABLE=0
  4412. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  4413. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  4414. {pause_at_layer.call}
  4415. SET_PAUSE_AT_LAYER ENABLE=0
  4416. {% endif %}
  4417. SET_PRINT_STATS_INFO_BASE {rawparams}
  4418.  
  4419. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  4420. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  4421. gcode =
  4422.  
  4423. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4424. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  4425. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  4426. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  4427. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  4428. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  4429. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  4430. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  4431.  
  4432. {% set origin = printer.gcode_move.homing_origin %}
  4433. {% set act = printer.gcode_move.gcode_position %}
  4434. {% set max = printer.toolhead.axis_maximum %}
  4435. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  4436. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  4437. else False %}
  4438.  
  4439. {% set z_min = params.Z_MIN|default(0)|float %}
  4440. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  4441. {% set x_park = params.X if params.X is defined
  4442. else custom_park_x if use_custom
  4443. else 0.0 if round_bed
  4444. else (max.x - 5.0) %}
  4445. {% set y_park = params.Y if params.Y is defined
  4446. else custom_park_y if use_custom
  4447. else (max.y - 5.0) if round_bed and z_park < cone
  4448. else 0.0 if round_bed
  4449. else (max.y - 5.0) %}
  4450.  
  4451. _CLIENT_RETRACT
  4452. {% if "xyz" in printer.toolhead.homed_axes %}
  4453. G90
  4454. G1 Z{z_park} F{sp_hop}
  4455. G1 X{x_park} Y{y_park} F{sp_move}
  4456. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  4457. {% else %}
  4458. RESPOND TYPE=echo MSG='Printer not homed'
  4459. {% endif %}
  4460.  
  4461. [gcode_macro _CLIENT_EXTRUDE]
  4462. description = Extrudes, if the extruder is hot enough
  4463. gcode =
  4464.  
  4465. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4466. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  4467. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  4468. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  4469. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  4470.  
  4471. {% if printer.toolhead.extruder != '' %}
  4472. {% if printer[printer.toolhead.extruder].can_extrude %}
  4473. {% if use_fw_retract %}
  4474. {% if length < 0 %}
  4475. G10
  4476. {% else %}
  4477. G11
  4478. {% endif %}
  4479. {% else %}
  4480. M83
  4481. G1 E{length} F{(speed|float|abs) * 60}
  4482. {% if absolute_extrude %}
  4483. M82
  4484. {% endif %}
  4485. {% endif %}
  4486. {% else %}
  4487. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  4488. {% endif %}
  4489. {% endif %}
  4490.  
  4491. [gcode_macro _CLIENT_RETRACT]
  4492. description = Retracts, if the extruder is hot enough
  4493. gcode =
  4494. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4495. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  4496. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  4497.  
  4498. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  4499.  
  4500. [gcode_macro _CLIENT_LINEAR_MOVE]
  4501. description = Linear move with save and restore of the gcode state
  4502. gcode =
  4503. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  4504. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  4505. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  4506. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  4507. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  4508. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  4509. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  4510. SAVE_GCODE_STATE NAME=_client_movement
  4511. {% if x_move or y_move or z_move %}
  4512. G9{ 0 if ABSOLUTE else 1 }
  4513. {% endif %}
  4514. {% if e_move %}
  4515. M8{ 2 if ABSOLUTE_E else 3 }
  4516. {% endif %}
  4517. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  4518. RESTORE_GCODE_STATE NAME=_client_movement
  4519.  
  4520. [stepper_x]
  4521. step_pin = PD7
  4522. dir_pin = !PC5
  4523. enable_pin = !PD6
  4524. microsteps = 16
  4525. rotation_distance = 40
  4526. endstop_pin = ^PC2
  4527. position_endstop = 0
  4528. position_max = 235
  4529. homing_speed = 25
  4530.  
  4531. [stepper_y]
  4532. step_pin = PC6
  4533. dir_pin = !PC7
  4534. enable_pin = !PD6
  4535. microsteps = 16
  4536. rotation_distance = 40
  4537. endstop_pin = ^PC3
  4538. position_endstop = 0
  4539. position_max = 235
  4540. homing_speed = 25
  4541.  
  4542. [stepper_z]
  4543. step_pin = PB3
  4544. dir_pin = PB2
  4545. enable_pin = !PA5
  4546. microsteps = 16
  4547. rotation_distance = 8
  4548. endstop_pin = probe:z_virtual_endstop
  4549. position_min = -5
  4550. position_max = 240
  4551.  
  4552. [extruder]
  4553. max_extrude_only_distance = 100.0
  4554. step_pin = PB1
  4555. dir_pin = !PB0
  4556. enable_pin = !PD6
  4557. microsteps = 16
  4558. rotation_distance = 33.683
  4559. nozzle_diameter = 0.400
  4560. filament_diameter = 1.750
  4561. heater_pin = PD5
  4562. sensor_type = EPCOS 100K B57560G104F
  4563. sensor_pin = PA7
  4564. control = pid
  4565. pid_kp = 29.211
  4566. pid_ki = 10.819
  4567. pid_kd = 19.717
  4568. min_temp = 0
  4569. max_temp = 300
  4570.  
  4571. [heater_bed]
  4572. heater_pin = PD4
  4573. sensor_type = EPCOS 100K B57560G104F
  4574. sensor_pin = PA6
  4575. control = pid
  4576. pid_kp = 73.853
  4577. pid_ki = 1.901
  4578. pid_kd = 717.301
  4579. min_temp = 0
  4580. max_temp = 130
  4581.  
  4582. [fan]
  4583. pin = PB4
  4584.  
  4585. [mcu]
  4586. serial = /tmp/klipper_host_mcu
  4587.  
  4588. [printer]
  4589. kinematics = cartesian
  4590. max_velocity = 500
  4591. max_accel = 6000
  4592. max_z_velocity = 5
  4593. max_z_accel = 100
  4594.  
  4595. [bed_screws]
  4596. screw1 = 30.5, 37
  4597. screw2 = 30.5, 207
  4598. screw3 = 204.5, 207
  4599. screw4 = 204.5, 37
  4600.  
  4601. [display]
  4602. lcd_type = st7920
  4603. cs_pin = PA3
  4604. sclk_pin = PA1
  4605. sid_pin = PC1
  4606. encoder_pins = ^PD2, ^PD3
  4607. click_pin = ^!PC0
  4608.  
  4609. [bltouch]
  4610. sensor_pin = ^PC4
  4611. control_pin = PA4
  4612. x_offset = -45
  4613. z_offset = 2.540
  4614. speed = 10
  4615. samples = 3
  4616. probe_with_touch_mode = False
  4617. samples_tolerance = 0.1
  4618. sample_retract_dist = 5.0
  4619.  
  4620. [safe_z_home]
  4621. home_xy_position = 117, 117
  4622. speed = 25
  4623. z_hop = 5
  4624. z_hop_speed = 10
  4625.  
  4626. [bed_mesh]
  4627. speed = 25
  4628. horizontal_move_z = 5
  4629. mesh_min = 47,56
  4630. mesh_max = 190,210
  4631. probe_count = 5,5
  4632. =======================
  4633. Extruder max_extrude_ratio=0.266081
  4634. mcu 'mcu': Starting connect
  4635. webhooks client 548127285712: New connection
  4636. webhooks client 548127285712: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  4637. Loaded MCU 'mcu' 138 commands (v0.13.0-403-gb4c7cf4a3 / gcc: (Debian 12.2.0-14+deb12u1) 12.2.0 binutils: (GNU Binutils for Debian) 2.40)
  4638. MCU 'mcu' config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 STEPPER_STEP_BOTH_EDGE=1
  4639. Sending MCU 'mcu' printer configuration...
  4640. Config error
  4641. Traceback (most recent call last):
  4642. File "/home/pi/klipper/klippy/mcu.py", line 935, in _send_config
  4643. self._serial.send(c)
  4644. File "/home/pi/klipper/klippy/serialhdl.py", line 266, in send
  4645. cmd = self.msgparser.create_command(msg)
  4646. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4647. File "/home/pi/klipper/klippy/msgproto.py", line 349, in create_command
  4648. cmd = mp.encode_by_name(**argparts)
  4649. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  4650. File "/home/pi/klipper/klippy/msgproto.py", line 179, in encode_by_name
  4651. t.encode(out, params[name])
  4652. File "/home/pi/klipper/klippy/msgproto.py", line 108, in encode
  4653. raise enumeration_error(self.enum_name, v)
  4654. msgproto.enumeration_error: Unknown value 'PA6' in enumeration 'pin'
  4655.  
  4656. During handling of the above exception, another exception occurred:
  4657.  
  4658. Traceback (most recent call last):
  4659. File "/home/pi/klipper/klippy/klippy.py", line 135, in _connect
  4660. cb()
  4661. File "/home/pi/klipper/klippy/mcu.py", line 970, in _connect
  4662. self._send_config(None)
  4663. File "/home/pi/klipper/klippy/mcu.py", line 946, in _send_config
  4664. raise self._printer.config_error(
  4665. configparser.Error: Pin 'PA6' is not a valid pin name on mcu 'mcu'
  4666. webhooks client 548127285712: Disconnected
  4667. Restarting printer
  4668. Start printer at Tue Nov 18 21:00:06 2025 (1763499606.9 3821.9)
  4669. ===== Config file =====
  4670. [virtual_sdcard]
  4671. path = /home/klipper/printer_data/gcodes/
  4672. on_error_gcode = CANCEL_PRINT
  4673.  
  4674. [pause_resume]
  4675.  
  4676. [display_status]
  4677.  
  4678. [respond]
  4679.  
  4680. [gcode_macro CANCEL_PRINT]
  4681. description = Cancel the actual running print
  4682. rename_existing = CANCEL_PRINT_BASE
  4683. gcode =
  4684.  
  4685. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4686. {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %}
  4687. {% set retract = client.cancel_retract|default(5.0)|abs %}
  4688.  
  4689. {% set park_x = "" if (client.park_at_cancel_x|default(none) is none)
  4690. else "X=" ~ client.park_at_cancel_x %}
  4691. {% set park_y = "" if (client.park_at_cancel_y|default(none) is none)
  4692. else "Y=" ~ client.park_at_cancel_y %}
  4693. {% set custom_park = park_x|length > 0 or park_y|length > 0 %}
  4694.  
  4695.  
  4696. {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %}
  4697. SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout}
  4698. {% endif %}
  4699. {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %}
  4700. _CLIENT_RETRACT LENGTH={retract}
  4701. TURN_OFF_HEATERS
  4702. M106 S0
  4703. {client.user_cancel_macro|default("")}
  4704. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  4705.  
  4706. SET_PAUSE_NEXT_LAYER ENABLE=0
  4707. SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0
  4708. CANCEL_PRINT_BASE
  4709.  
  4710. [gcode_macro PAUSE]
  4711. description = Pause the actual running print
  4712. rename_existing = PAUSE_BASE
  4713. gcode =
  4714.  
  4715. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4716. {% set idle_timeout = client.idle_timeout|default(0) %}
  4717. {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %}
  4718. {% set restore = False if printer.toolhead.extruder == ''
  4719. else True if params.RESTORE|default(1)|int == 1 else False %}
  4720.  
  4721. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}"
  4722.  
  4723. {% if idle_timeout > 0 %}
  4724. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout}
  4725. SET_IDLE_TIMEOUT TIMEOUT={idle_timeout}
  4726. {% endif %}
  4727. PAUSE_BASE
  4728. {client.user_pause_macro|default("")}
  4729. _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams}
  4730.  
  4731. [gcode_macro RESUME]
  4732. description = Resume the actual running print
  4733. rename_existing = RESUME_BASE
  4734. variable_last_extruder_temp = {'restore': False, 'temp': 0}
  4735. variable_restore_idle_timeout = 0
  4736. variable_idle_state = False
  4737. gcode =
  4738.  
  4739. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4740. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  4741. {% set sp_move = client.speed_move|default(velocity) %}
  4742. {% set runout_resume = True if client.runout_sensor|default("") == ""
  4743. else True if not printer[client.runout_sensor].enabled
  4744. else printer[client.runout_sensor].filament_detected %}
  4745. {% set can_extrude = True if printer.toolhead.extruder == ''
  4746. else printer[printer.toolhead.extruder].can_extrude %}
  4747. {% set do_resume = False %}
  4748. {% set prompt_txt = [] %}
  4749.  
  4750.  
  4751. {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %}
  4752. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False
  4753. {% if last_extruder_temp.restore %}
  4754.  
  4755. RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }'
  4756. M109 S{last_extruder_temp.temp}
  4757. {% set do_resume = True %}
  4758. {% elif can_extrude %}
  4759. {% set do_resume = True %}
  4760. {% else %}
  4761. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  4762. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  4763. {% endif %}
  4764.  
  4765. {% elif can_extrude %}
  4766. {% set do_resume = True %}
  4767. {% else %}
  4768. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}'
  4769. {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %}
  4770. {% endif %}
  4771. {% if runout_resume %}
  4772. {% if do_resume %}
  4773. {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %}
  4774. {client.user_resume_macro|default("")}
  4775. _CLIENT_EXTRUDE
  4776. RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)}
  4777. {% endif %}
  4778. {% else %}
  4779. RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}'
  4780. {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %}
  4781. {% endif %}
  4782.  
  4783. {% if not (runout_resume and do_resume) %}
  4784. RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!"
  4785. {% for element in prompt_txt %}
  4786. RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}'
  4787. {% endfor %}
  4788. RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info"
  4789. RESPOND TYPE=command MSG="action:prompt_show"
  4790. {% endif %}
  4791.  
  4792. [gcode_macro SET_PAUSE_NEXT_LAYER]
  4793. description = Enable a pause if the next layer is reached
  4794. gcode =
  4795. {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %}
  4796. {% set ENABLE = params.ENABLE|default(1)|int != 0 %}
  4797. {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %}
  4798. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}"
  4799.  
  4800. [gcode_macro SET_PAUSE_AT_LAYER]
  4801. description = Enable/disable a pause if a given layer number is reached
  4802. gcode =
  4803. {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %}
  4804. {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined
  4805. else params.LAYER is defined %}
  4806. {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %}
  4807. {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %}
  4808. SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}"
  4809.  
  4810. [gcode_macro SET_PRINT_STATS_INFO]
  4811. rename_existing = SET_PRINT_STATS_INFO_BASE
  4812. description = Overwrite, to get pause_next_layer and pause_at_layer feature
  4813. variable_pause_next_layer = { 'enable': False, 'call': "PAUSE" }
  4814. variable_pause_at_layer = { 'enable': False, 'layer': 0, 'call': "PAUSE" }
  4815. gcode =
  4816. {% if pause_next_layer.enable %}
  4817. RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}'
  4818. {pause_next_layer.call}
  4819. SET_PAUSE_NEXT_LAYER ENABLE=0
  4820. {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %}
  4821. RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}'
  4822. {pause_at_layer.call}
  4823. SET_PAUSE_AT_LAYER ENABLE=0
  4824. {% endif %}
  4825. SET_PRINT_STATS_INFO_BASE {rawparams}
  4826.  
  4827. [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
  4828. description = Helper: park toolhead used in PAUSE and CANCEL_PRINT
  4829. gcode =
  4830.  
  4831. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4832. {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %}
  4833. {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %}
  4834. {% set custom_park_x = client.custom_park_x|default(0.0) %}
  4835. {% set custom_park_y = client.custom_park_y|default(0.0) %}
  4836. {% set park_dz = client.custom_park_dz|default(2.0)|abs %}
  4837. {% set sp_hop = client.speed_hop|default(15) * 60 %}
  4838. {% set sp_move = client.speed_move|default(velocity) * 60 %}
  4839.  
  4840. {% set origin = printer.gcode_move.homing_origin %}
  4841. {% set act = printer.gcode_move.gcode_position %}
  4842. {% set max = printer.toolhead.axis_maximum %}
  4843. {% set cone = printer.toolhead.cone_start_z|default(max.z) %}
  4844. {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch']
  4845. else False %}
  4846.  
  4847. {% set z_min = params.Z_MIN|default(0)|float %}
  4848. {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %}
  4849. {% set x_park = params.X if params.X is defined
  4850. else custom_park_x if use_custom
  4851. else 0.0 if round_bed
  4852. else (max.x - 5.0) %}
  4853. {% set y_park = params.Y if params.Y is defined
  4854. else custom_park_y if use_custom
  4855. else (max.y - 5.0) if round_bed and z_park < cone
  4856. else 0.0 if round_bed
  4857. else (max.y - 5.0) %}
  4858.  
  4859. _CLIENT_RETRACT
  4860. {% if "xyz" in printer.toolhead.homed_axes %}
  4861. G90
  4862. G1 Z{z_park} F{sp_hop}
  4863. G1 X{x_park} Y{y_park} F{sp_move}
  4864. {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %}
  4865. {% else %}
  4866. RESPOND TYPE=echo MSG='Printer not homed'
  4867. {% endif %}
  4868.  
  4869. [gcode_macro _CLIENT_EXTRUDE]
  4870. description = Extrudes, if the extruder is hot enough
  4871. gcode =
  4872.  
  4873. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4874. {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %}
  4875. {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %}
  4876. {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %}
  4877. {% set absolute_extrude = printer.gcode_move.absolute_extrude %}
  4878.  
  4879. {% if printer.toolhead.extruder != '' %}
  4880. {% if printer[printer.toolhead.extruder].can_extrude %}
  4881. {% if use_fw_retract %}
  4882. {% if length < 0 %}
  4883. G10
  4884. {% else %}
  4885. G11
  4886. {% endif %}
  4887. {% else %}
  4888. M83
  4889. G1 E{length} F{(speed|float|abs) * 60}
  4890. {% if absolute_extrude %}
  4891. M82
  4892. {% endif %}
  4893. {% endif %}
  4894. {% else %}
  4895. RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}'
  4896. {% endif %}
  4897. {% endif %}
  4898.  
  4899. [gcode_macro _CLIENT_RETRACT]
  4900. description = Retracts, if the extruder is hot enough
  4901. gcode =
  4902. {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %}
  4903. {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %}
  4904. {% set speed = params.SPEED|default(client.speed_retract)|default(35) %}
  4905.  
  4906. _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs}
  4907.  
  4908. [gcode_macro _CLIENT_LINEAR_MOVE]
  4909. description = Linear move with save and restore of the gcode state
  4910. gcode =
  4911. {% set x_move = "X" ~ params.X if params.X is defined else "" %}
  4912. {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %}
  4913. {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %}
  4914. {% set e_move = "E" ~ params.E if params.E is defined else "" %}
  4915. {% set rate = "F" ~ params.F if params.F is defined else "" %}
  4916. {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %}
  4917. {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %}
  4918. SAVE_GCODE_STATE NAME=_client_movement
  4919. {% if x_move or y_move or z_move %}
  4920. G9{ 0 if ABSOLUTE else 1 }
  4921. {% endif %}
  4922. {% if e_move %}
  4923. M8{ 2 if ABSOLUTE_E else 3 }
  4924. {% endif %}
  4925. G1 { x_move } { y_move } { z_move } { e_move } { rate }
  4926. RESTORE_GCODE_STATE NAME=_client_movement
  4927.  
  4928. [stepper_x]
  4929. step_pin = PD7
  4930. dir_pin = !PC5
  4931. enable_pin = !PD6
  4932. microsteps = 16
  4933. rotation_distance = 40
  4934. endstop_pin = ^PC2
  4935. position_endstop = 0
  4936. position_max = 235
  4937. homing_speed = 25
  4938.  
  4939. [stepper_y]
  4940. step_pin = PC6
  4941. dir_pin = !PC7
  4942. enable_pin = !PD6
  4943. microsteps = 16
  4944. rotation_distance = 40
  4945. endstop_pin = ^PC3
  4946. position_endstop = 0
  4947. position_max = 235
  4948. homing_speed = 25
  4949.  
  4950. [stepper_z]
  4951. step_pin = PB3
  4952. dir_pin = PB2
  4953. enable_pin = !PA5
  4954. microsteps = 16
  4955. rotation_distance = 8
  4956. endstop_pin = probe:z_virtual_endstop
  4957. position_min = -5
  4958. position_max = 240
  4959.  
  4960. [extruder]
  4961. max_extrude_only_distance = 100.0
  4962. step_pin = PB1
  4963. dir_pin = !PB0
  4964. enable_pin = !PD6
  4965. microsteps = 16
  4966. rotation_distance = 33.683
  4967. nozzle_diameter = 0.400
  4968. filament_diameter = 1.750
  4969. heater_pin = PD5
  4970. sensor_type = EPCOS 100K B57560G104F
  4971. sensor_pin = PA7
  4972. control = pid
  4973. pid_kp = 29.211
  4974. pid_ki = 10.819
  4975. pid_kd = 19.717
  4976. min_temp = 0
  4977. max_temp = 300
  4978.  
  4979. [heater_bed]
  4980. heater_pin = PD4
  4981. sensor_type = EPCOS 100K B57560G104F
  4982. sensor_pin = PA6
  4983. control = pid
  4984. pid_kp = 73.853
  4985. pid_ki = 1.901
  4986. pid_kd = 717.301
  4987. min_temp = 0
  4988. max_temp = 130
  4989.  
  4990. [fan]
  4991. pin = PB4
  4992.  
  4993. [mcu]
  4994. serial = /tmp/klipper_host_mcu
  4995.  
  4996. [printer]
  4997. kinematics = cartesian
  4998. max_velocity = 500
  4999. max_accel = 6000
  5000. max_z_velocity = 5
  5001. max_z_accel = 100
  5002.  
  5003. [bed_screws]
  5004. screw1 = 30.5, 37
  5005. screw2 = 30.5, 207
  5006. screw3 = 204.5, 207
  5007. screw4 = 204.5, 37
  5008.  
  5009. [display]
  5010. lcd_type = st7920
  5011. cs_pin = PA3
  5012. sclk_pin = PA1
  5013. sid_pin = PC1
  5014. encoder_pins = ^PD2, ^PD3
  5015. click_pin = ^!PC0
  5016.  
  5017. [bltouch]
  5018. sensor_pin = ^PC4
  5019. control_pin = PA4
  5020. x_offset = -45
  5021. z_offset = 2.540
  5022. speed = 10
  5023. samples = 3
  5024. probe_with_touch_mode = False
  5025. samples_tolerance = 0.1
  5026. sample_retract_dist = 5.0
  5027.  
  5028. [safe_z_home]
  5029. home_xy_position = 117, 117
  5030. speed = 25
  5031. z_hop = 5
  5032. z_hop_speed = 10
  5033.  
  5034. [bed_mesh]
  5035. speed = 25
  5036. horizontal_move_z = 5
  5037. mesh_min = 47,56
  5038. mesh_max = 190,210
  5039. probe_count = 5,5
  5040. =======================
  5041. Extruder max_extrude_ratio=0.266081
  5042. mcu 'mcu': Starting connect
  5043. webhooks client 548128632528: New connection
  5044. webhooks client 548128632528: Client info {'program': 'Moonraker', 'version': 'v0.9.3-125-g3129d89'}
  5045. Loaded MCU 'mcu' 138 commands (v0.13.0-403-gb4c7cf4a3 / gcc: (Debian 12.2.0-14+deb12u1) 12.2.0 binutils: (GNU Binutils for Debian) 2.40)
  5046. MCU 'mcu' config: ADC_MAX=4095 CLOCK_FREQ=50000000 MCU=linux PCA9685_MAX=4096 PWM_MAX=32768 STATS_SUMSQ_BASE=256 STEPPER_STEP_BOTH_EDGE=1
  5047. Sending MCU 'mcu' printer configuration...
  5048. Config error
  5049. Traceback (most recent call last):
  5050. File "/home/pi/klipper/klippy/mcu.py", line 935, in _send_config
  5051. self._serial.send(c)
  5052. File "/home/pi/klipper/klippy/serialhdl.py", line 266, in send
  5053. cmd = self.msgparser.create_command(msg)
  5054. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5055. File "/home/pi/klipper/klippy/msgproto.py", line 349, in create_command
  5056. cmd = mp.encode_by_name(**argparts)
  5057. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  5058. File "/home/pi/klipper/klippy/msgproto.py", line 179, in encode_by_name
  5059. t.encode(out, params[name])
  5060. File "/home/pi/klipper/klippy/msgproto.py", line 108, in encode
  5061. raise enumeration_error(self.enum_name, v)
  5062. msgproto.enumeration_error: Unknown value 'PA6' in enumeration 'pin'
  5063.  
  5064. During handling of the above exception, another exception occurred:
  5065.  
  5066. Traceback (most recent call last):
  5067. File "/home/pi/klipper/klippy/klippy.py", line 135, in _connect
  5068. cb()
  5069. File "/home/pi/klipper/klippy/mcu.py", line 970, in _connect
  5070. self._send_config(None)
  5071. File "/home/pi/klipper/klippy/mcu.py", line 946, in _send_config
  5072. raise self._printer.config_error(
  5073. configparser.Error: Pin 'PA6' is not a valid pin name on mcu 'mcu'
  5074. Transition to shutdown state: MCU shutdown
  5075. Dumping gcode input 0 blocks
  5076. Dumping 5 requests for client 548128632528
  5077. Received 3823.498587: b'{"id":547811727312,"method":"info","params":{"client_info":{"program":"Moonraker","version":"v0.9.3-125-g3129d89"}}}'
  5078. Received 3823.498587: b'{"id":547838850448,"method":"objects/query","params":{"objects":{"gcode":["commands"]}}}'
  5079. Received 3823.501719: b'{"id":547838219856,"method":"list_endpoints","params":{}}'
  5080. Received 3823.754648: b'{"id":547811727312,"method":"info","params":{}}'
  5081. Received 3824.006315: b'{"id":547954817872,"method":"info","params":{}}'
  5082. MCU 'mcu' shutdown: oids already allocated
  5083. clocksync state: mcu_freq=50000000 last_clock=179095401475 clock_est=(3823.708 179078342781 49997658.134) min_half_rtt=0.000054 min_rtt_time=3823.946 time_avg=3823.708(0.017) clock_avg=179078342781.122(854023.152) pred_variance=1846419677.527
  5084. Dumping serial stats: bytes_write=933 bytes_read=5276 bytes_retransmit=0 bytes_invalid=0 send_seq=115 receive_seq=115 retransmit_seq=0 srtt=0.000 rttvar=0.000 rto=0.025 ready_bytes=0 upcoming_bytes=0
  5085. Dumping send queue 100 messages
  5086. Sent 0 3823.520591 3823.520591 9: seq: 1f, identify offset=280 count=40
  5087. Sent 1 3823.521139 3823.521139 9: seq: 10, identify offset=320 count=40
  5088. Sent 2 3823.521683 3823.521683 9: seq: 11, identify offset=360 count=40
  5089. Sent 3 3823.522174 3823.522174 9: seq: 12, identify offset=400 count=40
  5090. Sent 4 3823.522638 3823.522638 9: seq: 13, identify offset=440 count=40
  5091. Sent 5 3823.523101 3823.523101 9: seq: 14, identify offset=480 count=40
  5092. Sent 6 3823.523573 3823.523573 9: seq: 15, identify offset=520 count=40
  5093. Sent 7 3823.524041 3823.524041 9: seq: 16, identify offset=560 count=40
  5094. Sent 8 3823.524520 3823.524520 9: seq: 17, identify offset=600 count=40
  5095. Sent 9 3823.525006 3823.525006 9: seq: 18, identify offset=640 count=40
  5096. Sent 10 3823.525477 3823.525477 9: seq: 19, identify offset=680 count=40
  5097. Sent 11 3823.525931 3823.525931 9: seq: 1a, identify offset=720 count=40
  5098. Sent 12 3823.526394 3823.526394 9: seq: 1b, identify offset=760 count=40
  5099. Sent 13 3823.526857 3823.526857 9: seq: 1c, identify offset=800 count=40
  5100. Sent 14 3823.527313 3823.527313 9: seq: 1d, identify offset=840 count=40
  5101. Sent 15 3823.527780 3823.527780 9: seq: 1e, identify offset=880 count=40
  5102. Sent 16 3823.528231 3823.528231 9: seq: 1f, identify offset=920 count=40
  5103. Sent 17 3823.528689 3823.528689 9: seq: 10, identify offset=960 count=40
  5104. Sent 18 3823.529194 3823.529194 9: seq: 11, identify offset=1000 count=40
  5105. Sent 19 3823.529671 3823.529671 9: seq: 12, identify offset=1040 count=40
  5106. Sent 20 3823.530136 3823.530136 9: seq: 13, identify offset=1080 count=40
  5107. Sent 21 3823.530589 3823.530589 9: seq: 14, identify offset=1120 count=40
  5108. Sent 22 3823.531048 3823.531048 9: seq: 15, identify offset=1160 count=40
  5109. Sent 23 3823.531527 3823.531527 9: seq: 16, identify offset=1200 count=40
  5110. Sent 24 3823.531996 3823.531996 9: seq: 17, identify offset=1240 count=40
  5111. Sent 25 3823.532457 3823.532457 9: seq: 18, identify offset=1280 count=40
  5112. Sent 26 3823.532920 3823.532920 9: seq: 19, identify offset=1320 count=40
  5113. Sent 27 3823.533444 3823.533444 9: seq: 1a, identify offset=1360 count=40
  5114. Sent 28 3823.533927 3823.533927 9: seq: 1b, identify offset=1400 count=40
  5115. Sent 29 3823.534392 3823.534392 9: seq: 1c, identify offset=1440 count=40
  5116. Sent 30 3823.534848 3823.534848 9: seq: 1d, identify offset=1480 count=40
  5117. Sent 31 3823.535291 3823.535291 9: seq: 1e, identify offset=1520 count=40
  5118. Sent 32 3823.535739 3823.535739 9: seq: 1f, identify offset=1560 count=40
  5119. Sent 33 3823.536202 3823.536202 9: seq: 10, identify offset=1600 count=40
  5120. Sent 34 3823.536647 3823.536647 9: seq: 11, identify offset=1640 count=40
  5121. Sent 35 3823.537155 3823.537155 9: seq: 12, identify offset=1680 count=40
  5122. Sent 36 3823.537669 3823.537669 9: seq: 13, identify offset=1720 count=40
  5123. Sent 37 3823.538137 3823.538137 9: seq: 14, identify offset=1760 count=40
  5124. Sent 38 3823.538611 3823.538611 9: seq: 15, identify offset=1800 count=40
  5125. Sent 39 3823.539068 3823.539068 9: seq: 16, identify offset=1840 count=40
  5126. Sent 40 3823.539539 3823.539539 9: seq: 17, identify offset=1880 count=40
  5127. Sent 41 3823.539993 3823.539993 9: seq: 18, identify offset=1920 count=40
  5128. Sent 42 3823.540445 3823.540445 9: seq: 19, identify offset=1960 count=40
  5129. Sent 43 3823.540924 3823.540924 9: seq: 1a, identify offset=2000 count=40
  5130. Sent 44 3823.541478 3823.541478 9: seq: 1b, identify offset=2040 count=40
  5131. Sent 45 3823.541942 3823.541942 9: seq: 1c, identify offset=2080 count=40
  5132. Sent 46 3823.542399 3823.542399 9: seq: 1d, identify offset=2120 count=40
  5133. Sent 47 3823.542851 3823.542851 9: seq: 1e, identify offset=2160 count=40
  5134. Sent 48 3823.543317 3823.543317 9: seq: 1f, identify offset=2200 count=40
  5135. Sent 49 3823.543764 3823.543764 9: seq: 10, identify offset=2240 count=40
  5136. Sent 50 3823.544217 3823.544217 9: seq: 11, identify offset=2280 count=40
  5137. Sent 51 3823.544667 3823.544667 9: seq: 12, identify offset=2320 count=40
  5138. Sent 52 3823.545186 3823.545186 9: seq: 13, identify offset=2360 count=40
  5139. Sent 53 3823.545709 3823.545709 9: seq: 14, identify offset=2400 count=40
  5140. Sent 54 3823.546161 3823.546161 9: seq: 15, identify offset=2440 count=40
  5141. Sent 55 3823.546608 3823.546608 9: seq: 16, identify offset=2480 count=40
  5142. Sent 56 3823.547059 3823.547059 9: seq: 17, identify offset=2520 count=40
  5143. Sent 57 3823.547533 3823.547533 9: seq: 18, identify offset=2560 count=40
  5144. Sent 58 3823.548015 3823.548015 9: seq: 19, identify offset=2600 count=40
  5145. Sent 59 3823.548467 3823.548467 9: seq: 1a, identify offset=2640 count=40
  5146. Sent 60 3823.548918 3823.548918 9: seq: 1b, identify offset=2680 count=40
  5147. Sent 61 3823.549420 3823.549420 9: seq: 1c, identify offset=2720 count=40
  5148. Sent 62 3823.549880 3823.549880 9: seq: 1d, identify offset=2760 count=40
  5149. Sent 63 3823.550348 3823.550348 9: seq: 1e, identify offset=2800 count=40
  5150. Sent 64 3823.550801 3823.550801 9: seq: 1f, identify offset=2840 count=40
  5151. Sent 65 3823.551244 3823.551244 9: seq: 10, identify offset=2880 count=40
  5152. Sent 66 3823.551687 3823.551687 9: seq: 11, identify offset=2920 count=40
  5153. Sent 67 3823.552151 3823.552151 9: seq: 12, identify offset=2960 count=40
  5154. Sent 68 3823.552623 3823.552623 9: seq: 13, identify offset=3000 count=40
  5155. Sent 69 3823.553296 3823.553296 9: seq: 14, identify offset=3040 count=40
  5156. Sent 70 3823.553827 3823.553827 9: seq: 15, identify offset=3080 count=40
  5157. Sent 71 3823.554303 3823.554303 9: seq: 16, identify offset=3120 count=40
  5158. Sent 72 3823.554778 3823.554778 9: seq: 17, identify offset=3160 count=40
  5159. Sent 73 3823.555236 3823.555236 9: seq: 18, identify offset=3200 count=40
  5160. Sent 74 3823.555724 3823.555724 9: seq: 19, identify offset=3240 count=40
  5161. Sent 75 3823.556209 3823.556209 9: seq: 1a, identify offset=3280 count=40
  5162. Sent 76 3823.556861 3823.556861 9: seq: 1b, identify offset=3320 count=40
  5163. Sent 77 3823.557370 3823.557370 9: seq: 1c, identify offset=3360 count=40
  5164. Sent 78 3823.557841 3823.557841 9: seq: 1d, identify offset=3400 count=40
  5165. Sent 79 3823.558296 3823.558296 9: seq: 1e, identify offset=3440 count=40
  5166. Sent 80 3823.558764 3823.558764 9: seq: 1f, identify offset=3480 count=40
  5167. Sent 81 3823.559213 3823.559213 9: seq: 10, identify offset=3520 count=40
  5168. Sent 82 3823.559670 3823.559670 9: seq: 11, identify offset=3560 count=40
  5169. Sent 83 3823.560131 3823.560131 9: seq: 12, identify offset=3600 count=40
  5170. Sent 84 3823.560610 3823.560610 9: seq: 13, identify offset=3640 count=40
  5171. Sent 85 3823.561108 3823.561108 9: seq: 14, identify offset=3680 count=40
  5172. Sent 86 3823.561574 3823.561574 9: seq: 15, identify offset=3720 count=40
  5173. Sent 87 3823.562028 3823.562028 9: seq: 16, identify offset=3756 count=40
  5174. Sent 88 3823.639932 3823.639932 6: seq: 17, get_uptime
  5175. Sent 89 3823.690808 3823.690808 6: seq: 18, get_clock
  5176. Sent 90 3823.741722 3823.741722 6: seq: 19, get_clock
  5177. Sent 91 3823.793348 3823.793348 6: seq: 1a, get_clock
  5178. Sent 92 3823.844237 3823.844237 6: seq: 1b, get_clock
  5179. Sent 93 3823.895007 3823.895007 6: seq: 1c, get_clock
  5180. Sent 94 3823.945749 3823.945749 6: seq: 1d, get_clock
  5181. Sent 95 3823.996447 3823.996447 6: seq: 1e, get_clock
  5182. Sent 96 3824.047432 3824.047432 6: seq: 1f, get_clock
  5183. Sent 97 3824.049048 3824.049048 6: seq: 10, get_config
  5184. Sent 98 3824.049387 3824.049387 6: seq: 11, get_clock
  5185. Sent 99 3824.053197 3824.053197 7: seq: 12, allocate_oids count=20
  5186. Dumping receive queue 100 messages
  5187. Receive: 0 3823.520689 3823.520591 49: seq: 10, identify_response offset=280 data=b'IT<\xef3\xb9\x1f\x87\xb2\xbdo\x16\x17!\n\xa7\xd9\x8a]\xa6\xe5b\x96\x90\x9d\xd0\x9bfe>\xe4Y\xcf\xf3\xf2!#&a\xab'
  5188. Receive: 1 3823.521249 3823.521139 49: seq: 11, identify_response offset=320 data=b'\xa9Gw\xa8\xa289\xa6[\\\xa4\x1b\x87\xd5\xe4U\xbb\xcbDcw\xadg\x8a\x1c\x07z\xab\x06\x83^3O~n:5\xc8\xfb\xe9'
  5189. Receive: 2 3823.521796 3823.521683 49: seq: 12, identify_response offset=360 data=b'd\x13\xd9%\x8e\xc3R\xec\xc4\x90WY;\x0e3\x82\xbb\xbc\x1a\xb9\xda"\xdf\xe6c5dv\xa0\xce\x0fY9\xf6\xf9\x00:\xa9\xf8\x0c'
  5190. Receive: 3 3823.522267 3823.522174 49: seq: 13, identify_response offset=400 data=b'Vn>\x19\xaco=I\xf1^\xe4\xd5\x8bg\xff\x92\x8a\x8a\xf7}\xdb{\\\x9f\x07\x8em\x0e:8\xb4\xdd\x84\x8bb\xc2v\xe8\xd8\xde'
  5191. Receive: 4 3823.522733 3823.522638 49: seq: 14, identify_response offset=440 data=b'\x97q\xbcZ\xdbez\xa9\xa5\xcf\xb8y(c\xfb\x94\xd8\xa7\xd4>\xad\xec\x13\xaf\xf2\x07\xab&p.N\xe6\xfb\xc3*8\x98%v\xb9'
  5192. Receive: 5 3823.523194 3823.523101 49: seq: 15, identify_response offset=480 data=b'\x00y\xef\xf3\xa6\xe1\x95\x92\nH\xcc\xcc!\x8b\xea\xb3;~7\x81\x08\x0bf\xce;\xf6\x86\x8b:\\n\xe2\xb5\x99\x1a\xd0\xacZ\xac\xd6'
  5193. Receive: 6 3823.523671 3823.523573 49: seq: 16, identify_response offset=520 data=b'\x16\xad*\x8b \r\xc2SX\x9bp\x8e\x95\xdd\x8ba\x0f*4\xdc\x1e\xe33\x1c&\xfe\x906p\xb4B\x86\xe5\xbd\xd3)\x99M\x1f\xb3'
  5194. Receive: 7 3823.524153 3823.524041 49: seq: 17, identify_response offset=560 data=b"\xe1\xa1S'\x0e\x88\xb0w\xd1\x99\x01\xe0\xd3\xe3\xe0\xb4\x97\x90\xad\xcc\xb6\xa2\x02M\xb4l\x9f\x87\x89\xa5\xaa\xbbq\x13&\xcb\x932pX"
  5195. Receive: 8 3823.524612 3823.524520 49: seq: 18, identify_response offset=600 data=b"\ro;q\xe0\xd5L7\x95\xd5I\xf1_\xe0e?\x82\xb3\x1b2\xd4.\xcf\xd6%\x87!80w\xaeIl'\xed\x8a|\x93\xae\x13"
  5196. Receive: 9 3823.525103 3823.525006 49: seq: 19, identify_response offset=640 data=b'o\xdf\xf8\x03^\xa7W\xfe\xc3\x9dq\xf1\x00.\xc1M\xab\r`?\xceM\x02F\x8el\xe2<tr\xee\xee\xeb\x13\x06\xf6\xff\xcc\x1e;'
  5197. Receive: 10 3823.525569 3823.525477 49: seq: 1a, identify_response offset=680 data=b'\x11\xa9\xcd\xe2zn\x83N\xf4fI\x9c@\xf2\x02\xe9\xa5>\ngy\xe0\x96\xe6\xac\xa1\x97\x1e\xc4\x1d\xcf\xf6b\xb7W\x04\xd1\xda\xc7\x07'
  5198. Receive: 11 3823.526023 3823.525931 49: seq: 1b, identify_response offset=720 data=b'\x9f\xb5\xab\xf8\t\x7fhaNU6\xc9\x84\xd2\xf8\xd7S\xc4\x1a\x94\xd5r\x87>\x03V\x8d&\xb4\xa8\xe4hw\x85\xb4v\x159\xdf#'
  5199. Receive: 12 3823.526501 3823.526394 49: seq: 1c, identify_response offset=760 data=b'\x87\xd5\xc6\xb9\x9eB\x9e0O&A\xab\xcd\xe3CSdS\xf3gE]fs\x8f\x90x\x92\x1a8^\xcc\x96ux\xd5v\xc5J\xd1'
  5200. Receive: 13 3823.526946 3823.526857 49: seq: 1d, identify_response offset=800 data=b'\x9bG\xbaV\x14\xb2\xc3\x1a+\xc9\xbdIC\xb7\xb1a\xcf\xfb\xba\x05\xa7\xd8\x9d\x94\xa8\x0fvBM\x9d/\x1c\xeab\xcc{\xab]\xfd!'
  5201. Receive: 14 3823.527408 3823.527313 49: seq: 1e, identify_response offset=840 data=b';r\xf9l\xb0\x83h,\x83\xa89m\xcd\xe9\xe8\xd0\xa3<\x9cX\x97g\x0b\x08*F0\xc1\x16B\x92\x8dy\x83Yv\xca\xfc\xe8|'
  5202. Receive: 15 3823.527870 3823.527780 49: seq: 1f, identify_response offset=880 data=b'\x02\x8b\x86w k\xfb\x92\xf7\xce\x98\xf0j\x08\r\xc2}/\x06~\x84\x81jO\x88\xc0\n\xafy\xbf\xe3M\xf1\x90\xe1M\x00L\xc0\x10'
  5203. Receive: 16 3823.528322 3823.528231 49: seq: 10, identify_response offset=920 data=b'\xdd\n\xd9\xbe\xad\xf9\xd1\r/\xf3\xba\xf3MH\xbf\xdb\xfb}\x1a\x01\x00\xeb\xee\x0e\xa3\xedZ\x19\xf7b\xb7\x03G\x05\x9b\x90-\xb9It'
  5204. Receive: 17 3823.528792 3823.528689 49: seq: 11, identify_response offset=960 data=b'Ufq\x15_\x00O\xf9\xc0\xad\x80\xd0\xdc\xb6\x02nn\xf0B\x19\xc9\x90\x15}Aw\xc8\xd9b\x07\x0eH\xf1\tB\xd6o\n\x07\xbc'
  5205. Receive: 18 3823.529290 3823.529194 49: seq: 12, identify_response offset=1000 data=b'\x1b\xbd\x8e\x1d\x9e\x02X\xf2\xd9B_f`\xa0\r8\xd2\xba\xb4\xb7<>\x93\x9c\xd3`\x86\x86G\xc0\xbc\x18D\xa3\xc1q\xa8[\xeb\x9f'
  5206. Receive: 19 3823.529766 3823.529671 49: seq: 13, identify_response offset=1040 data=b'Fp\xb0\x0czb:L\xadO\\\xd9"\xc3\xb1\xac\xe2:2\xd9\x10"\xfaY\xf0\x9f\xbe\x17W\xee\x14|0\x08\x0b\x7f\xf1\x9c\xb9$'
  5207. Receive: 20 3823.530233 3823.530136 49: seq: 14, identify_response offset=1080 data=b'\xa5\x8f\x03G%\xef}B0Qk\x96e\xee)\xb0g4\x93\xa9\xd2\x98\xa6\xd2Z5\x17D\x0c\x82\x10%o\x06\xb1\x85\xc0p\xbb\x85'
  5208. Receive: 21 3823.530684 3823.530589 49: seq: 15, identify_response offset=1120 data=b"\x15\x95y\xdb\xc8\x03817'\xc0\xc6G\x14l\xd8\xc3\x82\xfb\xb6*\xd5\xcb\xd3*\xc3(\xb8\xf1Th\x03L\xcc%\xed/\xf37'"
  5209. Receive: 22 3823.531154 3823.531048 49: seq: 16, identify_response offset=1160 data=b'|,\xb2E=\x02\xa7\xa8o\x9d\xd5\xf1\x9a\xa7\xd4\xf7<\\\x1f#\xe2\xb9@\x90\xbcsn(\xdf\xf2\xe1\x81\x0cJ\xe2\x85\xfa\xe2\x99\x98'
  5210. Receive: 23 3823.531621 3823.531527 49: seq: 17, identify_response offset=1200 data=b'\x0f\xe6\x07\x1c\x1c\xf2^\x1b\x9eT\xafz3\xbb>\xaf\x15\x93\xea!\x03\xdfi\xacS \x0f`(\xe6\x86Wjm\xd9KB\x0f2v'
  5211. Receive: 24 3823.532092 3823.531996 49: seq: 18, identify_response offset=1240 data=b"\xa5c\x9dR\x82\xfd\xe8\x1dv\x02~\x82\xf68\x8b\xd3'r\x02\xed\x8egxJ&\xa3\xbbK\xd6\xdeD\x93\xc0}6Q\xba\x9e\xe1\xcd"
  5212. Receive: 25 3823.532548 3823.532457 49: seq: 19, identify_response offset=1280 data=b"'JW\x16a\x1e\xdb\xffC\xe7U;\xe7\xa5\xe3\x01\xf7\xa6\x8e\x0c\xe23^|\xf6b\xeb(0<\xcc\x12\x02\xcbA\xd7\xc2\xc9\xcf\xd7"
  5213. Receive: 26 3823.533049 3823.532920 49: seq: 1a, identify_response offset=1320 data=b'\xf7\xee\xbd\xc4L0\x0b\xea\x1f\xd1C\x8fE\xe1s\xa8Nzi\xe6\x9a\x04\xd5\xf3\x03\x9ab\xcd\xa5\xba\xda\x18\xf0<\x82\x9e\xcd\xb3Z\xcd'
  5214. Receive: 27 3823.533555 3823.533444 49: seq: 1b, identify_response offset=1360 data=b'\x11\x8f\xa6J\r\xc6,\xca\x9es\xb4\x9e\xe1)\x03\x9e\xd9\xd2\xda\xf25\r\xa8\xe7\\\x05S\xb4#\x9e\xec\xeeg\xb1\xf1|\x9ex\x86w'
  5215. Receive: 28 3823.534024 3823.533927 49: seq: 1c, identify_response offset=1400 data=b'4\x91U\xe3\xa3H\xed\t\x17\x02\x81\x99\xd8\x92\xeal\xec\n4\xf3LH\xb0c+\xe0S\xc1\xcb\x9f\xeb\xc7D\x83\xe9\x05\x82&\xb8K'
  5216. Receive: 29 3823.534488 3823.534392 49: seq: 1d, identify_response offset=1440 data=b"KO\x81S\xd2\xbf\x91\x9fJR\xed\x1a\xad\x1f\xe4\x07\x96D\xc7\xf8'I\xac\xe5\xa0b\x86\x96b\x1a\xa4\x9f\xc2\x8ec\x83\x8c1\x1ds"
  5217. Receive: 30 3823.534939 3823.534848 49: seq: 1e, identify_response offset=1480 data=b'\xd9\x15\xef)\x8c1\x17\xcc^]V\xf0\x0b\xba\x8f+PB\xa2\x02A5\xef|\x11\xc0\x82\xc3G\x1c\x7f\xab\xb3D\x1c\xb6\x17\x1d!)'
  5218. Receive: 31 3823.535382 3823.535291 49: seq: 1f, identify_response offset=1520 data=b'\xb6U&a\xe7\x9c\xa4\x15@\x94\x12Q\xc3\x0f\x9a\x05\x08U\xed\x8d)z\x8af\x02B\xf2\xc5\xf6\xf7\xf3"\x94\xa7f\xd1H\xf3Or'
  5219. Receive: 32 3823.535844 3823.535739 49: seq: 10, identify_response offset=1560 data=b'\x1d\x90)\x12\xb8T\x11i)\xf50,6~\xe2\x02\x02\xe6\xdb-\xe6\xb9\x19\x04\xb2:\x95\xc12\xc9l\nM\xe2\xca\x10\xea5\x13\xe5'
  5220. Receive: 33 3823.536293 3823.536202 49: seq: 11, identify_response offset=1600 data=b'A\xa7\xa6Ku\x93\xb52\xd0\xbf\xa1\xfe\x8d\xf4oL~\x0b\xc3\xe0\xf9\xd4\x9e\xed\x1fM\x8c0\x9a\x1a\x9f\x02=\t\n\xd7\xe5EX\x86'
  5221. Receive: 34 3823.536737 3823.536647 49: seq: 12, identify_response offset=1640 data=b"\xda:w\xec\xee\xb1MDx\xdeM\xe8A\xa3\xd8@'!\x17\x0e\xe9\x90\xabnK\xee\x85^@\x92:\x92i\xbcU\x0b\xd9\x9a(\xab"
  5222. Receive: 35 3823.537261 3823.537155 49: seq: 13, identify_response offset=1680 data=b'n\xa58\x95*\x99\xe9\xe6\xa9K\xaa\xd9||#\x11\x98!%cO\xc5\xb4\xc9z\x8au:\xa4MV\x88\xa5\xd2\xae\x0c\xe3f\xb8\xfe'
  5223. Receive: 36 3823.537761 3823.537669 49: seq: 14, identify_response offset=1720 data=b'\x85w\xb4\xa0\xdf\x1b\x87\xa0\xa2u\xf4\x08\x14~\x9c\x0c\xb4\x80\x02\x16\xd6I\xd3D\xd6*\x96\xb4\xb1.\xc5!p\xfe\x9a\x1a\x85\xa8C\xad'
  5224. Receive: 37 3823.538241 3823.538137 49: seq: 15, identify_response offset=1760 data=b'\x13\xe6\xbbvx\x83\x9f\x8c\xf1\xae\xedu&@\x1eQ\xbd[C\xe0\x87N@\xe0\xe4\xe7\x1d\x1b;\xd3l\x17>\x12\x08\x85\xa2\xa2S\xbe'
  5225. Receive: 38 3823.538702 3823.538611 49: seq: 16, identify_response offset=1800 data=b'\xd1s\x18\xf1\x17\x93\xe0ay\xf7\xf2\xd5U\xf6\xfe\xf2W\x0c\x8f1)\xbf\xfa\xe1\xa7\xab\xef\xb3\xef>\xbe\xfe\x197J\x7fg\x8b\xf7W'
  5226. Receive: 39 3823.539156 3823.539068 49: seq: 17, identify_response offset=1840 data=b'\x9f\x16\x17\x8bJ4\xe3aq\xb6\xf8pu\xa9\x1c\x82!\x03\x8d\xfa\xf0\xcb{z\x8d\xc2\x15FB\xd77\x977\xd7\xd9\xf5\xa7\xf7\xd7?'
  5227. Receive: 40 3823.539631 3823.539539 49: seq: 18, identify_response offset=1880 data=b'g//\xaf_c\xee\x94\xe2\xf0\xeb\x0f\x1f^\x7f\xcc\xf07{\xf9\xd3\xcd\xdb\xec\xf5\xab7\x00\x0c\xbe`b5B\xaa\xa7\xca\x19\xaa\xee'
  5228. Receive: 41 3823.540082 3823.539993 49: seq: 19, identify_response offset=1920 data=b'\xec\xd7\x9b\xf0\x1d"{\x15\xa2\x83\x9a-.\x96_(\xd4\x07$\r{\xbe\\\\\xfcgy\x16$\xbf\x01hR\x9bB\x84\x1f\xde]\x87'
  5229. Receive: 42 3823.540555 3823.540445 49: seq: 1a, identify_response offset=1960 data=b'\xaf~\x01\xba3|\x8c^\xbd\xa55A\xabU\x89[\x05d8\x81\xda\xcd\xfa7H\xc7:\xd1\xd2\x8c\xe1\xda\xbc\xe3\x8c\xcbo\x1f\x83\x04'
  5230. Receive: 43 3823.541081 3823.540924 49: seq: 1b, identify_response offset=2000 data=b'\x16\x02\xe33Xha\tD\x19SXdakH`\xa6\xb0\xd8\xc2\x82\x00\xc2\xdf)0q\xc08\x9es\x93:\xe0*\x9c\xb3\xb3r'
  5231. Receive: 44 3823.541574 3823.541478 49: seq: 1c, identify_response offset=2040 data=b'\xac.\x839?k\x07\x8c\x96\x86!p\xdd\xb4{x@P\x9a$\xe0H\x82\xd4\x81\x02\x0f\x04\xac\xfa\xa0\xd0\x03\x81r\xf8\xa0\xc8\x03A'
  5232. Receive: 45 3823.542036 3823.541942 49: seq: 1d, identify_response offset=2080 data=b'(\xee\x83b\x07JA\x07}P\xe2\x81\x82)\x1b\xa9\x07\x8a\xa6l\xac<P\xac\xd8\xf82\xf1\xc1ZU\xf2 \x8a"\xa5)\xb9L\x96'
  5233. Receive: 46 3823.542489 3823.542399 49: seq: 1e, identify_response offset=2120 data=b'\xf1\xaaTZW\x0f\xe9:HU\xf9\x01\x1f\xc3T\xaa4}\xa8x\xb2\x0c\xc2[\xd0o=\x99\xd6Hx,\xf9\xdd\xd2h%\xb2AC'
  5234. Receive: 47 3823.542957 3823.542851 49: seq: 1f, identify_response offset=2160 data=b'\x81\x1aBk\xf0\x06C5\x98\x04\xa1?\x18\xa9\xc1\x95\x91\x18\r\xc6j0X\x86\xb1?\x9a\xd0h\xb8\x9e,\x95\xd2\xa8=)\x1a]\xd1'
  5235. Receive: 48 3823.543406 3823.543317 49: seq: 10, identify_response offset=2200 data=b'(\xf8X#\x02\xb8\x96\x04\xfa\xa8^4\x90\x95\x94\xda+0\xe5=\xb6\x94IP\xa1\xfd\xb2\xaa\x986~s\xf5KV\x8fr`\xfb\x1c'
  5236. Receive: 49 3823.543861 3823.543764 49: seq: 11, identify_response offset=2240 data=b'.g\x88\xfb0c\xe0\xfe\xcdNW\xc3e\xa5\xda!\xcc\x14GJ\x8a[\xae\xf2\x865\xed\x007&\xfc\xb7[\x88\x0c\xeek"f\x8a'
  5237. Receive: 50 3823.544309 3823.544217 49: seq: 12, identify_response offset=2280 data=b'\x98\xdd\xef\x05<\x93W\x93\xac\x03\xbf\x0c,R`\x04\xb4_\r\x18\x880)v0+\xac\x9e\x0fLH\x96\xeb\xb5(b\xa0\xa2\x8dF'
  5238. Receive: 51 3823.544760 3823.544667 49: seq: 13, identify_response offset=2320 data=b'\x96\x88\x8a\x1e\x91JK4\xaa\xe20\x15\xed\xc2r\xbca\xa6\x9eg\xe9!\x92\xb8\xa2~\x18\xeb\xf2^\x02H%\xe1\xaajc\x00=\x87'
  5239. Receive: 52 3823.545310 3823.545186 49: seq: 14, identify_response offset=2360 data=b'\x18P\x0e\xaa\xa7u\xd5\x8eUI\xfbRn\xff\xd5u\xb0~\t\x99\x12\xb2\x05\xc4X?\xc8K\xca<\xff\x12*\xfb\x1a\xbcu\t!\xa5'
  5240. Receive: 53 3823.545799 3823.545709 49: seq: 15, identify_response offset=2400 data=b'\x18\xbe\xa1\x86\xda_$\xab\xc7\x81\x1f,\x1d\x9c\x9f\xc1\x9b\x9e,\x16x\x0c\x04\xae>\xd9\xf6\x10\x02\x96Z4\x1d-\xcd\xa80\x85\xc9\xd8'
  5241. Receive: 54 3823.546251 3823.546161 49: seq: 16, identify_response offset=2440 data=b'k\xdc<\x83kw\xc0\xb2_\xdd\x02\x1bm#\xf4\xc5g\xf0"\x83\x07\x972yWF\xbb\xc6\x1e\x01A\xf0\x1dg\x98.M\xbd\x92\xef'
  5242. Receive: 55 3823.546699 3823.546608 49: seq: 17, identify_response offset=2480 data=b'\xa8Pm"6\xd1\x94\xb0\x91*\xefwjw\xa05~\xed\x9a\x1a]\xdf\xb5}\xc1m\xb5\x98\xe9\x0e&\xf5\xb5\xde|x\xf7\x13C\x17'
  5243. Receive: 56 3823.547151 3823.547059 49: seq: 18, identify_response offset=2520 data=b'\xc0@\xff\x05\xa0\xa1\xe8\xb6\x10\x96\x97\x94@\xbe\xfd\x15\xf3O\xec\xe6|\xab\xd5z""\x16\x9c\xc7\xd4\x8d|\x17^\xb1\x1f/\xaf\xbe\xa7'
  5244. Receive: 57 3823.547645 3823.547533 49: seq: 19, identify_response offset=2560 data=b'L\x1a\xdf\xe0\xa2\xfbxc\xc6\x96\xfe\xd8\xc7\xd7\x97\xaf4\x00\xefo\x04\xdcP\xa8@\xa1\xc1;Jn\xbc\xfdc[\x8c\x89\xf2\x0c3\x06'
  5245. Receive: 58 3823.548109 3823.548015 49: seq: 1a, identify_response offset=2600 data=b'}\xbe-\xe8\xbcj\xd0jiQ\x9a\xf5\x04\xa9\xb2F\xa4\x04\x9d\x19`C\xec\xabo\xbf\xa2\x94\xd5\x10\x99\xae\xa1k~R\x86B\xd1\xa4'
  5246. Receive: 59 3823.548558 3823.548467 49: seq: 1b, identify_response offset=2640 data=b'\xc1r\xf2\xf3\xc7\x00\rm\x00l\x1c\x8e\x87\n\xd6\x06X\xb7\xe0\x01\xb4\x190l\xc3`\xa4\xe1\xc0\xb6ic\xdb4T0<\x82\xeb\xc2'
  5247. Receive: 60 3823.549044 3823.548918 49: seq: 1c, identify_response offset=2680 data=b'\x8e]?\xf2X\x07\xcbe\xe4\xa6\xb1\x84lFM\xeb\xc6\x1e]O\xd1\x0e\xc5\x89s,\x03\xf2\xd6\xc6^\x87\t\x88\xc2\xd5d\\g\xca'
  5248. Receive: 61 3823.549516 3823.549420 49: seq: 1d, identify_response offset=2720 data=b'Jwh\xe5\xd8\xe3g\x92\xe8\xfa8\xa0\x1c\xef\xf3\x03*\xd0\xda\xc8\x9b"\xef\xf7\\\xca\x1c4\x8a7\x05D\xd2\xc6\x91 @H\xc9a'
  5249. Receive: 62 3823.549989 3823.549880 49: seq: 1e, identify_response offset=2760 data=b"\xc9b\xcf\xcb\xb1B\xbb\x00bL\xcf\x98\x0e\xe6\x94F\xf2;\x8e\x07\x85\x99\xd9\xe3\x04\xfb\xbc/\x95'\xd5\xd8\xd8/y\x1c\xdb\xc8E#"
  5250. Receive: 63 3823.550439 3823.550348 49: seq: 1f, identify_response offset=2800 data=b'c\xb5\xf8=\x1e\xa5\xcai\x19<\xf5\xdb\xaa\xbd\xa74\xfa#\xd7\x13\xc0Th\xe8\xbd\xf2\x0c\xe0\xf5\xbb\x1c}\x1f\x16\x87\xaeU!P\xdb'
  5251. Receive: 64 3823.550892 3823.550801 49: seq: 10, identify_response offset=2840 data=b'M\xcf\xf1+\x05\xf4\xf6\xd8i\xbb\xb6\xb4G[b\xf7\x02\xae\x16~(8@\xfd\xc6\x16\x85\xf2\x8er\xc2\xed\x13T\x98GxTF\x18'
  5252. Receive: 65 3823.551334 3823.551244 49: seq: 11, identify_response offset=2880 data=b'OP`\xc2x\xcd\x07}\\jG\x88!\xea\xb16c\xc6Lp\x9b\xd6\xcf\xe0\xf7\x010\x99\xba:\x94G\xf6?\x15\xb8\xd6w\xc9\xd0'
  5253. Receive: 66 3823.551782 3823.551687 49: seq: 12, identify_response offset=2920 data=b'\xb6l\x9b+q\x91\xa8\xb0Sp\xe3k\x8fv\xdd\xaa\xc9G\xa5\xea\x1b%`\xa4\x04\xcf*\xb9\n=n\xe0\r\xcc\xe2\x01\x8b\xea\xda\x97'
  5254. Receive: 67 3823.552256 3823.552151 49: seq: 13, identify_response offset=2960 data=b'IjO[\x08*\xb3\x85`y\xe9S\x93\xdf\xe2\x85\xdaj\x1dW\xd2 \x0c\xaa\x1b9\x04P\x128s\x9c\x01B\xc1\xa1\xa2\x8e\x92\x03'
  5255. Receive: 68 3823.552717 3823.552623 49: seq: 14, identify_response offset=3000 data=b'+g4\xf7\xa5\xd4\x9e\x9e!\xe5e\xe1\xc0\xd11X_g6\x980\xb8ip\x84\xebvJM\xe09\xd8\xe7\x08\x14\x9bS\x1do\x86'
  5256. Receive: 69 3823.553411 3823.553296 49: seq: 15, identify_response offset=3040 data=b'\x85\x8av\x84\xb6:Bs\xb2\xa3\xca\x9b\x03c\x88p\xfd\xe1\x9d\xca\x7f\xa9\x94{\x0c\x93\x1dGUO\xd7s`\xd36\xe7\xb7x;*'
  5257. Receive: 70 3823.553927 3823.553827 49: seq: 16, identify_response offset=3080 data=b"\xbb\x9b.\x83\x9f|8l\xed\xfc\x8cX\xb4\xafJ'\x87D\xdd\r\x9c\x1a\x13\xa1\xd4|_\x03\xf9\xce\xd8|\x06\x05\x82\x88\xa9\xa4\xcf/"
  5258. Receive: 71 3823.554410 3823.554303 49: seq: 17, identify_response offset=3120 data=b'\xbcq\xe9\x00 \x1drj\xfa\xaeG\x9f\r\xf9\xa6d\x85d*\x1f\xc2\xcf^0\xf9B_\xa6\xc4?6r\xec0GEz\xacw9'
  5259. Receive: 72 3823.554875 3823.554778 49: seq: 18, identify_response offset=3160 data=b'(9B\xaa\xd8\xd8Q\xdc\xdf\x94f\xd6\x99\x06!T\x10\xa0\xdd\x01KjW\x14wY\xc3\xd9`\x17\xed\xc0\xcb\xac\x1e\xab\x0b\xcf\x05a'
  5260. Receive: 73 3823.555328 3823.555236 49: seq: 19, identify_response offset=3200 data=b'gr\xd63\xc0\x80\xcf2\x81\r\x02<\xa0\x8a\xcd\x98\x83q\xf5\xe9\x91\r\r\xf5\x07I%5+%\xf6\x84\xf0\xe6 \x9fV\x00Xq'
  5261. Receive: 74 3823.555820 3823.555724 49: seq: 1a, identify_response offset=3240 data=b'\xed\x97y\x94mw=\xa8I\x0f\xee\r\x95W\x98HV\xd5\x03t\xbfU\xd5+\xd0fU\xb0B\x9d\xe8I\xdf\xc3\x07b\x8f\xe2D\xc6'
  5262. Receive: 75 3823.556319 3823.556209 49: seq: 1b, identify_response offset=3280 data=b'\x8e+\xd1\xfd\x82\xadm\x1d\x87\x92?\xc6:\x05D\xecG\xed_\x0c\xd9!\xfd\x8e\x82u\x92\xa8\xd4E\xbf\xa4*w\xa1\x974Q.\t'
  5263. Receive: 76 3823.556970 3823.556861 49: seq: 1c, identify_response offset=3320 data=b'^\xd2t\x05\xcf\xd1\x17\x95(\x17\xa0\x05@\xbf\xc0O\xc2\xde|\xf8\xe1.Z\xa8\xd2$\xc4}\x92K\x97\x1cg\xa2\x99V\xb9T\xe9\xf0'
  5264. Receive: 77 3823.557471 3823.557370 49: seq: 1d, identify_response offset=3360 data=b'd\xf9\xd4\xfbjkB\x91{\xad\x08\xaa\x85Q5\xe7\x1c\xdb\xde*xt\xb5\x93\xf3\xc0\xf6\xc2\x19\xe6\xf2\xeaI\x95WT;\x15\xc7\x8c'
  5265. Receive: 78 3823.557933 3823.557841 49: seq: 1e, identify_response offset=3400 data=b'\xbe\xa8\xd2\x15(If\xeb\xacH\xae>EQ-\x8e\xa7\xd8\xd6$\xfa!s\xeb\x07\x18\xa1\x99&\xb6\x04\x9fl{\xd2\xe7\xaa\xbdM\xcd'
  5266. Receive: 79 3823.558402 3823.558296 49: seq: 1f, identify_response offset=3440 data=b'\x0f\x03{J$\x82|:\xcd\x1ay\r\xe4\t[\xfb\xb6\x06\xe7p<\x89\xdf\x9f\x86\xb5\xd7\xae\x15\x9b\x99C\xf2:\x02\xea]\x0b5v'
  5267. Receive: 80 3823.558853 3823.558764 49: seq: 10, identify_response offset=3480 data=b"\xcdN\x0f\xd5v=\xa9\x98\xf6\x1cQ\xb1-\xea\xc4\xc9\xe6\xe9\xa0\x91\xe8\xcauG\x8f\xfa\x1d\x1e\xffF\xdb=YF'z\x9e\x13jX"
  5268. Receive: 81 3823.559304 3823.559213 49: seq: 11, identify_response offset=3520 data=b'\x9e&0\xe5-\x7f"\xafj\x8d\x01\xaa\xed\x00Ne/\xc7\xa2P}`\xf5\x05\x19\xe4\xfc\xed\xe4\x9b\x84\xf3@\x15\xb3\xd1\xe1A\x86^'
  5269. Receive: 82 3823.559760 3823.559670 49: seq: 12, identify_response offset=3560 data=b'}\x9e\x14\x16%F\xadM\xc1g-\xc4 \x8a\xa64\x93\x96\x8ak\x06\xe8\xa6\x87)\xdfQM\xdd\x9f\xf2v\xdcn9\x04\t\xd4_\x83'
  5270. Receive: 83 3823.560235 3823.560131 49: seq: 13, identify_response offset=3600 data=b'$\x14|^f\xdc\x9a$\xf9\x06\xaa`\xed\xa2\n\xd3\x10|\xe40\xd2S\xd5\xe3#\x95\xf0\x9b.\x9en\x04\xa6\xf8\xfc(\xe1L\x97T'
  5271. Receive: 84 3823.560708 3823.560610 49: seq: 14, identify_response offset=3640 data=b'\xe9\x16\xdc\x9bJ@\xce\x835\xd5\x0c\xa43\x1f9\xd6\xfaG\xfe\xae\xad$q\x15\xd8Yy\x96\xba\xb5X\x04\xdf\xcc\\\xd9_0\xa7\xd1'
  5272. Receive: 85 3823.561205 3823.561108 49: seq: 15, identify_response offset=3680 data=b'\x98\x13\x16\x03U]T\x17m\x8f\xb7\x80\xe5Z\xc5~\xe8\xd7a\x9d\xd6\x15ysJ\xdf\x8e{\xeb0\x85\xaa\xad\xaa\x1a\x01}\xfc4N'
  5273. Receive: 86 3823.561666 3823.561574 45: seq: 16, identify_response offset=3720 data=b'|\x15VT\xf5\xf7\xb8\xe0I\xef\x96\xcf\x83\xe8\xf9\xf2<^F\xe7\xbb\xdb\xb8X\x15\xdb8\x8f\x16_\xfe\x07\xc3$\x9c{'
  5274. Receive: 87 3823.562131 3823.562028 9: seq: 17, identify_response offset=3756 data=b''
  5275. Receive: 88 3823.640127 3823.639932 12: seq: 18, uptime high=41 clock=2981263710
  5276. Receive: 89 3823.690946 3823.690808 11: seq: 19, clock clock=2983805038
  5277. Receive: 90 3823.741874 3823.741722 11: seq: 1a, clock clock=2986351113
  5278. Receive: 91 3823.793520 3823.793348 11: seq: 1b, clock clock=2988933615
  5279. Receive: 92 3823.844358 3823.844237 11: seq: 1c, clock clock=2991475678
  5280. Receive: 93 3823.895149 3823.895007 11: seq: 1d, clock clock=2994015053
  5281. Receive: 94 3823.945857 3823.945749 11: seq: 1e, clock clock=2996550702
  5282. Receive: 95 3823.996578 3823.996447 11: seq: 1f, clock clock=2999086676
  5283. Receive: 96 3824.047577 3824.047432 11: seq: 10, clock clock=3001636420
  5284. Receive: 97 3824.049238 3824.049048 10: seq: 11, config is_config=0 crc=0 is_shutdown=0 move_count=0
  5285. Receive: 98 3824.049691 3824.049387 11: seq: 12, clock clock=3001742339
  5286. Receive: 99 3824.053437 3824.053197 12: seq: 13, shutdown clock=3001926360 static_string_id=oids already allocated
  5287. Reactor garbage collection: (3824.006691457, 0.0, 0.0)
  5288. gcode state: absolute_coord=True absolute_extrude=True base_position=[0.0, 0.0, 0.0, 0.0] last_position=[0.0, 0.0, 0.0, 0.0] homing_position=[0.0, 0.0, 0.0, 0.0] speed_factor=0.016666666666666666 extrude_factor=1.0 speed=25.0
  5289.  
Advertisement
Add Comment
Please, Sign In to add comment