After update to 1.5.3 serial connection could not etablished anymore

What is the problem?

Serial connection to a Anycubic Mega S could not be etablished anymore. (will try a downgrade back but before I like to ask if somebody still know this issue)

What did you already try to solve it?

Changing USB cable
Switched everything off and on

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Complete Logs

serial log ->
2021-01-20 20:26:23,413 - Enabling serial logging
2021-01-20 20:26:26,691 - Changing monitoring state from "Offline" to "Opening serial connection"
2021-01-20 20:26:26,713 - Connecting to port /dev/ttyUSB0, baudrate 115200
2021-01-20 20:26:26,783 - Changing monitoring state from "Opening serial connection" to "Connecting"
2021-01-20 20:26:26,789 - Connected to: Serial<id=0xa4a69630, open=True>(port='/dev/ttyUSB0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2021-01-20 20:26:26,829 - Send: N0 M110 N0125
2021-01-20 20:26:26,833 - Send: N0 M110 N0
2021-01-20 20:26:35,872 - Recv: áNp|ÿ0}HHÎ(0} qfñJpON6‹ˆJ=hZ>|Y,]^a~‹6¨HªXñJð~¨5A@6“M“7—¨Šøa
2021-01-20 20:26:35,890 - Recv:
2021-01-20 20:26:35,894 - Recv: á^ƒe6jO>ìJª_YŠÁ¬aJ‚%è}ÁMhp|}>Xe6—H.l‹p|4]êXñJ„J€Xñz“HH6fñJ8ˆJˆ8HJÆJˆêYÙaz$~H^ì}Ù$p|4
2021-01-20 20:27:06,261 - No answer from the printer within the connection timeout, trying another hello
2021-01-20 20:27:06,282 - Send: N0 M110 N0*125
2021-01-20 20:27:16,316 - There was a timeout while trying to connect to the printer
2021-01-20 20:27:16,338 - Changing monitoring state from "Connecting" to "Offline"
2021-01-20 20:27:16,341 - Connection closed, closing down monitor

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

OctoPI 1.5.3, Anycubic Mega S Knutwurst Firmware, Raspberry PI 4 2 Gb Ram
Printer beeps to confirm connection attempt but it does not succeed.

Perhaps related to this but did not know. Updated and wont connect to Printer

try manually selecting your baud rate and port in the connection tab rather than using auto.

What OctoPrint received there is quite a mess. Either the baudrate is way out of line, the USB cable is faulty or not shielded enough.
You may try another baudrate first.

Still tried both. Was also my first thoughts. Changed cable and also set fixed port and baudrate (simply tried all) without success. it works sometimes with 250000 baud but with that rate it does not print smooth. It has a 8-Bit board and has to be run at 115.200 baud. But with that setting it does not connect. But before I had to downgrade to 1.4.2 or perhaps the Debian upgrade did it. But with 250000 baud I cannot print.

OctoPrint doesn't control the baud rate of your firmware, so I doubt that is the issue.

Do you compile your own firmware or download premade bin files? If you compile your own then I would recompile with serial set to 115k instead of 250k and your connection will be a lot more stable. These little AVR/ARM cores are known to be a bit unstable at higher baud rates. (first printer, long time programmer)

1 Like

Actually I use a precompiled one. But changed the baud rate to 112500 in Octoprint successfully before and it worked fine. Is this normal that Marlin does support one baud rate only? I checked the configuration and it is set to 250000. Perhaps it does not get it but the stuttering was gone after it? So I am confused about the behaviour. Also because printing worked fine...

Marlin isn't really the one supporting the baud rate, the cpu is. It has to have enough time between everything else to dedicate that much time to just talking to the serial port. I thought I had read somewhere that in marlin you set the baud rate at compile time but if your printer has the option to change it in the menu then it's an EEPROM saved variable. You are remembering to reset the EEPROM on major revision changes, right? The way or location some setting stores it's stuff may have changed. Changing Octoprint doesn't change your printers setting though and if they don't match exactly, or if you ask it to go too fast like 250k and between telling everything else in the printer what to do and trying to serial it actually ends up at 246k, then you get that garbage output because all the data doesn't line up right. You don't need a fiber terabit connection to your printer, it's just sending a bunch of text line by line for all intents and purposes. 56k would be good enough. Yall' are spoiled. My first modem was 1200bps (1.2k) LMFAO

When those came out, we all: SO FAST!

I found a variable in Marlin code that set the baud rate. I am not familiar with this but if the firmware does support the set baud rate only it is interesting why it worked also with 112500 before...perhaps 1.5.3 fixed a bug and only show 112500 but instead using a different baud rate (or the pi as I use OctoPI)???

250000 compared with my 14400 is not much different compared with Thunderbold. :slight_smile:

The firmware has nothing to do with the hardware. Just because you put a Lombogini seat in your car doesn't make it go any faster. If you could get marlin to run on a CPU with GHz clock speed then marlin could communicate at 1 terabit. The speed of your stuff is hardware level. If the software doesnt match the hardware then really odd things start happening.

These printer boards are typically AVR/ARM cores at about 16-25mhz. Marlin does a good job at* skipping the longer code run times from the included arduino junk but still.... the hardware. All the hardware I make runs at 9600 and that's enough to pass more than enough data for multiple arduino cores to talk and do their thing accurately. These things only need to send text about as fast as a couple teens texting so again, thunderbolt speeds aren't necessary. The only feasible reason I can see for having that kind of link between your printer and RasPi would be if you had no space but for the operating system on your SD card and you had to upload all the gcode to the printer before each print through the serial connection.

Just stick to 112500 for stability and compatibility. It's really more than enough to print. If your printer keeps skipping then I'd try and lower it a notch to 56000 so the printer has more time to print instead of talk. Marlin, the software, is like the plans for a moon lander. Sure, they're nice plans, but are you going to give them to a first grader with a tool box full of plastic toys or an actual space agency with facilities and everything? All the software and plans mean nothing if you don't pay attention to the limitations of the physical hardware.

But if the baud rate is set to "Diesel" in my Lamborgini I have to use Diesel? Or can I lower it to 112500 in Octoprint without changing the firmware? I ask because then I have to complile the firmware on my own which I did not done yet.

What is the use to run on Super fuel (serial speed) when the driver (CPU) can*t handle it...

OctoPrint can adapt to a baudrate that the printer baord provides. The printer board baudrate is set in the firmware.

Have you tried using auto-auto and letting it connect at whatever the firmware is set to? Anyone making firmware that understands what their doing would have left it set to a default value. If it was connecting before and you didn't change the printer, and you haven't done anything really except just install the update, then I'm guessing some oddball niche case might have come about (I'm notorious for finding them) and something is wacked out with the USB that OctoPrint is getting garbage from the operating system/driver. This is the point I would format the RasPi SD card and start over with a fresh copy. Whenever an update kills everything, it's never a bad idea to start from blank and eliminate a conflict that wasn't foreseen. Programmers try and catch most of the oddball exceptions and edge cases but we can't always account for them all.

Ok, then it is really interesting why it worked before but I understand why it runs only with 250000. Also in between it does not run with AUTO/AUTO also. It in my opinion it seem a problem with the update that is solved now with downgrade and now upgrade again. So its fine now but I will test again if everything works fluently with 250000. That's the firmware standard...

250000 default? That would be your brand's default then. Example, the Creality Ender 3 I got worked at 115200 with the included 1.1.4 board but when I installed the updated 4.2.7 board it still runs at 115200. 8bit cpu vs 32bit cpu on those boards. Marlin has a whole pile of preset boards that get chosen at compile time so the fact your printer even works at all would mean you have the right stuff. If it's working after a downgrade/upgrade again then yeah, I'd say it was some random garbage in the system. It happens. Glad to see it's working now at least. :slight_smile:

I write a changelog for every single release and every update notification tells you to read it. Still I see so many people who just blindly guess what might have changed. Boggles my mind.

For reference:

and for good measure since you didn't specify from which version you updated:

1 Like