Some more info on Repetier-protocol?

Hi! I am the developer of a small host RepRaptor. It is being developed as a host for a 3D printing lab in my university, and since we all use Repetier-Firmware I've already implemented EEPROM editor for it, and now I want to implement Repetier-Protocol for faster and more reliable connection.
Problem is - the "repetier communication protocol.txt

" file in the repo is not really clear to me.
How should I pack it? Is it a 15 bits followed by strictly-sized numbers in the same order, or how should it be? Can someone explain it for me?
File says complete definition would be available, but its been a while now...

Comments

  • It is quite simple.

    First byte has bit 8 set -> binary protocol. The remaining 15 bit of the first 2 byte define which values get send with one bit for an extra 16 bit of codes. Then if the bit is set it comes in the order and size stated in the protocol. S and P are long values all other are floats. Last 2 bytes are flecher sum checksum.

    For implementation see gcode.cpp on how it is decoded.
    Also the github Repetier-Host code contains a gcode.cs which shows how to package it, also it is a bit expired and does not support all currently possible codes.

  • I've looked at gcode.cs, but it is very hard to read, sice its not just recieves a string and parses it, instead it uses other class methods and variables. So I'll look at firmware. Even v2 is expired? This is a shame then. Thanks for the tps!
  • V3 is the same as V2 only some more bits now have a meaning for some new codes, so we can now use D for diameter and some more. Order of these variables is described in definition for work092 firmware tree.

    The host GCode.cs is quite simple. At beginning it parses a simple gcode string and stores values in variables x,y,z,f,e, ... and sets a bitmask so it knows which values are actually set. When packaging it creates a binary blob with the raw data of the values. Most difficult part is pure text as it does not have a defined length and comes in 2 flavours (V1 = 16 byte and V2 or later = variable size, length byte first)
Sign In or Register to comment.