Difficulties connecting to Octoprint

What is the problem?
I feel Its Close to working, but Octoprint is failing to properly connect to my RPi
I am seeing temperature info from my printer, and If I start a print (via local printer controls) I see the file name on the Octo print page

However the following info appears on the terminal page
Connecting to: /dev/ttyAMA0
Changing monitoring state from "Offline" to "Opening serial port"
Connected to: Serial<id=0xb24bc390, open=True>(port='/dev/ttyAMA0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
Changing monitoring state from "Opening serial port" to "Connecting"
Send: N0 M110 N0125
Send: N0 M110 N0
125
No answer from the printer within the connection timeout, trying another hello
Send: N0 M110 N0*125
Recv: NORMAL MODE: Percent done: 23; print time remaining in mins: 161
Recv: SILENT MODE: Percent done: 24; print time remaining in mins: 160
Recv: NORMAL MODE: Percent done: 24; print time remaining in mins: 160
Recv: SILENT MODE: Percent done: 24; print time remaining in mins: 160
There was a timeout while trying to connect to the printer
Changing monitoring state from "Connecting" to "Offline"
Connection closed, closing down monitor

It seem RPi is sending info to the wifi and vice versa. but cannot achieve connection

Any help greatlyappreciated

Your post doesn't contain enough information for us to help you. In addition, I think you are a bit confused about how the pieces are connected together and how they are normally identified.

OctoPrint is the application software (usually) running on a single board computer like a Raspberry Pi (RPi). The single board computer requires an operating system one of which is OctoPi (which bundles the OctoPrint application and other useful applications). Normally, interaction with OctoPrint is via a web browser on another machine. This other machine is normally where you slice your models (i.e. generate the gcode that describes the model you are trying to print).

Your 3D printer connects to the single board computer (RPi) via a USB cable (other methods of communicating with your printer are not currently supported by OctoPrint).

If you read https://community.octoprint.org/t/need-help-read-this-first/30 and in particular, provide as much information as possible you should see that a major piece of information needed is the Printer model and the firmware version.

If you can add some of this missing information, we will have a much better chance at providing the help you have requested.

1 Like

ok, sorry

I'm running a prusa mk3
with a RPi zero w. connected via GPIO header directly to printers main board

I have made the octopi image, and put this on as card

I get to the octoprint interface by directing my web browser to the IP address my RPi is connecting from

all of this is working

what I have problems with is the connection status

it states it is not connected

efforts to connect lead to the hello being sent, then time out, and never achieving connected status

I believe there are instructions for using the RPi zero with a Prusa Mk3 and in those instructions are steps to change where the "serial" port on the RPi zero is located. If I remember correctly, there are also some other threads in these forums that discuss the changes necessary. I'm guessing that this step wasn't completed successfully.

See if this article helps.

1 Like

it is also stated on the Octoprint/Octopi pages that the Pi Zero's are NOT recommended.

4 Likes

I'm not familiar with the RPi Zero but I use a RPi 4 with great success. The one thing is the baud rate has to be correct. Auto will work sometimes but find out the baud rate of the printer and manually set the baud rate on OctoPrint. I manually set the baud rate and the USB port manually and have no problems connecting.

b-morgan's reply is correct, and the only one useful to someone using a RPi-ZeroW. I had previously used the Prusa one from their site which works with the Prusa printers out of the box. The article posted gives detailed instructions on how to change a couple config files to repurpose the serial port so you can use it because it needs to install a serial driver on the GPIO pins. This can be confusing becuase then it uses ttyAMA0 which multiple posts say you can't use -- which is correct if you are using the USB port to connect, but necessary with the GPIO .

Thanks for posting that link j-morgan, the information may be in here somewhere else but I couldn't find it after an hour of searching.

The downside to the Prusa version is it is a couple versions old, and when I got the message I could upgrade to the new version of Octoprint it made it use very high CPU time when doing nothing, plus I think a memory leak. I would highly suggest using the mainstream releases and customizing the files as directed. It only takes about 2 minutes when you know what to change.

And by the way I am seriously sick of people saying "the PI ZeroW is not recommended". That is absolutely Zero help to someone who has one and is seeking assistance with their problem. There are a lot of people using it and it works just fine if it is configured correctly and you use a quality Micro SD card.. I am currently printing and streaming and it is hopping between 37 and 59% CPU and running very smoothly. Its a nice inexpensive and convenient package. It does help if you are familiar with Linux and can tweak a few things if needed but following the instructions will make it run perfectly acceptably.

1 Like