Skip to content

[FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X #243

Open

Description

@luc-github

Time to define what host feature will be:
Basic description
1 - Read Gcode from SD
2- Send GCODE to printer FW via Serial
3 - Wait for ack
4 - if ack go to 1 / if error go to 2

Now need to clarify each part :

  • Point 1 is no issue so far: just store file name / currentline
  • Point 2 need more elaborate:
    1 - add Line numbering in command
    N1 G28
    Reset the line numbering is M110 N0 on Repetier / Marlin / Smoothiware
    2 - add command checksum for safety (all command char are XOR+*+checksum calculated)
    N20 M105*20
  • Point4 : ack always use ok +line number
    ok 20
    if error on line number or checksum you get
    resend 20

Not sure if special command need to be handled (like @Pause) right now as it is not a host that have direct UI, but will be when Oled Screen is enabled as well as rotary encoder is supported.

One command is key: Emergency stop, to stop sending commands ans stop printer FW

Activity

  1. luc-github commented on Sep 26, 2018

    @luc-github
    OwnerAuthor

    some update for command / answer according Firmware:
    1 - smoothieware
    which is quiet (nowait when idle), use N{New Line Position} M110 to reset, and resend error is rs N, M29 does not need checksum, send ok without line number

    2 - Marlin Kimbra
    which is not quiet (send wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 need checksum, ok does not use line number

    3 - Marlin
    which is quiet (no wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 need checksum, ok does not use line number

    4 - Repetier
    which is not quiet (send wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 does not need checksum, ok use line number

  2. changed the title [-]Host definition for 2.1[/-] [+]Host definition for 3.X[/+] on Dec 9, 2018
  3. luc-github commented on Oct 2, 2019

    @luc-github
    OwnerAuthor

    Basic GCODE host functions are now available
    they will be used for the autotstart feature, the [ESP700] command and Serial Upload
    the host features will be improved later if necessary

  4. changed the title [-]Host definition for 3.X[/-] [+]GCODE Host definition for 3.X[/+] on Oct 13, 2019
  5. luc-github commented on Oct 13, 2019

    @luc-github
    OwnerAuthor

    Next steps to work on for proper gcode host support

    • should not be blocking e.g. screen update. external commands for pause/stop/etc..., may be by using separated task
    • should be able to wait for delayed answer/ next command: G4 or M116 or M190 or M109, may be by disabling time out for these command
    • handle printer error if not heating or defective sensor
    • allow auto script for pause/stop/etc...
    • display file stream process
    • TBD
  6. moved this from Todo to Under definition in ESP3D 3.0on Jan 24, 2022
  7. moved this from Todo to Under definition in ESP3D 3.0on Mar 9, 2022
  8. luc-github commented on Mar 25, 2022

    @luc-github
    OwnerAuthor

    a basic GCODE host stream is now in https://github.com/luc-github/ESP3DLib/tree/2-0
    it is basic ping/pong command/ack with ok
    it is no more blocking and it is used by [ESP700], can be used with line script/FS file and SD file

    Current limitation:

    • no edge case are handled yet - need to define them
    • no checksum / line numbering (code is ready but not used)
    • no resend / busy is handled - need to add conditions to do it

    But framework / code base is now ready

    macro

  9. moved this from Under definition to In Progress in ESP3D 3.0on Mar 25, 2022
  10. changed the title [-]GCODE Host definition for 3.X[/-] [+]GCODE Streamer Host definition for 3.X[/+] on Feb 9, 2023
  11. probonopd commented on Apr 18, 2023

    @probonopd

    "can be used with ... SD file"

    How?

  12. luc-github commented on Apr 18, 2023

    @luc-github
    OwnerAuthor

    by typing the command manually for the moment
    [ESP700]/SD/myfile.gco

  13. luc-github commented on Oct 5, 2023

    @luc-github
    OwnerAuthor

    The latest definition used currently on ESP3D-TFT is here:
    StreamingService.md

  14. luc-github commented on Nov 9, 2023

    @luc-github
    OwnerAuthor

    The ping pong streaming service is available in ESP3D-TFT as POC and will be ported to ESP3D once validate

  15. changed the title [-]GCODE Streamer Host definition for 3.X[/-] [+][FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X[/+] on Mar 6, 2024
  16. kleffa commented on Jun 1, 2024

    @kleffa
  17. luc-github commented on Jun 1, 2024

    @luc-github
    OwnerAuthor

    what do you mean ?
    read gcode is not hard - send gcode is not hard but that is not streaming
    Streaming is to control the flow of commands, control the response and react accordingly, if error , if timeout, also errors and responses are different for each FW : Marlin / Repetier / Smoothieware / grbl / etc...
    In addition need to handle user command like PAUSE, filament sensor reporting no more filament, etc
    it is not difficult but is a lot of possible users cases that need to be handled.
    also need to handle user send manual commands as well as polling commands from external device like tft or even computer while streaming is ongoing

    Macros are suposed to be few gcodes and so currently they are all send blindly at once without checking the response , and because they are only macros, if they failed it is not a big issue - but once gcode host will be implemented they will be handled as any other gcodes

  18. luc-github commented on Dec 8, 2025

    @luc-github
    OwnerAuthor

    Just a quick update to mention that this is still on todo but after trying on ESP3D (arduino) for grbl and ESP3D-TFT for marlin feedback of ping/pong are - process is too slow
    So I will redo this from scratch - modifying internal code if necessary but with some important change : I won't try to do an universal GCODE Sender, it is too complexe for me for the moment, so I will do 2 codes / subprojects : one CNC GCode sender and one 3D Printer Gcode Sender.
    I will start with CNC / grbl first - I need to review all specs first and redo the logic to fit CNC streaming needs, then will leverage but change core logic for the second project for 3D Printer (most likely Marlin)

    Sorry for the delay - please be patient - I know it is recurent request but I am busy with all project and struggling to stop and think how to address this properly based on current feedbacks

  19. printercnc commented on Feb 4, 2026

    @printercnc
  20. luc-github commented on Feb 4, 2026

    @luc-github
    Author
  21. printercnc commented on Feb 4, 2026

    @printercnc
  22. luc-github commented on Feb 4, 2026

    @luc-github
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status
      In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions