Notifications
Clear all

[Solved] Octoprint state "Offline after error" after initial setup  

  RSS
Matt
 Matt
(@matt-2)
Estimable Member
Octoprint state "Offline after error" after initial setup

I have a MK3S upgraded to MK3S+, with a Raspberry Pi Zero W connected by the GPIO pins. I only use it for monitoring print progress so I'm not concerned about the data integrity issues.

Previously it was working from the old Prusa image which was simple to set up and just worked, but I've seen warnings in Octoprint that it's an old version that is soon to be unsupported. I found new instructions for how to create a new Octoprint image at  https://help.prusa3d.com/en/article/octoprint-configuration-and-install_2182 and followed them through to the end, and now have a system that won't recognise the printer through the serial connection.

Flashing the Octoprint image onto the micro SD card worked fine, connecting the RasPI to my network did as well (though at this point I powered the Pi Zero W by micro USB without connecting to the printer), I found the local IP address and logged into Octoprint, then added an MK3S printer profile with the specified dimensions and the IpOnConnect plugin. Everything up to this point was behaving as expected.

Instructions from this point said the Pi needed to be connected to the printer, so I added it in and powered the printer on. The printer hadn't been powered on since removing the module, so I had left the printer's RPi port connection option on. After a little while, the Raspberry Pi appeared again on my local network.

I opened an SSH connection using PuTTY, entered the command sudo nano /boot/config.txt to open config.txt, added the line dtoverlay=pi3-miniuart-bt to the bottom and saved with Ctrl+X. I didn't bother adding in the lines that said they were specific to the Pi Zero 2 as I have the previous revision.

I then entered the command sudo nano /boot/cmdline.txt to open cmdline.txt. It had a single line of text in it, starting with console=serial0,115200 followed by some more code. As Prusa use colours to denote what needs actioning in their guides, and only the 115200 portion was coloured on the instructions, I deleted the highlighted piece of text 115200 just leaving console=serial0, followed by the code that came after the deleted number.

I then rebooted the Pi zero, logged back into Octoprint, and added a serial port named /dev/ttyAMA0 (noting the end character is a zero not a capital O), telling it to auto connect to the printer on start. I then changed the serial port on the main screen to the above port, tried to connect, and it just gives the error "Offline after error: No more candidates to test, and no working port/baudrate combination detected". I enabled serial logging, and every connection attempt at 7 different baud rates gives the error "SerialException: '[Errno 13] could not open port /dev/ttyAMA0: [Errno 13] Permission denied: '/dev/ttyAMA0'' @ comm.py:_open_serial:3779"

I have no experience with Raspberry Pi programming and have little idea what I've done wrong or where to start troubleshooting. Possibly I've gone wrong deleting the text in cmdline.txt as it's not very clear to me on precisely what to do but I don't want to delete text I'm not being told to in case it breaks it worse and I have to start again from scratch.

Is there anyone out there that can offer some advice on how to get this working again?

 

Thanks in advance

Best Answer by JimB:

I believe all of "console=serial0,115200 " should be removed so that line begins with "console=tty1".

Posted : 03/01/2022 11:53 am
Matt
 Matt
(@matt-2)
Estimable Member
Topic starter answered:
RE: Octoprint state "Offline after error" after initial setup

To clarify, I interpreted the following instruction:

"Look for the following string (text) and delete it"  console=serial0,115200 (bold type highlighted in blue in instructions)

as to mean edit the cmdline.txt file from:

console=serial0,115200 console=tty1 root=PARTUUID=75dbd080-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

to:

console=serial0, console=tty1 root=PARTUUID=75dbd080-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Posted : 03/01/2022 12:13 pm
JimB
 JimB
(@jimb)
Estimable Member
RE: Octoprint state "Offline after error" after initial setup

I believe all of "console=serial0,115200 " should be removed so that line begins with "console=tty1".

Posted : 03/01/2022 12:46 pm
FANO and liked
Matt
 Matt
(@matt-2)
Estimable Member
Topic starter answered:
RE: Octoprint state "Offline after error" after initial setup

That's fixed it, Thanks!

Posted : 03/01/2022 1:22 pm
Share: