MK4 - Octoprint cannot connect
My MK4 kit is ready. Test is ok and first testprint looks nice.
Now I want to connect my Rpi Octoprint which I used for years on my MK3 but it will not connect:
Could not autodetect your printer No working connection parameters could be found. Are you sure your printer is physically connected and supported? No more candidates to test, and no working port/baudrate combination detected.
Prusa Connect and PrusaLink are disabled, wifi is not configured. Tried two USB-A to USB-C datacables that work with other devices.
Do I need some other setup on the MK4? Hardware error? Hint to test the USB-C port?
RE: MK4 - Octoprint cannot connect
I tried AUTO and manual settings but cannot connect. This Octoprint RPi connects to my MK3 in a second.
Still thinking I might need a setting on the MK4 to enable USB-C for Octoprint use.
RE: MK4 - Octoprint cannot connect
Can you post the contents of your /boot/cmdline.txt and /boot/config.txt on the Pi?
RE: MK4 - Octoprint cannot connect
Also you could ssh into your pi and execute "sudo dmesg | grep serial"
This is the output on mine:
pi@octopi-mk4:~ $ sudo dmesg | grep serial [ 1.741351] uart-pl011 fe201000.serial: there is not valid maps for state default [ 1.741829] uart-pl011 fe201000.serial: cts_event_workaround enabled [ 1.741949] fe201000.serial: ttyAMA0 at MMIO 0xfe201000 (irq = 51, base_baud = 0) is a PL011 rev2 [ 8.165478] uart-pl011 fe201000.serial: no DMA platform data
The correct value for the printer's serial port is "ttyAMA0" for me. I am on this version of octopi: "OctoPrint 1.10.1Python 3.9.2OctoPi* 1.0.0cam (build 2023.10.09.154319)"
If you are using an older image of octopi, the value for the serial port could be different, they changed something in the newer PiOS. But the output from dmesg should give you the correct value for the serial port.
RE:
Here are he contents.
/boot/cmdline.txt console=serial0,115200 console=tty1 root=PARTUUID=f12f8521-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
I left out a range of commented-out lines:
/boot/config.txt # Enable audio (loads snd_bcm2835) dtparam=audio=on [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] #dtoverlay=vc4-fkms-v3d # enable raspicam start_x=1 gpu_mem=128 dtoverlay=hyperpixel4 overscan_left=0 overscan_right=0 overscan_top=0 overscan_bottom=0 enable_dpi_lcd=1 display_default_lcd=1 display_rotate=1 dpi_group=2 dpi_mode=87 dpi_output_format=0x7f216 hdmi_timings=480 0 10 16 59 800 0 15 113 15 0 0 0 60 0 32000000 6
[ 2.661577] uart-pl011 3f201000.serial: cts_event_workaround enabled [ 2.664576] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2 [ 10.590168] uart-pl011 3f201000.serial: no DMA platform data
I still think my issue is not with the RPi as it functions ok with my MK3.
RE: MK4 - Octoprint cannot connect
Which port does OctoPrint use (or want to use) to connect to the MK4?
RE: MK4 - Octoprint cannot connect
Did you try to enable the auto-connect option?
Could you enable the serial.log and post the log file after a reboot of the Pi? Perhaps we can see a problem in there.
RE: MK4 - Octoprint cannot connect
dmesg after plugin in usb cable:
usb 1-1.2: new full-speed USB device number 5 using dwc_otg usb 1-1.2: New USB device found, idVendor=2c99, idProduct=000d, bcdDevice= 1.00 usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.2: Product: Original Prusa MK4 usb 1-1.2: Manufacturer: Prusa Research (prusa3d.com) usb 1-1.2: SerialNumber: XXXXX-YYYYY cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device usbcore: registered new interface driver cdc_acm cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Serial log after trying to connect: (Connecting with AUTO gave a much longer log)
Changing monitoring state from "Offline" to "Detecting serial connection" Performing autodetection with 1 port/baudrate candidates: /dev/ttyACM0@115200 Trying port /dev/ttyACM0, baudrate 115200 Handshake attempt #1 with timeout 2.0s Connected to: PackingSerial<id=0x7161ff90, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor Send: N0 M110 N0*125 Handshake attempt #2 with timeout 2.0s Send: N0 M110 N0*125 Handshake attempt #3 with timeout 2.0s Send: N0 M110 N0*125 Changing monitoring state from "Detecting serial connection" to "Error" Changing monitoring state from "Error" to "Offline after error" Connection closed, closing down monitor
But then I connected the MK4 to my Windows pc and got success with connecting printrun/pronterface. The MK4 must be ok.
I installed for test a fresh new Octopi on a Pi4 and... That worked! I got a near perfect Bed Leveling Visual for my new MK4.
Strange that the three year old Pi3b+ setup will not connect, I will leave it as long as the MK3 stays here. If I might decide not to use PrusaLink I will setup a new Octoprint on a Rpi Zero 2W for the MK4.
Thank you for your time.
RE: MK4 - Octoprint cannot connect
Glad you got it working. Installing a new copy of OctoPrint on a new MicroSD would have been my next suggestion. The latest images have gotten so much better at working out of the box, e.g. with the newer Pi Camera modules. To update I create a backup of my current config, then I flash the latest image onto a new MicroSD, start the setup and then just upload my backup from the old version. After restoring the backup the new system has practically all the settings and plugins from before. And as I do not want to keep old gcode files, the new system is usually also leaner and faster than the old one was.