Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)

What is the problem?

I have been using Octoprint without incident for about 5 months now, but suddenly on booting up, I am now getting the above error message. With my limited knowledge I thought the solution would be to add serial ports as I had never seen a reason to add new ports or rates. Did that and then I came across the error " Offline (Error: Could not write to serial port) ". Please be gentle with the terminology, as there is a strong likelihood that I will request your replies to be dumbed down in layman's terms for me to understand. Thanks for your time!

What did you already try to solve it?

Added additional serial ports, swapped to a different micro-usb cable, tried using a different usb port on the pi, tried running in safe mode.

Have you tried running in safe mode and if so did it solve the issue?

Yes, it did not resolve the issue

Complete Logs

octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support! Not log excerpts, complete logs.)

2020-11-14 20:13:07,961 - Changing monitoring state from "Offline" to "Detecting serial connection"

2020-11-14 20:13:08,032 - Performing autodetection with 138 port/baudrate candidates: /dev/ttyAMA0@115200, /dev/ttyAMA0@250000, /dev/ttyAMA0@115200, /dev/ttyAMA0@250000, /dev/ttyprintk@115200, /dev/ttyprintk@250000, /dev/tty63@115200, /dev/tty63@250000, /dev/tty62@115200, /dev/tty62@250000, /dev/tty61@115200, /dev/tty61@250000, /dev/tty60@115200, /dev/tty60@250000, /dev/tty59@115200, /dev/tty59@250000, /dev/tty58@115200, /dev/tty58@250000, /dev/tty57@115200, /dev/tty57@250000, /dev/tty56@115200, /dev/tty56@250000, /dev/tty55@115200, /dev/tty55@250000, /dev/tty54@115200, /dev/tty54@250000, /dev/tty53@115200, /dev/tty53@250000, /dev/tty52@115200, /dev/tty52@250000, /dev/tty51@115200, /dev/tty51@250000, /dev/tty50@115200, /dev/tty50@250000, /dev/tty49@115200, /dev/tty49@250000, /dev/tty48@115200, /dev/tty48@250000, /dev/tty47@115200, /dev/tty47@250000, /dev/tty46@115200, /dev/tty46@250000, /dev/tty45@115200, /dev/tty45@250000, /dev/tty44@115200, /dev/tty44@250000, /dev/tty43@115200, /dev/tty43@250000, /dev/tty42@115200, /dev/tty42@250000, /dev/tty41@115200, /dev/tty41@250000, /dev/tty40@115200, /dev/tty40@250000, /dev/tty39@115200, /dev/tty39@250000, /dev/tty38@115200, /dev/tty38@250000, /dev/tty37@115200, /dev/tty37@250000, /dev/tty36@115200, /dev/tty36@250000, /dev/tty35@115200, /dev/tty35@250000, /dev/tty34@115200, /dev/tty34@250000, /dev/tty33@115200, /dev/tty33@250000, /dev/tty32@115200, /dev/tty32@250000, /dev/tty31@115200, /dev/tty31@250000, /dev/tty30@115200, /dev/tty30@250000, /dev/tty29@115200, /dev/tty29@250000, /dev/tty28@115200, /dev/tty28@250000, /dev/tty27@115200, /dev/tty27@250000, /dev/tty26@115200, /dev/tty26@250000, /dev/tty25@115200, /dev/tty25@250000, /dev/tty24@115200, /dev/tty24@250000, /dev/tty23@115200, /dev/tty23@250000, /dev/tty22@115200, /dev/tty22@250000, /dev/tty21@115200, /dev/tty21@250000, /dev/tty20@115200, /dev/tty20@250000, /dev/tty19@115200, /dev/tty19@250000, /dev/tty18@115200, /dev/tty18@250000, /dev/tty17@115200, /dev/tty17@250000, /dev/tty16@115200, /dev/tty16@250000, /dev/tty15@115200, /dev/tty15@250000, /dev/tty14@115200, /dev/tty14@250000, /dev/tty13@115200, /dev/tty13@250000, /dev/tty12@115200, /dev/tty12@250000, /dev/tty11@115200, /dev/tty11@250000, /dev/tty10@115200, /dev/tty10@250000, /dev/tty9@115200, /dev/tty9@250000, /dev/tty8@115200, /dev/tty8@250000, /dev/tty7@115200, /dev/tty7@250000, /dev/tty6@115200, /dev/tty6@250000, /dev/tty5@115200, /dev/tty5@250000, /dev/tty4@115200, /dev/tty4@250000, /dev/tty3@115200, /dev/tty3@250000, /dev/tty2@115200, /dev/tty2@250000, /dev/tty1@115200, /dev/tty1@250000, /dev/tty0@115200, /dev/tty0@250000, /dev/tty@115200, /dev/tty@250000, /dev/cuse@115200, /dev/cuse@250000

2020-11-14 20:13:08,034 - Trying port /dev/ttyAMA0, baudrate 115200

2020-11-14 20:13:08,038 - Connecting to port /dev/ttyAMA0, baudrate 115200

2020-11-14 20:13:08,042 - Handshake attempt #1 with timeout 2.0s

2020-11-14 20:13:09,128 - Could not write anything to the serial port in 5 tries, something appears to be wrong with the printer communication

2020-11-14 20:13:09,168 - Changing monitoring state from "Detecting serial connection" to "Offline (Error: Could not write to serial port)"

2020-11-14 20:13:09,175 - Closing down send loop

2020-11-14 20:13:20,977 - Changing monitoring state from "Offline" to "Detecting serial connection"

2020-11-14 20:13:21,064 - Performing autodetection with 138 port/baudrate candidates: /dev/ttyAMA0@115200, /dev/ttyAMA0@250000, /dev/ttyAMA0@115200, /dev/ttyAMA0@250000, /dev/ttyprintk@115200, /dev/ttyprintk@250000, /dev/tty63@115200, /dev/tty63@250000, /dev/tty62@115200, /dev/tty62@250000, /dev/tty61@115200, /dev/tty61@250000, /dev/tty60@115200, /dev/tty60@250000, /dev/tty59@115200, /dev/tty59@250000, /dev/tty58@115200, /dev/tty58@250000, /dev/tty57@115200, /dev/tty57@250000, /dev/tty56@115200, /dev/tty56@250000, /dev/tty55@115200, /dev/tty55@250000, /dev/tty54@115200, /dev/tty54@250000, /dev/tty53@115200, /dev/tty53@250000, /dev/tty52@115200, /dev/tty52@250000, /dev/tty51@115200, /dev/tty51@250000, /dev/tty50@115200, /dev/tty50@250000, /dev/tty49@115200, /dev/tty49@250000, /dev/tty48@115200, /dev/tty48@250000, /dev/tty47@115200, /dev/tty47@250000, /dev/tty46@115200, /dev/tty46@250000, /dev/tty45@115200, /dev/tty45@250000, /dev/tty44@115200, /dev/tty44@250000, /dev/tty43@115200, /dev/tty43@250000, /dev/tty42@115200, /dev/tty42@250000, /dev/tty41@115200, /dev/tty41@250000, /dev/tty40@115200, /dev/tty40@250000, /dev/tty39@115200, /dev/tty39@250000, /dev/tty38@115200, /dev/tty38@250000, /dev/tty37@115200, /dev/tty37@250000, /dev/tty36@115200, /dev/tty36@250000, /dev/tty35@115200, /dev/tty35@250000, /dev/tty34@115200, /dev/tty34@250000, /dev/tty33@115200, /dev/tty33@250000, /dev/tty32@115200, /dev/tty32@250000, /dev/tty31@115200, /dev/tty31@250000, /dev/tty30@115200, /dev/tty30@250000, /dev/tty29@115200, /dev/tty29@250000, /dev/tty28@115200, /dev/tty28@250000, /dev/tty27@115200, /dev/tty27@250000, /dev/tty26@115200, /dev/tty26@250000, /dev/tty25@115200, /dev/tty25@250000, /dev/tty24@115200, /dev/tty24@250000, /dev/tty23@115200, /dev/tty23@250000, /dev/tty22@115200, /dev/tty22@250000, /dev/tty21@115200, /dev/tty21@250000, /dev/tty20@115200, /dev/tty20@250000, /dev/tty19@115200, /dev/tty19@250000, /dev/tty18@115200, /dev/tty18@250000, /dev/tty17@115200, /dev/tty17@250000, /dev/tty16@115200, /dev/tty16@250000, /dev/tty15@115200, /dev/tty15@250000, /dev/tty14@115200, /dev/tty14@250000, /dev/tty13@115200, /dev/tty13@250000, /dev/tty12@115200, /dev/tty12@250000, /dev/tty11@115200, /dev/tty11@250000, /dev/tty10@115200, /dev/tty10@250000, /dev/tty9@115200, /dev/tty9@250000, /dev/tty8@115200, /dev/tty8@250000, /dev/tty7@115200, /dev/tty7@250000, /dev/tty6@115200, /dev/tty6@250000, /dev/tty5@115200, /dev/tty5@250000, /dev/tty4@115200, /dev/tty4@250000, /dev/tty3@115200, /dev/tty3@250000, /dev/tty2@115200, /dev/tty2@250000, /dev/tty1@115200, /dev/tty1@250000, /dev/tty0@115200, /dev/tty0@250000, /dev/tty@115200, /dev/tty@250000, /dev/cuse@115200, /dev/cuse@250000

2020-11-14 20:13:21,067 - Trying port /dev/ttyAMA0, baudrate 115200

2020-11-14 20:13:21,071 - Connecting to port /dev/ttyAMA0, baudrate 115200

2020-11-14 20:13:21,075 - Handshake attempt #1 with timeout 2.0s

2020-11-14 20:13:22,090 - Could not write anything to the serial port in 5 tries, something appears to be wrong with the printer communication

2020-11-14 20:13:22,112 - Changing monitoring state from "Detecting serial connection" to "Offline (Error: Could not write to serial port)"

2020-11-14 20:13:22,142 - Closing down send loop

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
Using an Ender 3 Pro
Raspberry Pi 3B+
OctoPrint 1.4.2
Python 1.7.16
OctoPi 0.17.0
Tried on Chrome and Firefox
Win 10

1 Like

im following this topic, also 3b+ and e3pro, the same octo versions, im getting this issue since i tried with a stronger 5v/2.5a power adapter my berry, since then my usb ports are dead, all of them, doesnt recognizing anything.

1 Like

that's interesting. I got one of the cana kits, so I have the stock power adapter. I guess it's worth mentioning then, that all of my USB ports DO still function.

I've had this issue for a while and managed to resolve it, so I wanted to make a public record. Reinstalling octopi and restoring octoprint from a backup didn't fix it, despite it appearing to be a hardware config issue. In the end I basically did something very Windows - remove the device that was causing problems from device manager and try again. Using OctoPi on Raspberry Pi 4 with Ender-3 - this may be entirely Octopi specific.

Note: this might break things, especially if you don't have a very basic setup.
Make a backup first.
I don't know what I'm doing.

  1. Disconnect printer from USB, both can keep running
  2. Use putty and connect to octopi, default username is pi, default password is raspberry
  3. Navigate to /dev using cd /dev
  4. Use ls to list devices. Check if you can see ttyAMA0 and/or ttyUSB0 (it was the first for me)
  5. Use sudo del ttyAMA0 to delete the device, and do the same for USB0. You made a backup, right?
  6. Connect the printer to USB once again
  7. If you have auto-connect set up, simply restart your Raspberry Pi or just click the connect button.

The printer should now automagically connect as it used to.

2 Likes

I was encouraged when I found this post until I read the part about "I don't know what I am doing" You were kidding, right?
I tried this anyway figuring I had nothing to loose. The only way I know of to fix this is to restore from backup.
Here is what I got...

pi@octopi:/dev $ sudo del ttyAMA0
sudo: del: command not found

I'm having the same issue. Due to that issue there is no point to use octoprint software at all.

Hi, you should try rm instead of del; that'll do it for you.

Thanks!

John Lytle

Hi I am trying to use this fix to see if this is the problem for me, I cannot remove ttyAMA0 as it is saying "rm: cannot remove 'ttyAMA0': No such file or directory" when I can see that it is there... very confused, I am not a tech guru at all so be kind!

I had the same problem and found your post. I had the random thought that if it's a usb issue, maybe somehow octopi saves the first connected devices for each usb and maybe I switched the cables. I switched the two usb cables and BOOM! it works. I had to post to see if it helps you or anyone.

Hi, i maybe dumb but im having the same issue as original post. RaspberryPi Zero W2 worked previously with same printer.
Tried safemode did not fix
reflashed with current version of octoprint, reflashed with 1.7 version. did not fix.
also tried multiple usb cables on both reflashes, cables worked when hooking up to my widows 10 computer. c
can connect to Ender3v2 using pronterface and all cables i tested with octoprint.
tried a different/new Raspbery Pi Zero W2 still didnt work. retested all above on new RPI, same cannot connect.
please help with additional ideas