colon symbol not correctly sent by API/UI

edited March 2020 in Bug Reports
Hi,
at the moment i am writing some API stuff to remote control my Duet 2 Ethernet. This works quite good. Now i found a thing where i guess its a bug of Repetier Server (in the regular UI and in API - so general design problem maybe).

In Duet Firmware there's a command M118 to send messages to console or display of attached devices.

if i post "M118 P0 S"Smart Stepper B: ctrlmode: a2" in Duet Web Control this is displayed fine in it's GCode console
Clipboard01

Now i found out: If i directly send "M118 P0 S"Smart Stepper B: ctrlmode: a2" in Repetier Server console in browser of Repetier, bothe existing colons are cut out. Same happens if i send the following unencoded string to API:
{"cmd":"M118 P0 S\"Smart Stepper B: ctrlmode: a2 | \""}
Clipboard02

Could you validate if something forces to throw away that colons? (and maybe other characters?)

Comments

  • A colon was a gcode separator in the past, so they get converted to spaces. If you check serverInstall/firmwares/RepRapFirmware line 15 change it into:
    <com okAfterResend="false" protocol="ascii" allowColonInAscii="true"/>
    Please let me know if that works then I make it default assuming RepRapFirmware has not that special separator possibility. Not that anyone ever used it as far as I know.

    Alternatively make it a shell command by pretending # so line gets send 1:1 unchanged.

  • Hi,
    RepRapFirmware still uses the colon for regular G/M Codes so if it affects basic functions maybe it's not a good idea. I tested it with allowColon and it works with the console output like exspected. But entering M92 E420:500 like described in https://duet3d.dozuki.com/Wiki/Gcode#Section_M92_Set_axis_steps_per_unit does not show in the log. M92 E420 is fine - its printed on the log.

    your # variant works and it works best i think because nothing to change :-)


  • Thanks for the M92 hint. That is not correct gcode syntax any more where only <letter><number> is allowed. Guess I will add a new variant for this that makes commands containing : to be send also 1:1 automatically as our "real" gcode parses will not like it. That will also make the M118 work better when added.
Sign In or Register to comment.