What is the problem?
It appears that Octoprint will connect to my serial port, however it times out after a short while, then says no connection.
There was a timeout while trying to connect to the printer Changing monitoring state from "Connecting" to "Offline" Connection closed, closing down monitor
What did you already try to solve it?
I have tried switching between auto and 115200 Baud Rates, as well as Auto and ttyUSB0 for the Serial Port.
I double checked that the serial output is open on the Pi as well.
Still no luck.
Additional information about your setup
I am using a JG Aurora Z-603S with a Raspi B V1.2.
2018-06-20 22:22:09,217 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2018-06-20 22:22:09,318 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0 [x12]
2018-06-20 22:22:36,578 - octoprint.util.comm - ERROR - Something crashed inside the serial connection loop, please report this in OctoPrint's bug tracker:
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1880, in _monitor
self._serial.write('\n')
File "/home/pi/oprint/local/lib/python2.7/site-packages/serial/serialposix.py", line 577, in write
raise SerialException('write failed: {}'.format(e))
SerialException: write failed: (9, 'Bad file descriptor')
Not only that, I'd say this is the cause of the issues. It's falling on its face during baudrate detection since the serial port doesn't allow reconfiguration (and later writing) for some reason. And the error handling of that needs to be extended to be able to handle this fatal issue of the file descriptor being reported as bad.
With that being said - I'd check the output of dmesg to check what's going on here underneath OctoPrint, it certainly doesn't look like the serial device is stable.
The printer. Or rather, the printer's connection the OS that OctoPrint is running on. At least that's what my current hunch is based on the errors you are seeing, the output of dmesg (when logged into your Pi via SSH) when it happens might shed some more light on things.