Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

klipper container in docker-compose can't access config_spi or host version #21

Closed
koheiio opened this issue May 8, 2022 · 1 comment

Comments

@koheiio
Copy link

koheiio commented May 8, 2022

I'm looking to run prind containers in a simpler docker-compose config:

version: "3.9"

services:
  app:
    image: "mkuf/klipper:722ad4a"
    restart: "always"
    devices:
      - "/dev/serial/by-id/usb-Klipper_stm32f429xx_3C0032001350304738313820-if00:/dev/ttyUSB0"
    volumes:
      - "$PWD/../../configs/klipper:/opt/cfg"
      - "klipper-gcode:/opt/gcode"
      - "klipper-run:/opt/run"
      - "klipper-log:/opt/log"
    command:
      - "-l"
      - "log/klippy.log"
      - "-I"
      - "run/klipper.tty"
      - "-a"
      - "run/klipper.sock"
      - "cfg/printer.cfg"
    networks:
      - "gateway"

  api:
    image: "mkuf/moonraker:cd520ba"
    restart: "always"
    depends_on:
      - "perms"
      - "app"
    volumes:
      - "$PWD/../../configs/klipper:/opt/cfg"
      - "/dev/null:/opt/klipper/config/null"
      - "/dev/null:/opt/klipper/docs/null"
      - "/run/dbus:/run/dbus"
      - "/run/systemd:/run/systemd"
      - "klipper-db:/opt/dbdoc"
      - "klipper-gcode:/opt/gcode"
      - "klipper-run:/opt/run"
      - "klipper-log:/opt/log"
    command:
      - "-l"
      - "log/moonraker.log"
      - "-c"
      - "cfg/moonraker.cfg"
    ports:
      - "80:7125"
    networks:
      - "gateway"

  perms:
    image: "busybox:latest"
    volumes:
      - "$PWD/../../configs/klipper:/opt/cfg"
    command: "chown 1000:1000 /opt/cfg/*.cfg"

volumes:
  klipper-db:
    name: "klipper-db"
  klipper-gcode:
    name: "klipper-gcode"
  klipper-run:
    name: "klipper-run"
    driver_opts:
      type: "tmpfs"
      device: "tmpfs"
  klipper-log:
    name: "klipper-log"
    driver_opts:
      type: "tmpfs"
      device: "tmpfs"

networks:
  gateway:
    name: "gateway"
    driver: "bridge"

As you can see, it's just moonraker and klipper but simplified from the docker-compose.yml in prind repo. However when I connect to moonraker with fluidd, this is the error I receive on FIRMWARE_RESTART:

mcu 'mcu': Unable to extract params from: config_spi

This type of error is frequently caused by running an older
version of the firmware on the micro-controller (fix by
recompiling and flashing the firmware).

Known versions: host=?, mcu=v0.10.0-324-g91ba9c00

Once the underlying issue is corrected, use the "RESTART"
command to reload the config and restart the host software.
Protocol error connecting to printer

Tihs error occurs even when running prind using the repo's docker-compose.yml. It feels like I'm missing some property in docker-compose.yml and preventing klipper from grabbing the host or config_spi data. Any ideas?

@koheiio
Copy link
Author

koheiio commented May 8, 2022

I found out why this happens, the klipper version in mcu was out of sync with the host (obvious as per error msg), but also because there was a syntax error in my printer.cfg

[gcode_macro PRINT_START]
gcode:]
    ; extra ']' character ^
    M117 Starting Print...

Removing that syntax error along with updating the firmware was able to fix this issue. Not prind related! Sorry for clogging up the issues.

@koheiio koheiio closed this as completed May 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant