Skip to content

Commit a221724

Browse files
committed
Add Base Notes for To do things
1 parent 972b4db commit a221724

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Project description
2+
3+
The goal is to have a simple but reliable protocol to transfer GCODE and files without conflict over serial, with error checking and resend on error
4+
5+
## Background
6+
currently GCODE are send over serial, the file transfer use special GCODE to initiate the transfer and end the transfer, depending on FW target - it use checksum and line number, but no command can be sent when file transfer is running so any polling command from a connected device will make noise on file transfer and make it failed most of the time. Also du to fact the GCODE transfer is done command by command the transfer is very, very very slow( 0.4KBs)
7+
8+
MKS has defined a protocol of encapsulated command which allow
9+
1 - to separate commands from file transfer
10+
2 - to increase speed using a 1KB buffer and pins to do the ack (100KB/s)
11+
12+
Unfortunatly this does not have a resend feature and no real integrity check, so came the improvement area
13+
14+
Why not using existing libraries? Serial transfer libraries are just transfer libraries - we need more than that - we need to handle commands / response and transfer/hack, so it would mean add a protocol inside another protocol, which will decrease performance for sure, so better do it clear from the beginning
15+
16+
## Scope
17+
As serial communication it only cover ... serial, SPI transfer are not in this scope but may be implemented when I had time to really review the RRF spi communication (TBD)
18+
19+
## Constraints
20+
21+
As it is a serial communication procotol it need both part to use it so it must be implemented on ESP3D and on target FW (Marlin, Repetier, Smoothieware, etc) as a library or embedded: TBD
22+
23+
So on top of develop both side - it need also acceptance of each FW to be integrated in a way or another => big TBC...
24+
25+
## Protocol definition
26+
27+
THIS IS WORK IN PROGRESS
28+
29+
### Block description
30+
31+
As based of MKS protocol 1KB looks a good start
32+
- Header description
33+
- Header type : Command / File block / Response / Stream / TBD
34+
- Header id : to be used for resend if necessary
35+
- Content Size: only the data as others have fixed size
36+
- Data: 1KB - info / header / tail
37+
- Tail: CRC + tail tag (TBD)
38+
39+
### Ack
40+
- communication may rely on pins like for MKS or response packet using also same block description so transfer can be done when GCODE command is send to printer, and printer can ack/raise error or answer GCODE command also when transfer is on going.
41+
- so tranfer is not blocking and polling is not a noise
42+
### Error checking
43+
- The error check will rely on CRC instead of checksum because more reliable
44+
- The error control can be a mix between a resend and automatically adjust/decrease the transfer baud rate in case of EMI issues
45+
46+
### Performance
47+
- The goal is to be as close as possible as current MKS transfer = 100KB, do not expect instant magical transfer but better one.
48+
49+
### Libraries
50+
- CRC library seems a good candidat for CRC part
24.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)