You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X #243
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
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
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
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
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
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
Activity
luc-github commentedon Sep 26, 2018
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
[-]Host definition for 2.1[/-][+]Host definition for 3.X[/+]luc-github commentedon Oct 2, 2019
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
[-]Host definition for 3.X[/-][+]GCODE Host definition for 3.X[/+]luc-github commentedon Oct 13, 2019
Next steps to work on for proper gcode host support
luc-github commentedon Mar 25, 2022
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:
But framework / code base is now ready
[-]GCODE Host definition for 3.X[/-][+]GCODE Streamer Host definition for 3.X[/+]probonopd commentedon Apr 18, 2023
How?
luc-github commentedon Apr 18, 2023
by typing the command manually for the moment
[ESP700]/SD/myfile.gcoluc-github commentedon Oct 5, 2023
The latest definition used currently on ESP3D-TFT is here:
StreamingService.md
luc-github commentedon Nov 9, 2023
The ping pong streaming service is available in ESP3D-TFT as POC and will be ported to ESP3D once validate
[-]GCODE Streamer Host definition for 3.X[/-][+][FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X[/+]kleffa commentedon Jun 1, 2024
luc-github commentedon Jun 1, 2024
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
luc-github commentedon Dec 8, 2025
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
printercnc commentedon Feb 4, 2026
luc-github commentedon Feb 4, 2026
printercnc commentedon Feb 4, 2026
luc-github commentedon Feb 4, 2026