Giter Site home page Giter Site logo

colinrgodsey / step-daemon Goto Github PK

View Code? Open in Web Editor NEW
98.0 17.0 8.0 4.58 MB

stepd - External planner and stepper for 3d printing

License: GNU General Public License v3.0

Scala 24.94% Python 13.24% CSS 0.06% JavaScript 1.39% Go 56.90% Less 0.06% Jinja 3.42%
3d-printing cnc

step-daemon's Introduction

Build Status

Step Daemon

Step Daemon (stepd) is an external planner for 3d printers that utilizes Marlin compatible firmware to allow direct step processing by an external computer and enables the use of complex pre-processing. By offloading the planning we are able to optimize the G-code pipeline so that you can reach maximum speed, with advanced features, on even the most complex shapes, without stutter or slowdowns. All this can be achieved with three simple pieces of hardware you probably already have: a Marlin compatible control board, a Raspberry Pi, and a USB cable.

Step Daemon utilizes mostly 64-bit double precision linear algebra and vector math from top to bottom, with some 32-bit single precision floating point used in hot spots where precision can be leveraged safely.

  • Low RAM: less than 64mb.
  • Low CPU: runs at about 5% total CPU on a Raspberry Pi 3.
  • Multithreaded pipeline.
  • Bicubic bed leveling with per-step accuracy (vs per-line).
  • OctoPrint compatible.
  • Developed alongside the direct stepper chunk support for Marlin.
  • Works with Linux (including RPi and other ARM machines), MacOS, and Windows.

Dependencies

  • Go (1.11+) must be installed from a system package or manually.

Marlin Configuration

  • Update with current compatible branch.
  • Only XYZ cartesian builds currently supported (no core or delta support yet).
  • Baud rate of 250kbps or 500kbps suggested for 16MHz devices.
  • Enable DIRECT_STEPPING and ADVANCED_OK.
  • Disable LIN_ADVANCE if enabled.
  • (Optional) Enable AUTO_BED_LEVELING_BILINEAR for bed leveling
    • Bilinear is the only supported mode currently.
    • Must be at least 3x3 sample points.
    • MM mode supported only (no inch mode yet).
    • Bed leveling results are retained locally as bedlevel.json.

Configuration

  • Modify config.hjson settings as needed. Units are in mm.
  • Baud rate should match value configured in Marlin.
  • Page format should match the format configured in Marlin (defaults to SP_4x2_256).

Usage

  • Pipe a gcode file directly to the server:
cat print.gcode | go run ./cmd/stepd -device /dev/ttyUSB0 -baud 500000 -config ./config.hjson | grep -v "ok"
  • Or use the Step Daemon OctoPrint plugin. Plugin can be installed from this URL:
https://raw.githubusercontent.com/colinrgodsey/maven/master/step-daemon/octoprint-plugin/latest.zip

step-daemon's People

Contributors

colinrgodsey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

step-daemon's Issues

SBT Error

Hello when trying to run sbt fro cloned repository I get the following error:

The java installation you have is not up to date
requires at least version 1.6+, you have
version 11.0.7

pi@octopi:~/ss/step-daemon $ javac --version
javac 11.0.7

Dont have anything special on this Octopi, just a few plugin.

'[Errno 32] Broken pipe' Error on latest Marlin build

Hello,

Previously i had marlin 2.0.7 installed and got the same error output as on issue #13.
Thinking that a marlin update would solve the issue (is that the conclusion?), i went to update marlin to 2.0.7.2.

However when trying to connect now, i always get the error pasted below.
Do i have to use a specific version of marlin?

Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 1 port/baudrate candidates: /dev/ttyACM0@250000
Trying port /dev/ttyACM0, baudrate 250000
Connecting to Step Daemon
Handshake attempt #1 with timeout 2.0s
Connected to: <octoprint_stepd.StepdService.StepdService instance at 0x677ca558>, starting monitor
Recv: warn:failed to load ./bedlevel.json: open ./bedlevel.json: no such file or directory
Send: N0 M110 N0*125
Recv: info:config processed
Handshake attempt #2 with timeout 2.0s
Unexpected error while writing to serial port: IOError: '[Errno 32] Broken pipe' @ comm.py:_do_send_without_checksum:4686
Changing monitoring state from "Detecting serial connection" to "Offline (Error: IOError: '[Errno 32] Broken pipe' @ comm.py:_do_send_without_checksum:4686)"
Connection closed, closing down monitor
Closing down send loop

Thanks in advance!

Please explain ticks-per-second value in configuration

Hi!

First, your project sounds very interesting and I'd like to play around with it a bit.

A question regarding the configuration file: what is the ticks-per-second value for and how do I determine the correct one for my printer? All the other values are well known, but I cannot figure out what ticks-per-second is good for.

Cheers,
Holger

Unknown command when sending G1.

I am attempting to run StepD with the octoprint plugin. Everything has started, but when sending any movement commands I get the following: Any ideas?

Example: G1 X0 Y0 Z5 F4000

Recv: echo:Unknown command: "!\x0f)"
Recv: echo:Unknown command: "!\x0e"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: ""
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x0c"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x0b"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: ""
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!	"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: ""
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x07"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x06"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x05"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x04"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x03"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x02"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!\x01"
Recv: warn:pending OK count dropped below 0
Recv: echo:Unknown command: "!"
Recv: warn:pending OK count dropped below 0

Connection Error

When I try to connect to the printer the error happens:

Offline (Error: TypeError: 'write() argument must be str, not bytes' @ comm.py:_do_send_without_checksum:3593)
2020-10-08_15-45

octoprint.log

ValueError: I/O operation on closed file

Hi @colinrgodsey, I am unable to successfully connect to StepD via Octopi.

The following error is from octoprint.log:

2023-01-09 16:29:21,563 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial connection"
2023-01-09 16:29:21,581 - octoprint.plugins.stepd - INFO - Starting service: ['/home/pi/.octoprint/data/stepd/stepd', '-device', '/dev/ttyUSB0', '-baud', '250000', '-config', 'config.json']
2023-01-09 16:29:21,608 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial connection" to "Connecting"
2023-01-09 16:29:21,615 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2023-01-09 16:29:27,632 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2023-01-09 16:29:27,636 - octoprint.util.comm - INFO - Changing monitoring state from "Connecting" to "Operational"
2023-01-09 16:29:27,715 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2023-01-09 16:29:36,615 - octoprint.plugins.stepd - INFO - GO: panic: Failed to load device settings
2023-01-09 16:29:36,615 - octoprint.plugins.stepd - INFO - GO:
2023-01-09 16:29:36,619 - octoprint.plugins.stepd - INFO - GO: goroutine 22 [running]:
2023-01-09 16:29:36,619 - octoprint.plugins.stepd - INFO - GO: github.com/colinrgodsey/step-daemon/lib/pipeline.ConfigHandler.func1(0x207d780, 0x207d700, 0x207d800, 0x207d840)
2023-01-09 16:29:36,620 - octoprint.plugins.stepd - INFO - GO: /home/pi/.octoprint/data/stepd/repo/lib/pipeline/config_handler.go:178 +0x358
2023-01-09 16:29:36,620 - octoprint.plugins.stepd - INFO - GO: created by main.handler
2023-01-09 16:29:37,446 - octoprint.plugins.stepd - INFO - ERR: /home/pi/.octoprint/data/stepd/repo/cmd/stepd/main.go:41 +0x78
2023-01-09 16:29:37,452 - octoprint.plugins.stepd - INFO - service terminated
2023-01-09 16:29:37,456 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/comm.py", line 3997, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_stepd/StepdService.py", line 40, in readline
data = self.process.stdout.readline()
ValueError: I/O operation on closed file
2023-01-09 16:29:37,459 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Offline after error"

Here is the content from the Octopi Terminal log

Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: <octoprint_stepd.StepdService.StepdService object at 0xb0798bb0>, starting monitor
Recv: warn:failed to load ./bedlevel.json: open ./bedlevel.json: no such file or directory
Recv: info:config processed
Recv: T:19.16 /0.00 B:18.91 /0.00 @:0 B@:0
Send: N0 M110 N0125
Recv: T:19.12 /0.00 B:18.89 /0. T:19.16 /0.00 B:18.88 /0.00 @:0 B@:0
Recv: T:19.13 /0.00 B:18.89 /0.00 @:0 B@:0
Recv: T:19.16 /0.00 B:18.90 /0.00 @:0 B@:0
Recv: no page_ready seen, sending anyways
Recv: info:gathering device settings
Recv: info:stepd initialized
Recv: pages_ready
Recv: ok N0
Send: N0 M110 N0
125
Changing monitoring state from "Connecting" to "Operational"
Recv: echo:; Linear Units:
Recv: echo: G21 ; (mm)
Recv: echo:; Temperature Units:
Recv: echo: M149 C ; Units in Celsius
Recv: echo:; Filament settings (Disabled):
Recv: echo: M200 S0 D1.75
Recv: echo:; Steps per unit:
Recv: echo: M92 X80.00 Y80.00 Z400.00 E93.00
Recv: info:max vel (step limit) is [2304 2304 460.8 1981.9354838709678]
Recv: echo:; Max feedrates (units/s):
Recv: echo: M203 X500.00 Y500.00 Z5.00 E25.00
Recv: echo:; Max Acceleration (units/s2):
Recv: ok N0
Recv: echo: M201 X500.00 Y500.00 Z100.00 E5000.00
Recv: echo:; Acceleration (units/s2) (P R T):
Recv: echo: M204 P500.00 R500.00 T500.00
Send: N0 M110 N0125
Recv: echo:; Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>):
Recv: echo: M205 B20000.00 S0.00 T0.00 J0.08
Recv: echo:; Home offset:
Recv: echo: M206 X0.00 Y0.00 Z0.00
Recv: echo:; Material heatup parameters:
Recv: echo: M145 S0 H220.00 B45.00 F0
Recv: echo: M145 S1 H240.00 B60.00 F0
Recv: echo:; Hotend PID:
Recv: echo: M301 P21.73 I1.54 D76.55
Recv: ok N0
Send: N1 M115
39
Recv: ok N1
Send: N2 M2118
Recv: ok N2
Recv: T:19.15 /0.00 B:18.90 /0.00 @:0 B@:0
Recv: T:19.14 /0.00 B:18.90 /0.00 @:0 B@:0
Recv: T:19.12 /0.00 B:18.87 /0.00 @:0 B@:0
Send: N3 M105
36
Recv: ok N3
Recv: T:19.16 /0.00 B:18.87 /0.00 @:0 B@:0
Recv: T:19.13 /0.00 B:18.89 /0.00 @:0 B@:0
Unexpected error while reading serial port, please consult octoprint.log for details: ValueError: 'I/O operation on closed file' @ comm.py:_readline:3997
Changing monitoring state from "Operational" to "Offline after error"
Connection closed, closing down monitor

Hardware

Ender 3
Board: 4.2.2 GD32F303 with Marlin Release 2.0.x (and also tried with 2.1.x) with Baudrate 250000
Connected via Octoprint over a Raspberry Pi 4B

panic: Failed to load device settings

Setup: attempting to run from linux command line. Printer control board is a BTT skr 1.3 with Marlin 2.0.7.2 (latest), direct stepping and advanced ok enabled, buffer size increased to fit advanced ok, and page format verified to match config. The board communicates fine with Repetier, Pronterface, and a direct serial connection (user is a member of the dialout group).

Problem:

info:generating bed level function...
info:config processed
info:bed level z-func loaded
panic: Failed to load device settings
(stack trace w/o surprises)
exit status 2

Gut suspicion: the timeout may be because the response isn't as expected? Scanning config_handler.go I saw mentions of M501, but I don't have EEPROM enabled--it hasn't proven necessary, but more importantly the board becomes unresponsive when flashed with the option enabled.

FWIW: my application is a plotter/engraver that only uses X Y Z axes, no E or heaters. But despite that reduced complexity, it makes many tiny moves and has feedrate/accel sufficient to overwhelm the planner.

Unrelated: users installing go for the first time might also want to know that after installing the language they should point a shell at the step-daemon dir and issue "go install". I can attest that to the golang naive the error messages without that step look like a private build was published with static resource paths and unprovided dependencies. Took me a bit to work that out. If the go syntax didn't look so foreign I'd probably be slightly more useful above...

(edit: read the readme again and caught that bed leveling is explicitly denoted optional, so that probably isn't the issue. Unless there's a config flag that needs to be set?)

Does direct stepping work from an SD card or is it serial only?

I've been talking to a marlin user that is convinced that he's using direct stepping via an SD card without using step-daemon, I've gone through the code the best I can and it doesn't look like it's even possible for that to happen, I see nothing in marlin or any of the information on this repo that suggests that you can do direct stepping via SD.

It looks like step-daemon is necessary for it to work at all, either via a self install on a raspberry pi etc. setup or via a plugin for octoprint. It appears that the user has kludged using a BLOCK_BUFFER_SIZE of 256 (which means bypassing at least 2 sanity checks) and is convinced that the speed increase they are seeing is because the printer is using direct stepping via standard vanilla gcode from the SD. I am happy to be proved wrong but I think that they might be seeing a speed increase due to the increased buffer and nothing to do with direct stepping.

Can you confirm the correct way to use direct stepping and stepd, please? I'd really like to get to the bottom of this.

Error no connection to printer

whats wrong here, what have to do ? installed at octoprint

Changing monitoring state from "Opening serial connection" to "Error: Connection error, see Terminal tab"
Changing monitoring state from "Error: Connection error, see Terminal tab" to "Offline (Error: Connection error, see Terminal tab)"
Unexpected error while connecting to serial port /dev/ttyACM0, baudrate 115200 from hook stepd: Exception: 'Step Daemon is still updating.' @ comm.py:_open_serial:3670

Octoprint TypeError serial crash

2020-11-30 23:00:02,661 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial connection"
2020-11-30 23:00:02,663 - octoprint.plugins.stepd - INFO - Starting service: ['/.octoprint/data/stepd/step-daemon','device=/dev/ttyACM0', 'baud=115200', 'config=config.json']
2020-11-30 23:00:02,672 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial connection" to "Connecting"
2020-11-30 23:00:02,673 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-11-30 23:00:02,673 - octoprint.util.comm - ERROR - Unexpected error while writing to serial port
Traceback (most recent call last):
File "/workspace/octoprint/venv/lib/python3.7/site-packages/octoprint/util/comm.py", line 4686, in _do_send_without_checksum
result = self._serial.write(to_send)
File "/workspace/octoprint/venv/lib/python3.7/site-packages/octoprint_stepd/StepdService.py", line 40, in write
return self.process.stdin.write(*args, **kwargs)
TypeError: write() argument must be str, not bytes
2020-11-30 23:00:02,674 - octoprint.util.comm - ERROR - Something crashed inside the serial connection loop, please report this in OctoPrint's bug tracker:
Traceback (most recent call last):
File "/workspace/octoprint/venv/lib/python3.7/site-packages/octoprint/util/comm.py", line 2171, in _monitor
line = self._readline()
File "/workspace/octoprint/venv/lib/python3.7/site-packages/octoprint/util/comm.py", line 3848, in _readline
null_pos = ret.find(b"\x00")
TypeError: must be str, not bytes

(edit: how do newline within code tag? 2nd search still didn't resolve, gave up)

CoreXY support

Hello @colinrgodsey
I see some comments about additional updates for this project noted in some of the issues. Are there any updates or planned updates?

I'm looking for CoreXY support. Marlin has some additional input shaping features, specifically FT_MOTION, that would benefit from this step daemon.

Thoughts?

Dual Z axis - and a guide

Hi, Will this work witha dual z axis setup? I cant see any SP_5x2_256 config or something like that ... also would be great to get a step by step guide on how to set this up on an existing Octopi, I am able to clone the repository, but missing some infor on how to update part of the config file, and also how to compile and run. If you have a bit of time to show me I can write up a guide for people. Thank you!

Marlin Compatibility

Do I have to use the Direct Step branch of marlin? is that the only branch that will work?

Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Step Daemon is still updating.
Changing monitoring state from "Opening serial connection" to "Error: Connection error, see Terminal tab"
Changing monitoring state from "Error: Connection error, see Terminal tab" to "Offline (Error: Connection error, see Terminal tab)"
Unexpected error while connecting to serial port /dev/ttyUSB0, baudrate 115200 from hook stepd: Exception: 'Step Daemon is still updating.' @ comm.py:_open_serial:3670
Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: <octoprint_stepd.StepdService.StepdService instance at 0x6119a328>, starting monitor
Send: N0 M110 N0*125
Recv: warn:failed to load ./bedlevel.json: open ./bedlevel.json: no such file or directory
Send: N0 M110 N0*125
Recv: info:config processed
No answer from the printer within the connection timeout, trying another hello
There was a timeout while trying to connect to the printer
Changing monitoring state from "Connecting" to "Offline (Error: )"
Connection closed, closing down monitor
Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: <octoprint_stepd.StepdService.StepdService instance at 0x6c83f1c0>, starting monitor
Send: N0 M110 N0*125
Recv: warn:failed to load ./bedlevel.json: open ./bedlevel.json: no such file or directory
Recv: info:config processed
Send: N0 M110 N0*125
Unexpected error while reading serial port, please consult octoprint.log for details: ValueError: 'I/O operation on closed file' @ comm.py:_readline:3831
Changing monitoring state from "Connecting" to "Offline (Error: ValueError: 'I/O operation on closed file' @ comm.py:_readline:3831)"
Connection closed, closing down monitor
Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: <octoprint_stepd.StepdService.StepdService instance at 0x6c464490>, starting monitor
Recv: warn:failed to load ./bedlevel.json: open ./bedlevel.json: no such file or directory
Send: N0 M110 N0*125
Recv: info:config processed
No answer from the printer within the connection timeout, trying another hello
Send: N0 M110 N0*125
There was a timeout while trying to connect to the printer
Changing monitoring state from "Connecting" to "Offline (Error: )"
Connection closed, closing down monitor

panic: Failed to load device settings

It's all in the title. Firmware was updated just before with the required options.

Anything I should test?

AFAIK the absence of pages_ready is because of CDC serial hardware

$ cat print.gcode | go run ./cmd/stepd -device /dev/ttyACM0 -baud 1000000 -config ./config.hjson | grep -v "ok"
info:generating bed level function...
info:config processed
info:bed level z-func loaded
wait
wait
no page_ready seen, sending anyways
info:gathering device settings
info:stepd initialized
pages_ready
echo:; Linear Units:
echo:  G21 ; (mm)
echo:; Temperature Units:
echo:  M149 C ; Units in Celsius
echo:; Filament settings (Disabled):
echo:  M200 S0 D1.7500
echo:; Steps per unit:
echo:  M92 X80.0000 Y80.0000 Z400.0000 E690.0000
echo:; Max feedrates (units/s):
info:max vel (step limit) is [2304 2304 460.8 267.1304347826087]
echo:  M203 X200.0000 Y180.0000 Z40.0000 E6.0000
echo:; Max Acceleration (units/s2):
echo:  M201 X7000.0000 Y6000.0000 Z200.0000 E6000.0000
echo:; Acceleration (units/s2) (P<print-accel> R<retract-accel> T<travel-accel>):
echo:  M204 P3000.0000 R7200.0000 T3000.0000
echo:; Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_jerk> Y<max_jerk> Z<max_jerk> E<max_jerk>):
echo:  M205 B20000.0000 S0.0000 T0.0000 X1.0000 Y1.0000 Z0.3000 E2.0000
echo:; Home offset:
echo:  M206 X0.0000 Y0.0000 Z0.0000
echo:; Auto Bed Leveling:
echo:  M420 S0 Z5.0000 ; Leveling OFF
echo:; Z Auto-Align:
echo:  M422 S1 X-155.0000 Y0.0000
echo:  M422 S2 X127.0000 Y0.0000
echo:; Bed PID:
echo:  M304 P103.7845 I18.5329 D387.4622
echo:; Retract (S<length> F<feedrate> Z<lift>):
echo:  M207 S2.0000 W13.0000 F2700.0000 Z1.5000
echo:; Recover (S<length> F<feedrate>):
echo:  M208 S-0.5000 W0.0000 F4800.0000
echo:; Auto-Retract (S<enable>):
echo:  M209 S0
echo:; Z-Probe Offset:
echo:  M851 X-28.0000 Y0.0000 Z-0.3000 ; (mm)
echo:; Stepper driver current:
echo:  M906 X800 Y800 Z800
echo:  M906 I1 Z800
echo:; Driver stepping mode:
echo:  M569 S1 X Y Z
echo:  M569 S1 I1 Z
echo:; Filament runout sensor:
echo:  M412 S1 ; Sensor ON
echo:; Model predictive control:
echo:  M306 E0 P40.00 C16.70 R0.2200 A0.0680 F0.0970 H0.0056
wait
panic: Failed to load device settings

goroutine 37 [running]:
main.stepdPipeline.ConfigHandler.func1({0x400011e240?, 0x400011e1e0?}, {0x400011e2a0?, 0x400011e300?})
        /home/whale/_git/step-daemon/lib/pipeline/config_handler.go:178 +0x358
created by main.handler in goroutine 1
        /home/whale/_git/step-daemon/cmd/stepd/main.go:41 +0xe0
exit status 2

Plugin not present on octoprint repo

The plugin is not present on the octoprint plugin repository, installing it manually from the URL installs it but it fails to work:
Octoprint loses connection to the printer and the plugin page says "plugin failed"

Error on connection

Unable to successfully connect here is the terminal output:
Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Error"
Changing monitoring state from "Error" to "Offline after error"
Unexpected error while connecting to serial port /dev/ttyACM0, baudrate 250000 from hook stepd: FileNotFoundError: '[Errno 2] No such file or directory: '/home/pi/.octoprint/data/stepd/stepd': '/home/pi/.octoprint/data/stepd/stepd'' @ comm.py:_open_serial:3836
Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to Step Daemon
Changing monitoring state from "Opening serial connection" to "Error"
Changing monitoring state from "Error" to "Offline after error"
Unexpected error while connecting to serial port /dev/ttyACM0, baudrate 250000 from hook stepd: FileNotFoundError: '[Errno 2] No such file or directory: '/home/pi/.octoprint/data/stepd/stepd': '/home/pi/.octoprint/data/stepd/stepd'' @ comm.py:_open_serial:3836

Command passthrough doesn't work - ie Octoprint -> Printer

I can connect fine - and if I set options like M900 K0.68 in OctoPrint, I can see that step-daemon does interpret things properly..... However nothing seems to make it through to the printer.

I use /dev/ttyACM0 at 250000 - but the Octoprint M105 / M115 commands never return with the expected values (or any values) so nothing proceeds.

Sending a G28 / G29 / G1 Z0 etc result in no movement and seem to just disappear...

$ java -jar server/target/scala*/*.jar -Xmx64M -XX:+UseG1GC -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:MaxGCPauseMillis=5
Preloaded 1788 classes, and 3 failed
[INFO] [07/09/2020 07:34:56.566] [stepd-akka.actor.default-dispatcher-7] [akka://stepd/user/device/line-serial] starting...
[INFO] [07/09/2020 07:34:56.663] [stepd-akka.actor.default-dispatcher-8] [akka://stepd/user/pipeline] Pipeline started, draining for 2 seconds
[INFO] [07/09/2020 07:34:56.675] [stepd-akka.actor.default-dispatcher-8] [akka://stepd/user/device] Resetting command state
[INFO] [07/09/2020 07:34:56.676] [stepd-akka.actor.default-dispatcher-8] [akka://stepd/user/bed-level] Loading mesh level data
[INFO] [07/09/2020 07:34:56.681] [stepd-akka.actor.default-dispatcher-8] [akka://stepd/user/bed-level] No leveling data found.
rm: cannot remove '/tmp/pty-stepd-client': No such file or directory
[INFO] [07/09/2020 07:34:56.729] [stepd-akka.actor.default-dispatcher-5] [akka://stepd/user/device/line-serial/serial] ArraySeq(/dev/ttyACM0)
rm: cannot remove '/tmp/pty-stepd': No such file or directory
[INFO] [07/09/2020 07:34:56.739] [stepd-akka.actor.default-dispatcher-6] [akka://stepd/user/proxy] 2020/07/09 07:34:56 socat[1485] N starting data transfer loop with FDs [5,5] and [7,7]
[INFO] [07/09/2020 07:34:56.740] [stepd-akka.actor.default-dispatcher-6] [akka://stepd/user/proxy] Linking /dev/pts/1 to /tmp/pty-stepd-client
[INFO] [akkaDeadLetter][07/09/2020 07:34:56.740] [stepd-akka.actor.default-dispatcher-7] [akka://stepd/user/proxy] Message [com.colingodsey.stepd.PrintPipeline$DeviceRestart$] from Actor[akka://stepd/user/pipeline#-890000906] to Actor[akka://stepd/user/proxy#185387138] was unhandled. [1] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[INFO] [akkaDeadLetter][07/09/2020 07:34:56.741] [stepd-akka.actor.default-dispatcher-7] [akka://stepd/user/proxy] Message [com.colingodsey.stepd.PrintPipeline$ResumeInput$] from Actor[akka://stepd/user/pipeline#-890000906] to Actor[akka://stepd/user/proxy#185387138] was unhandled. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
[INFO] [07/09/2020 07:34:56.757] [stepd-akka.actor.default-dispatcher-6] [akka://stepd/user/proxy] Linking /dev/pts/2 to /tmp/pty-stepd
[INFO] [07/09/2020 07:34:56.762] [stepd-akka.actor.default-dispatcher-6] [akka://stepd/user/proxy] linking done
[INFO] [07/09/2020 07:34:56.774] [stepd-akka.actor.default-dispatcher-8] [akka://stepd/user/proxy/proxy-serial] ArraySeq(/dev/ttyACM0)


[INFO] [07/09/2020 07:35:40.952] [stepd-akka.actor.default-dispatcher-5] [akka://stepd/user/pipeline/delta] syncing pipeline position

Is something broken between the pipes?

I can see the app and socat running in a ps list:

0 S pi        1590   778 65  80   0 - 288916 futex_ 88300  2 07:38 pts/0    00:00:06 java -jar server/target/scala-2.13/print-server-jvm-assembly-0.1.0-SNAPSHOT.jar -Xmx64M -XX:+UseG1GC -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2 -XX:MaxG
0 S pi        1630  1590  0  80   0 -  1447 poll_s  2520   1 07:39 pts/0    00:00:00 socat -d -d pty,raw,echo=0 pty,raw,echo=0

"Could not open port /tmp/pty-stepd-client"

Hi,
I tried to run your plugin on a ubuntu-server laptop with two cores and python 3.
After installing the Octoprint plugin with it's dependencies, changing the baudrate and restarting I get the following error in the Teminal:
Unexpected error while connecting to serial port: AUTO SerialException: '[Errno 2] could not open port /tmp/pty-stepd-client: [Errno 2] No such file or directory: '/tmp/pty-stepd-client'' @ comm.py:_openSerial:2691 (hook stepd)

OctoPrint Plugin Not Starting stepd

I'm just starting out with step-daemon, so I could easily be missing something here... :-)

Short story: after uninstalling and reinstalling the OctoPrint plugin, stepd is not started automatically.

Setup:

  • OctoPrint runs on a Raspberry Pi 3B+. The Pi is running the latest Raspberry Pi OS (32 bit) and is updated.
  • OctoPrint is running v1.4.0 stable. It does have a couple 3rd party plugins.

The steps I had taken:

  1. I initially installed the OctoPrint plugin using the URL (it did not show up on the Plugin Manager's list.) This appears to have started stepd -- stepd showed up on the process list.
  2. I uninstalled the OctoPrint plugin using the "clean up" option.
  3. The process list showed stepd still running. I rebooted the Raspberry Pi.
  4. I reinstalled the OctoPrint plugin. However, stepd was not started.
  5. Restarting OctoPrint, and then restarting the Pi, did not start stepd.

I had not cloned the server code, and the only install I had done on the Raspberry Pi had been the plugin.

(The plugin uninstall and re-install were due to not getting the communication with the printer working. That's a different issue for me to sort out. :-) )

delta

hi, in which state is direct stepping for delta printers?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.