BTT SKR 1.4 Turbo No Connection

**What is the problem?**Good day to everyone, I have recently upgraded the m/Board on my Ender 5 Pro to the SKR 1.4 Turbo. Since then I'm getting ' Error: Failed to autodetect serial port, please set it manually.
Any help would be most welcome. Octoprint worked before the upgrade.
**What did you already try to solve it?**Tried restarting Octoprint and Computer

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!) octoprint.log (27.5 KB)

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)Octoprint v1.4, Octopi 0.17.0 on Ender 5 Pro, Big Tree Tech SKR 1.4 Turbo, Marlin 2.0 Bugfix, Safari 13.1.1, MacOS 10.14.6

Heres is a copy of dmesg

What isn't shown is the name within /dev. If this name doesn't match the patterns recognized by OctoPrint you can add it.

Directly after plugging in the running printer please type

ls -ltr /dev | tail
ls -l /sys/bus/usb-serial/devices/

Additionally you could type before and after you plug the printer in

lsusb

and look what lines are new afterwards.

Thanks for responding jandar.
I have attached a picture

The printer can be controlled via Pronterface

Your USB serial is named /dev/ttyAMA0.

Settings -> [Printer] Serial Connection -> tab General.

There is an edit field named "Additional serial ports". There you can enter your device name pattern /dev/ttyAMA*

Edit: I don't know why you don't have /sys/bus/usb-serial/devices/ it exists on my OctoPi which has the same version as yours :thinking:

Thanks Jandar, it tried to connect but now shows ' error: could not write to serial port'.

UPDATE: I changed the USB Cable and also tried a different USB socket on the Pi and now it detects the port automatically. Also it now connects.

If i send a File to the printer from the computer it heats up but doesn't print anything and looses connection with Octoprint. Tried pinging connection it just times out.

If I send the file via the attached LCD screen it will work fine.

One step further. This is likely the permission. This device has the group dialout and the user pi isn't in this group.

To see what groups the user pi has type

id

Somewhere in the list of groups should be dialout. If it isn't there you have to add pi to this group with

sudo /usr/sbin/usermod -a -G dialout pi

Hi Jandar,

Ok The file which I sent to the printer via the LCD(which is connected directly to the Pi) has printed successfully.

Now trying to connect to the Pi over the Wifi via the computer but it keeps failing and times out. I have restarted the Pi as well as the computer, but still nothing

Also noticed on the printers screen it shows the IP address which is normally 192.168.0.20

but now its showing 169.254.127.177

Update: Ive restarted the router which has sorted the IP address problem.

I'm going to try sending another file and see how it goes.

right as soon as it finishes heating it disconnects from the octoprint on the computer and doesn't print.

I ran the id command and next to the dial out is 20

I don't known the SKR 1.4 Turbo. I have tried to help with a serial problem.

You say the printer itself has an ip-address. Is the USB cable the correct way the connect a host with the printer?

The number in the groups next to dialout is the primary id but as the output of ls -l shows the name the number isn't important.

the IP address shown is the IP address of the Raspberry Pi

I hadn't seen this.

Maybe you should give the RPi a fixed ip in the DHCP settings of the router.

As you encounter a new problem, not failure to connect initially but a disconnect, you should attach a new octoprint.log and serial.log. The serial.log has to be enabled in the settings.

This is what it showed when I inputted 'id'

uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),5(tty),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),997(gpio),998(i2c),999(spi)

This is the important part. the user pi has the supplementary group dialout which is the group of the device file. If OctoPrint runs as this user (as it does normally) it has access to the serial port /dev/ttyAMA0.

Here is the Octoprint log file, I don't know if it help at all.octoprint-2.log (213.4 KB)

This seems to me the relevant part of octoprint.log

2020-06-15 13:26:35,404 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial port"
2020-06-15 13:26:35,413 - octoprint.server.util.watchdog - INFO - Running initial scan on watched folder...
2020-06-15 13:26:35,415 - octoprint.server.util.watchdog - INFO - ... initial scan done.
2020-06-15 13:26:35,437 - octoprint.plugins.discovery - INFO - Registered 'OctoPrint instance on Ender5Pro' for _http._tcp
2020-06-15 13:26:35,445 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial port" to "Opening serial port"
2020-06-15 13:26:35,452 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2020-06-15 13:26:36,470 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-06-15 13:26:36,772 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting baudrate" to "Operational"
2020-06-15 13:26:36,868 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-06-15 13:26:37,055 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin bugfix-2.0.x (Jun 14 2020"
2020-06-15 13:26:37,107 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
2020-06-15 13:26:37,260 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting
...
2020-06-15 13:34:57,251 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting"
2020-06-15 13:34:57,267 - octoprint.printer.standard.job - INFO - Print job started - origin: local, path: CE5_Bed_level_test.gcode, owner: quad121, user: quad121
2020-06-15 13:34:57,295 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2020-06-15 13:34:57,322 - octoprint.util.comm - INFO - Changing monitoring state from "Starting" to "Printing"
2020-06-15 13:34:59,378 - octoprint.util.comm - INFO - Printer seems to support the busy protocol, will adjust timeouts and set busy interval accordingly
2020-06-15 13:37:32,170 - octoprint.util.comm - INFO - Telling the printer to set the busy interval to our "communicationBusy" timeout - 1s = 2s
2020-06-15 13:39:26,917 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2823, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4968, in readline
c = self.read(1)
File "/home/pi/oprint/local/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-06-15 13:39:27,017 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-06-15 13:39:27,066 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2823)"

The error occurs 2 seconds after something about a busy interval / timeout to 2 seconds.

Maybe the serial.log would help, maybe https://faq.octoprint.org/serialerror will help. The limits of my understanding of the communication of OctoPrint have been reached :confused:.

Just for the record as I just saw this while skipping over this thread, that's rarely the case as that's the raspberry pi's own serial console, not a printer, which is why it's NOT included in the set of serial ports by default.

The USB cable is prolly what was the issue here (if it was one of those blue ones that get included with the board, that would be no surprise, those things are flaky AF).

Many thanks for your help Jandar, I really appreciate it. Ive attached the Serial Log incase someone can decode itserial.log|attachment (56.9 KB)serial.log (56.9 KB)

Also The cable I'm using is a Belkin USB Cable which I have used in the past and found to be good

The one thing I said not being done is lsusb. One before plugging in the printer one after.

pi@octopi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@octopi:~ $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

This is on my RPi with the printer connected between the two lsubs. As you can see the printer serial port is the line

Bus 001 Device 003: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]

If there is no new line after plugging in the printer, the usb connection doesn't work at all.

The service responsible for creating the entries in /dev is udev. You can monitor its action with

sudo /sbin/udevadm monitor

In my case, if I plugin the printer it gives

KERNEL[51644.456465] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4 (usb)
KERNEL[51644.459785] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
KERNEL[51644.464289] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0 (usb-serial)
KERNEL[51644.470494] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0 (tty)
KERNEL[51644.470648] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0 (usb-serial)
KERNEL[51644.470843] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
KERNEL[51644.471211] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4 (usb)
UDEV  [51644.496114] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4 (usb)
UDEV  [51644.500834] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [51644.503482] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0 (usb-serial)
UDEV  [51644.527759] add      /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0 (tty)
UDEV  [51644.535922] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0 (usb-serial)
UDEV  [51644.539431] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0 (usb)
UDEV  [51644.561615] bind     /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4 (usb)

In the middle there you can see the line

UDEV [51644.527759] add /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0 (tty)

You have to prefix the path with /sys to get the real path where you can see the name in /dev

pi@octopi:~ $ ls -l /sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/ttyUSB0/tty/ttyUSB0
total 0
-r--r--r-- 1 root root 4096 Jun 15 18:23 dev
lrwxrwxrwx 1 root root    0 Jun 15 18:23 device -> ../../../ttyUSB0
drwxr-xr-x 2 root root    0 Jun 15 18:23 power
lrwxrwxrwx 1 root root    0 Jun 15 18:23 subsystem -> ../../../../../../../../../../../../../../class/tty
-rw-r--r-- 1 root root 4096 Jun 15 18:23 uevent

The last part of the name after device is name within /dev. In my case /dev/ttyUSB0

Hi,
Ive done some screenshots of lsusb and sudo /sbin/udevadm monitor

Instead of screenshots it would be better to quote the actual text as "preformatted text" (the </> icon) from the terminal window. If I want to quote something, with the screenshot I can't.

The lsusb shows there is an USB device recognized.

The udevadm monitor shows the remove and addition of ttyACM0. It seems to me this is really the device used for the printer. On the other hand there are lines about a disk, is it really the udevadm monitor of plugging the printer?

Probably you aren't using the serial console so you can disable the login on it as described here.

There is a way to create an entry for the USB serial in /dev with another name but the name ttyACM0 would remain and possible be used by the systemd login service or so.