Octoprint sees no serial ports - ok on pronterface

What is the problem?

Seems since I moved to the most recent stable version of OctoPi and OctoPrint, the serial port on my printer (MKS SGEN_L v1 main board) cannot be found. Replaced cables with known good data cable. Soldered what I also think were bad connections on the main board USB connector. Sometimes OctoPrint will see it and I can connect and then it will drop randomly. Most of the time it doesn't find it. Refreshed, rebooted. If I use the same cable to plug to my PC directly I am good to connect to Proterface with a stable connection

What did you already try to solve it?

Replaced the USB cable with a known good data cable

Have you tried running in safe mode?

No, not sure how to do that but in reading other posts with this similar error, it doesn't make any different

Did running in safe mode solve the problem?

See above

Systeminfo Bundle

octoprint-systeminfo-20250602153738.zip (52.7 KB)

Also here is the Octoprint.log
octoprint (3).log (318.9 KB)

Additional information about your setup

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

Octoprint 1.11.1
OctoPi 1.10 Build 2025.05.13
Python 3.11.2
Printer is a modified Artillery Sidewinder X1 v1 with a MKS SGEN_L V1 main board
PC Is a Win 11 with Chrome browser

with serial.log enabled can you please try the connection again and then share an updated system info bundle? doesn't look like much of the serial communication was captured in the one you uploaded. Thinking there may be a missing OK somewhere.

So I turned everything on from scratch, Pi came up, printer came up, plugged in the USB cable and OctoPrint saw it and I was able to connect. Got this from the console;

"Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to port /dev/ttyACM0, baudrate 250000
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: Serial<id=0x6e950b20, open=True>(port='/dev/ttyACM0', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor"

Restarted OctoPrint and it came up and connected ok.
Restarted the Pi and when OctoPrint/OctoPi came up it saw no serial ports. Attached are the new OctoPrint.log, serial.log file and system bundle. Jeff
octoprint-logs.zip (390.3 KB)
octoprint-systeminfo-20250602195939.zip (61.7 KB)

These files:

are already included here:

Hence the word bundle. :wink:


Actually, a connection is established:

...
2025-06-02 19:57:01,007 - Recv:  T:23.91 /0.00 B:26.36 /0.00 @:0 B@:0
2025-06-02 19:57:03,022 - Recv:  T:23.75 /0.00 B:26.36 /0.00 @:0 B@:0
...

But for unknown reasons ist is closed again:

2025-06-02 19:57:08,227 - Connection closed, closing down monitor
2025-06-02 19:57:08,244 - Changing monitoring state from "Connecting" to "Offline"

Does this happen if you restart OctoPrint in safe mode? I see you only have the 1 3rd party plugin (enclosure) but just to validate if the same issue exists with that plugin not running would be a good diagnostic step.

Ok so after some testing, here is what I have found.

On a fresh power up of the printer and the Pi, Octoprint comes up, I log in and it detects a serial port and I am able to communicate with the printer.

From the Terminal - Changing monitoring state from "Offline" to "Opening serial connection"
Connecting to port /dev/ttyACM0, baudrate 250000
Changing monitoring state from "Opening serial connection" to "Connecting"
Connected to: Serial<id=0x6e950b20, open=True>(port='/dev/ttyACM0', baudrate=250000, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor

If I reboot Octoprint from OctoPrint, everything comes up ok again, serial port found and connection made.

If I reboot OctoPrint into SafeMode all is still ok. But.....

If I reboot the system, the PI, and everything comes up, it no longer can find the serial port, even in SafeMode.

*****Rebooted the PI
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error"
Changing monitoring state from "Error" to "Offline after error"

I opened up a SSH connection to the Pi and it seems from when it works to after a PI reboot and it stops, when I do a "dmesg | grep tty", It no longer finds, creates or whatever it does the USB ACM Ddevice ttyACM0, as this line is missing from detecting a serial port to not;
cdc_acm 1-1.1.2:1.0: ttyACM0: USB ACM device

So I am not sure why on a power up of everything, it finds a serial port but after a reboot of the PI is doesn't. I don't know where else to look in Linux but again this was not happening before I updated to this last stable version.

OctoPrint Terminal-SSH data.zip (12 KB)

octoprint-systeminfo-20250603030115.zip (79.4 KB)

Jeff

If when in this no serial port state, what happens if you power cycle the printer leaving the pi powered on?

Well, today, nothing I try gets it to see a serial port. I documented all my test in the attached spreadsheet. I am going to swap out the Pi from the current 3b+ to a 4. More to come...

Jeff

No Serial Issue Testing.zip (8.0 KB)

I wonder if this issue is related to backpowering.

Hi jneiliii,

Thanks for your help. I don't think that is it as I have tried both USB cables with the power wire intact and without.

I modified some settings in the mainboard firmware (I have done this many times, running Marlin 2) and now I have no display...... Maybe a good excuse to get a new printer!!

Jeff