Can't connect to the printer after upgrading to 1.4.0

What is the problem?

I've upgraded Octoprint to version 1.4.0, and after that I can not connect to my printer. Since I've upgraded my printer board to SKR v1.3, connections was never straight forward anymore, but I could connect.

What did you already try to solve it?
Using "sudo screen /dev/ttyACM0" I can send commands to the printer, so it's connected and receiving commands. I've checked logs, checked that pi user is in dialout group and checked /dev/ttyACM0 permissions, but I don't know where else to look.

Logs

#### AUTODETECT  ####
Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyACM0', u'/dev/ttyS0']
Trying /dev/ttyACM0
Could not connect to or enter programming mode on /dev/ttyACM0, might not be a printer or just not allow programming mode
Trying /dev/ttyS0
Could not connect to or enter programming mode on /dev/ttyS0, might not be a printer or just not allow programming mode
Changing monitoring state from "Detecting serial port" to "Error: Failed to autodetect serial port, please set it manually."
Failed to autodetect serial port, please set it manually.


#### MANUAL SETTING ####
Connecting to: /dev/ttyACM0
Changing monitoring state from "Offline" to "Opening serial port"
Connected to: Serial<id=0x67753830, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=20.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Changing monitoring state from "Opening serial port" to "Connecting"
There was a timeout while trying to connect to the printer
Changing monitoring state from "Connecting" to "Offline"
Connection closed, closing down monitor

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)

OctoPrint 1.4.0
OctoPi Version 0.15.1, running
Raspberry Pi 3 Model B Plus Rev 1.3
Printer Tevo Tarantula, Marlin 2.0.x, 2019-11-18
Board Bigtree SKR 1.3, Baud 115200, Protocol 1.0, PSU Generic

I've managed to solve it myself.
I've wrote down the parameters I had configured in octoprint "Serial Connection" section and started to play with that.

What solved my problem was to disable the option "Wait for start on connect", inside "Protocol Fine Tunning", under "Firmware & Protocol".

I've found that after enabling the uart for LED monitoring, a common 'improvement' option, my OctoPrint now looks for a printer on /dev/ttyS0, which is expected if the uart is now enabled... Which follows that OctoPrint is polling this port/device and not your USB device. Especially if you have modded things and now you're here :wink:

It looks like I have the same problem, my OctoPrint try to use /dev/ttyS0
But I have NOT enabled any UART... at least what I know... How can I check that and disabled it?

Looks like 1.41rc1 may have made things worse. I can't connect to my SKR 1.4 Turbo on /dev/ttyACM0, and it works fine through Pronterface on my laptop and sudo screen /dev/ttyACM0 on the Raspberry Pi running OctoPrint. I made multiple attempts to connect, using both auto-detect and explicit selection of /dev/ttyACM0 and a few different baud rates. The firmware was compiled with a baud rate of 250000, but I don't think that matters over an acm connection.

I've installed the "Remove ttyS Ports" plugin as well with no effect. Here's the serial.log output:

2020-07-07 08:23:00,668 - serial.log is currently not enabled, you can enable it via Settings > Serial Connection > Log communication to serial.log
2020-07-07 08:25:37,488 - serial.log is currently not enabled, you can enable it via Settings > Serial Connection > Log communication to serial.log
2020-07-07 08:31:58,817 - Enabling serial logging
2020-07-07 08:32:07,307 - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-07-07 08:32:07,381 - Performing autodetection with 1 port/baudrate candidates: /dev/ttyACM0@250000
2020-07-07 08:32:07,384 - Connecting to port /dev/ttyACM0, baudrate 250000
2020-07-07 08:32:07,459 - Trying port /dev/ttyACM0, baudrate 250000
2020-07-07 08:32:07,461 - Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
2020-07-07 08:32:07,468 - Send: M112
2020-07-07 08:32:07,468 - Send: N1 M112*32
2020-07-07 08:32:07,469 - Send: N2 M104 T0 S0*35
2020-07-07 08:32:07,469 - Send: N3 M140 S0*102
2020-07-07 08:32:07,495 - Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
2020-07-07 08:32:07,508 - Connected to: None, starting monitor
2020-07-07 08:32:07,509 - Connection closed, closing down monitor
2020-07-07 08:32:20,022 - Changing monitoring state from "Offline" to "Opening serial connection"
2020-07-07 08:32:20,035 - Connecting to port /dev/ttyACM0, baudrate 250000
2020-07-07 08:32:20,064 - Changing monitoring state from "Opening serial connection" to "Connecting"
2020-07-07 08:32:20,067 - Connected to: Serial<id=0xa771e8f0, open=True>(port='/dev/ttyACM0', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-07-07 08:32:20,075 - Send: N0 M110 N0*125
2020-07-07 08:32:50,073 - No answer from the printer within the connection timeout, trying another hello
2020-07-07 08:32:50,085 - Send: N0 M110 N0*125
2020-07-07 08:32:53,867 - Connection closed, closing down monitor
2020-07-07 08:32:53,871 - Changing monitoring state from "Connecting" to "Offline"
2020-07-07 08:33:05,111 - Changing monitoring state from "Offline" to "Opening serial connection"
2020-07-07 08:33:05,126 - Connecting to port /dev/ttyACM0, baudrate 115200
2020-07-07 08:33:05,144 - Changing monitoring state from "Opening serial connection" to "Connecting"
2020-07-07 08:33:05,152 - Connected to: Serial<id=0xa5371870, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2020-07-07 08:33:05,158 - Send: N0 M110 N0*125
2020-07-07 08:33:35,164 - No answer from the printer within the connection timeout, trying another hello
2020-07-07 08:33:35,176 - Send: N0 M110 N0*125
2020-07-07 08:33:45,167 - There was a timeout while trying to connect to the printer
2020-07-07 08:33:45,179 - Changing monitoring state from "Connecting" to "Offline"
2020-07-07 08:33:45,185 - Connection closed, closing down monitor

EDIT: And now I'm completely down the rabbit hole. I thought it might be a Raspberry Pi 4 incompatibility, but swapping the SD card back to my Pi 3B+ resulted in an unbootable image that no longer worked in either unit. I've imaged a fresh SD card with OctoPi and I'm now back at square one with 1.3.12, which does connect just fine.

Upgrade to 1.4.0 was successful; I can still connect.

EDIT: I was able to mount the original OctoPi SD card's rootfs on my Ubuntu laptop and can get at any files you may need for forensics.