GCODE script wont send a long Macro assignment

What is the problem?

GCODE Scripts - trying to send a long line to printer causes a checksum error.

What did you already try to solve it?

I split my call to assign a macro M812 into two and it worked as the lines did not wrap within the little window it gives you.

Have you tried running in safe mode?

I doubt highly it affects this behaivour. octoprint-systeminfo-20211108010126.zip (214.9 KB)

Did running in safe mode solve the problem?

WRITE HERE

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

WRITE HERE

Additional information about your setup

1.7.2, no idea, ender 3 pro with E3 SKR board, marlin 2.0.9, chrome, win10, pc.
Here are the functions I am trying to assign to gcode macros. Such macros have one glaring omission -- that is, they can be written, executed, but NOT read. So to counter that I had to load them in anew from a easily visible area, such as gc scripts.

The first two, M810, M811 went in fine. M812 and M815 had "no checksum" errors, there were *nn numbers shown being sent at each line terminal. I don't know if there is a arbitrary limit to how long lines sent can be, or some odd character is screwing up the parity check. I copied them to a notepad and widened it, it stayed on one line.

M810 M300 S2000 P3
M811 M300 P10 S2200 | M300 P8 S2750 | M300 P4 S3250
M812 M300 S3800 P4000 | M300 S3200 P2000 | M300 S2800 P6000 | M117 Load Next... | M220 S11
M813 M300 P10 S1800
;Peek Routine
M815 M300 P80 | G91 | G1 E-6 | G0 Z+1 | G90 | G0 Y200 | G0 ;X225 | M117 Waiting 20S for inspection | G4 S20 | M300 P500 ;| M117 Going Back... | G4 S3 | G91 | G0 Z-1 | G90 | M117 Resumed. | M300 P100

I'm trying to streamline things a bit without redundant bits of gcode here and there, especially not from Cura's tiny-ass post-process interface that shows like 18 characters. I'd gladly include a log of it, but serial log deletes itself every time it resets -- nice feature for debugging when it crashes.

There is a line break (\n) in one command line:

| Send: N1445 M300 S2500 P10 \nM300 P16 S3000*122
| Recv: Error:checksum mismatch, Last Line: 1444

You may check the slicer settings.

Also, this line is quite too long:

| Send: N10 M812 M300 S3800 P4000 | M300 S3200 P2000 | M300 S2800 P6000 | M117 Load Next...  | M220 S11*63
| Recv: Error:No Checksum with line number, Last Line: 9

Marlin does not say anything about the length of macros, but try shorter ones.

You also have issues wit OctoText:

2021-11-04 02:26:46,184 - octoprint.plugins.OctoText - ERROR - Exception while logging into mail server (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials 13sm2631480qkc.40 - gsmtp')
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_OctoText/__init__.py", line 249, in smtp_login_server
    SMTP_server.login(login, passw)
  File "/usr/lib/python3.7/smtplib.py", line 730, in login
    raise last_exception
  File "/usr/lib/python3.7/smtplib.py", line 721, in login
    initial_response_ok=initial_response_ok)
  File "/usr/lib/python3.7/smtplib.py", line 642, in auth
    raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials 13sm2631480qkc.40 - gsmtp')

There are some power cycles (pulling the plug). This can lead to filesystem corruption on the SD card. Please use OctoPrint's shutdown or restart feature.

That first issue I need to take out, the slicer did put in two tones which I think I had replaced... sorry my extruder sounds like a battle... its not involved with setting the macros. Cura should just send a macro so it doesn't chirp if I elect to unset the macro, but damn linear advance is noisy. Just found out they DO seem to have a size limit, but it's set in config so I could try and increase it. Looking thru the macro.cpp I can't see another limit. Nah just a loopy loop. Love open source.

As far as octotext I think I disabled it, but I need to fix it because I forgot and changed google password. Been meaning to remedy that but recovering from a octoprint total system fail, so bringing plugs on one by one.

Thanks!!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.