Octoprint no longer connects if port set to AUTO

Of course I can do it but I could also make Armbian not load the UsbOTG virtual serial driver.
Even more simple I can give up automatic search of the printer port connection and set it by hand on ttyUSB0.

My intent was only to report that the problem is also present with other devices and excluding only ttyS .. it may not be exhaustive.

It would also be possible to take advantage of the "Additional serial ports" field of the settings and exclude from the recognized devices those negated for example

/dev/ttyAMA*
!/dev/ttyS*
!/dev/ttyGS*

Yeah... I did :heart: your suggestion since it's a good idea.

/dev/ttyG* is not and never was part of the port patterns :thinking:

This morning I did a test, I put g_serial in the blacklist so that ttyGS0 is not created.

First the list of tty devices is this :

pi@octopi:~$ ls /dev/tty*
tty      tty31    tty55    ttya3    ttybd    ttyd7    ttyp1    ttyqb    ttys5    ttytf    ttyv9    ttyx3    ttyyd
tty0     tty32    tty56    ttya4    ttybe    ttyd8    ttyp2    ttyqc    ttys6    ttyu0    ttyva    ttyx4    ttyye
tty1     tty33    tty57    ttya5    ttybf    ttyd9    ttyp3    ttyqd    ttys7    ttyu1    ttyvb    ttyx5    ttyyf
tty10    tty34    tty58    ttya6    ttyc0    ttyda    ttyp4    ttyqe    ttys8    ttyu2    ttyvc    ttyx6    ttyz0
tty11    tty35    tty59    ttya7    ttyc1    ttydb    ttyp5    ttyqf    ttys9    ttyu3    ttyvd    ttyx7    ttyz1
tty12    tty36    tty6     ttya8    ttyc2    ttydc    ttyp6    ttyr0    ttysa    ttyu4    ttyve    ttyx8    ttyz2
tty13    tty37    tty60    ttya9    ttyc3    ttydd    ttyp7    ttyr1    ttysb    ttyu5    ttyvf    ttyx9    ttyz3
tty14    tty38    tty61    ttyaa    ttyc4    ttyde    ttyp8    ttyr2    ttysc    ttyu6    ttyw0    ttyxa    ttyz4
tty15    tty39    tty62    ttyab    ttyc5    ttydf    ttyp9    ttyr3    ttysd    ttyu7    ttyw1    ttyxb    ttyz5
tty16    tty4     tty63    ttyac    ttyc6    ttye0    ttypa    ttyr4    ttyse    ttyu8    ttyw2    ttyxc    ttyz6
tty17    tty40    tty7     ttyad    ttyc7    ttye1    ttypb    ttyr5    ttysf    ttyu9    ttyw3    ttyxd    ttyz7
tty18    tty41    tty8     ttyae    ttyc8    ttye2    ttypc    ttyr6    ttyt0    ttyua    ttyw4    ttyxe    ttyz8
tty19    tty42    tty9     ttyaf    ttyc9    ttye3    ttypd    ttyr7    ttyt1    ttyub    ttyw5    ttyxf    ttyz9
tty2     tty43  > ttyGS0   ttyb0    ttyca    ttye4    ttype    ttyr8    ttyt2    ttyuc    ttyw6    ttyy0    ttyza
tty20    tty44    ttyS0    ttyb1    ttycb    ttye5    ttypf    ttyr9    ttyt3    ttyud    ttyw7    ttyy1    ttyzb
tty21    tty45    ttyS1    ttyb2    ttycc    ttye6    ttyq0    ttyra    ttyt4    ttyue    ttyw8    ttyy2    ttyzc
tty22    tty46    ttyS2    ttyb3    ttycd    ttye7    ttyq1    ttyrb    ttyt5    ttyuf    ttyw9    ttyy3    ttyzd
tty23    tty47    ttyS3    ttyb4    ttyce    ttye8    ttyq2    ttyrc    ttyt6    ttyv0    ttywa    ttyy4    ttyze
tty24    tty48    ttyS4    ttyb5    ttycf    ttye9    ttyq3    ttyrd    ttyt7    ttyv1    ttywb    ttyy5    ttyzf
tty25    tty49    ttyS5    ttyb6    ttyd0    ttyea    ttyq4    ttyre    ttyt8    ttyv2    ttywc    ttyy6
tty26    tty5     ttyS6    ttyb7    ttyd1    ttyeb    ttyq5    ttyrf    ttyt9    ttyv3    ttywd    ttyy7
tty27    tty50    ttyS7    ttyb8    ttyd2    ttyec    ttyq6    ttys0    ttyta    ttyv4    ttywe    ttyy8
tty28    tty51  > ttyUSB0  ttyb9    ttyd3    ttyed    ttyq7    ttys1    ttytb    ttyv5    ttywf    ttyy9
tty29    tty52    ttya0    ttyba    ttyd4    ttyee    ttyq8    ttys2    ttytc    ttyv6    ttyx0    ttyya
tty3     tty53    ttya1    ttybb    ttyd5    ttyef    ttyq9    ttys3    ttytd    ttyv7    ttyx1    ttyyb
tty30    tty54    ttya2    ttybc    ttyd6    ttyp0    ttyqa    ttys4    ttyte    ttyv8    ttyx2    ttyyc

From here we can see that the only "strange" device is ttyGS0

After blacklisting the result is:

pi@octopi:~$ ls /dev/tty*
/dev/tty    /dev/tty41    /dev/ttya0  /dev/ttyc5  /dev/ttyea  /dev/ttyqf  /dev/ttyt4  /dev/ttyv9  /dev/ttyxe
/dev/tty0   /dev/tty42    /dev/ttya1  /dev/ttyc6  /dev/ttyeb  /dev/ttyr0  /dev/ttyt5  /dev/ttyva  /dev/ttyxf
/dev/tty1   /dev/tty43    /dev/ttya2  /dev/ttyc7  /dev/ttyec  /dev/ttyr1  /dev/ttyt6  /dev/ttyvb  /dev/ttyy0
/dev/tty10  /dev/tty44    /dev/ttya3  /dev/ttyc8  /dev/ttyed  /dev/ttyr2  /dev/ttyt7  /dev/ttyvc  /dev/ttyy1
/dev/tty11  /dev/tty45    /dev/ttya4  /dev/ttyc9  /dev/ttyee  /dev/ttyr3  /dev/ttyt8  /dev/ttyvd  /dev/ttyy2
/dev/tty12  /dev/tty46    /dev/ttya5  /dev/ttyca  /dev/ttyef  /dev/ttyr4  /dev/ttyt9  /dev/ttyve  /dev/ttyy3
/dev/tty13  /dev/tty47    /dev/ttya6  /dev/ttycb  /dev/ttyp0  /dev/ttyr5  /dev/ttyta  /dev/ttyvf  /dev/ttyy4
/dev/tty14  /dev/tty48    /dev/ttya7  /dev/ttycc  /dev/ttyp1  /dev/ttyr6  /dev/ttytb  /dev/ttyw0  /dev/ttyy5
/dev/tty15  /dev/tty49    /dev/ttya8  /dev/ttycd  /dev/ttyp2  /dev/ttyr7  /dev/ttytc  /dev/ttyw1  /dev/ttyy6
/dev/tty16  /dev/tty5     /dev/ttya9  /dev/ttyce  /dev/ttyp3  /dev/ttyr8  /dev/ttytd  /dev/ttyw2  /dev/ttyy7
/dev/tty17  /dev/tty50    /dev/ttyaa  /dev/ttycf  /dev/ttyp4  /dev/ttyr9  /dev/ttyte  /dev/ttyw3  /dev/ttyy8
/dev/tty18  /dev/tty51    /dev/ttyab  /dev/ttyd0  /dev/ttyp5  /dev/ttyra  /dev/ttytf  /dev/ttyw4  /dev/ttyy9
/dev/tty19  /dev/tty52    /dev/ttyac  /dev/ttyd1  /dev/ttyp6  /dev/ttyrb  /dev/ttyu0  /dev/ttyw5  /dev/ttyya
/dev/tty2   /dev/tty53    /dev/ttyad  /dev/ttyd2  /dev/ttyp7  /dev/ttyrc  /dev/ttyu1  /dev/ttyw6  /dev/ttyyb
/dev/tty20  /dev/tty54    /dev/ttyae  /dev/ttyd3  /dev/ttyp8  /dev/ttyrd  /dev/ttyu2  /dev/ttyw7  /dev/ttyyc
/dev/tty21  /dev/tty55    /dev/ttyaf  /dev/ttyd4  /dev/ttyp9  /dev/ttyre  /dev/ttyu3  /dev/ttyw8  /dev/ttyyd
/dev/tty22  /dev/tty56    /dev/ttyb0  /dev/ttyd5  /dev/ttypa  /dev/ttyrf  /dev/ttyu4  /dev/ttyw9  /dev/ttyye
/dev/tty23  /dev/tty57    /dev/ttyb1  /dev/ttyd6  /dev/ttypb  /dev/ttys0  /dev/ttyu5  /dev/ttywa  /dev/ttyyf
/dev/tty24  /dev/tty58    /dev/ttyb2  /dev/ttyd7  /dev/ttypc  /dev/ttys1  /dev/ttyu6  /dev/ttywb  /dev/ttyz0
/dev/tty25  /dev/tty59    /dev/ttyb3  /dev/ttyd8  /dev/ttypd  /dev/ttys2  /dev/ttyu7  /dev/ttywc  /dev/ttyz1
/dev/tty26  /dev/tty6     /dev/ttyb4  /dev/ttyd9  /dev/ttype  /dev/ttys3  /dev/ttyu8  /dev/ttywd  /dev/ttyz2
/dev/tty27  /dev/tty60    /dev/ttyb5  /dev/ttyda  /dev/ttypf  /dev/ttys4  /dev/ttyu9  /dev/ttywe  /dev/ttyz3
/dev/tty28  /dev/tty61    /dev/ttyb6  /dev/ttydb  /dev/ttyq0  /dev/ttys5  /dev/ttyua  /dev/ttywf  /dev/ttyz4
/dev/tty29  /dev/tty62    /dev/ttyb7  /dev/ttydc  /dev/ttyq1  /dev/ttys6  /dev/ttyub  /dev/ttyx0  /dev/ttyz5
/dev/tty3   /dev/tty63    /dev/ttyb8  /dev/ttydd  /dev/ttyq2  /dev/ttys7  /dev/ttyuc  /dev/ttyx1  /dev/ttyz6
/dev/tty30  /dev/tty7     /dev/ttyb9  /dev/ttyde  /dev/ttyq3  /dev/ttys8  /dev/ttyud  /dev/ttyx2  /dev/ttyz7
/dev/tty31  /dev/tty8     /dev/ttyba  /dev/ttydf  /dev/ttyq4  /dev/ttys9  /dev/ttyue  /dev/ttyx3  /dev/ttyz8
/dev/tty32  /dev/tty9     /dev/ttybb  /dev/ttye0  /dev/ttyq5  /dev/ttysa  /dev/ttyuf  /dev/ttyx4  /dev/ttyz9
/dev/tty33  /dev/ttyS0    /dev/ttybc  /dev/ttye1  /dev/ttyq6  /dev/ttysb  /dev/ttyv0  /dev/ttyx5  /dev/ttyza
/dev/tty34  /dev/ttyS1    /dev/ttybd  /dev/ttye2  /dev/ttyq7  /dev/ttysc  /dev/ttyv1  /dev/ttyx6  /dev/ttyzb
/dev/tty35  /dev/ttyS2    /dev/ttybe  /dev/ttye3  /dev/ttyq8  /dev/ttysd  /dev/ttyv2  /dev/ttyx7  /dev/ttyzc
/dev/tty36  /dev/ttyS3    /dev/ttybf  /dev/ttye4  /dev/ttyq9  /dev/ttyse  /dev/ttyv3  /dev/ttyx8  /dev/ttyzd
/dev/tty37  /dev/ttyS4    /dev/ttyc0  /dev/ttye5  /dev/ttyqa  /dev/ttysf  /dev/ttyv4  /dev/ttyx9  /dev/ttyze
/dev/tty38  /dev/ttyS5    /dev/ttyc1  /dev/ttye6  /dev/ttyqb  /dev/ttyt0  /dev/ttyv5  /dev/ttyxa  /dev/ttyzf
/dev/tty39  /dev/ttyS6    /dev/ttyc2  /dev/ttye7  /dev/ttyqc  /dev/ttyt1  /dev/ttyv6  /dev/ttyxb
/dev/tty4   /dev/ttyS7    /dev/ttyc3  /dev/ttye8  /dev/ttyqd  /dev/ttyt2  /dev/ttyv7  /dev/ttyxc
/dev/tty40 >/dev/ttyUSB0  /dev/ttyc4  /dev/ttye9  /dev/ttyqe  /dev/ttyt3  /dev/ttyv8  /dev/ttyxd
e here

According to the code you posted the only match is ttyUSB0, the problem is that still fails autodetect.

Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyUSB0', u'/dev/ttyS0', u'/dev/ttyS7', u'/dev/ttyS6', u'/dev/ttyS5', u'/dev/ttyS4', u'/dev/ttyS3', u'/dev/ttyS2', u'/dev/ttyS1']
Trying /dev/ttyUSB0
Could not connect to or enter programming mode on /dev/ttyUSB0, might not be a printer or just not allow programming mode
Trying /dev/ttyS0
Could not connect to or enter programming mode on /dev/ttyS0, might not be a printer or just not allow programming mode
Trying /dev/ttyS7
Could not connect to or enter programming mode on /dev/ttyS7, might not be a printer or just not allow programming mode
Trying /dev/ttyS6
Could not connect to or enter programming mode on /dev/ttyS6, might not be a printer or just not allow programming mode
Trying /dev/ttyS5
Could not connect to or enter programming mode on /dev/ttyS5, might not be a printer or just not allow programming mode
Trying /dev/ttyS4
Could not connect to or enter programming mode on /dev/ttyS4, might not be a printer or just not allow programming mode
Trying /dev/ttyS3
Could not connect to or enter programming mode on /dev/ttyS3, might not be a printer or just not allow programming mode
Trying /dev/ttyS2
Could not connect to or enter programming mode on /dev/ttyS2, might not be a printer or just not allow programming mode
Trying /dev/ttyS1
Could not connect to or enter programming mode on /dev/ttyS1, might not be a printer or just not allow programming mode
Changing monitoring state from "Detecting serial port" to "Error: Failed to autodetect serial port, please set it manually."
Failed to autodetect serial port, please set it manually.

Leaving aside ttySxx, you notice that it does not recognize ttyUSB0 as a valid port.

The usb-serial chip is the classic FT232RL and the device that manages it is always ftdi_sio.

It seems that for some reason something goes wrong in detecting what is connected to the port rather than opening the port

... and ttyS0 through 9. Which it then tries to probe. Which fails and the probing fails with your printer too (since it relies on entering programming mode which doesn't always work and which I want to nuke due to this). If it only finds one port matching the pattern it won't probe but just try its luck with that and that usually works.

I also already explained the general issue with the current implementation and that I'm aware of them here

I had already read it and I'm sorry, I'm probably still asleep and I haven't noticed the ttyS0, ttyS1 present in the long list of tty devices.

Have you confirmed with even a keyboard that the USB port you are trying to use on the pi (with the printer) is still alive?

You might guess by my questions I’m trying to establish if the ports/interface on both halves of the puzzle are working. You’ve said you’ve ruled out the cable.

I did a strange test, I modified

	baselist = baselist \
			   + glob.glob("/dev/ttyUSB*") \
			   + glob.glob("/dev/ttyACM*") \
			   + glob.glob("/dev/tty.usb*") \
			   + glob.glob("/dev/cu.*") \
			   + glob.glob("/dev/cuaU*") \
			   + glob.glob("/dev/ttyS*") \
			   + glob.glob("/dev/rfcomm*")

turning it into

	baselist = baselist \
			   + glob.glob("/dev/ttyUSB*") \
			   + glob.glob("/dev/ttyACM*") \
			   + glob.glob("/dev/tty.usb*") \
			   + glob.glob("/dev/cu.*") \
			   + glob.glob("/dev/cuaU*") \
			   + glob.glob("/dev/ttyZ*") \
			   + glob.glob("/dev/rfcomm*")

so I can create links on the fly between ttyZx and other devices

pi@octopi:~$ sudo ln -s /dev/ttyUSB0 /dev/ttyZ0

pi@octopi:~$ ls -la /dev/ttyZ*
lrwxrwxrwx 1 root root 12 Mar 25 16:59 /dev/ttyZ0 -> /dev/ttyUSB0

the result of the auto connection is:

Changing monitoring state from "Offline" to "Detecting serial port"
Serial port list: ['/dev/ttyUSB0', u'/dev/ttyZ0']
Trying /dev/ttyUSB0
Could not connect to or enter programming mode on /dev/ttyUSB0, might not be a printer or just not allow programming mode
Trying /dev/ttyZ0
Could not connect to or enter programming mode on /dev/ttyZ0, might not be a printer or just not allow programming mode
Changing monitoring state from "Detecting serial port" to "Error: Failed to autodetect serial port, please set it manually."
Failed to autodetect serial port, please set it manually.

obviously the manual connection takes place regularly on both devices.

Is not that the problem arises from the fact that there is more than one match in the baselist regardless of the fact that they are ttyS* ?

The problem is that the auto detection probe that tries to put your printer into programming mode doesn't work with your printer. If there's only one port found, that doesn't matter because if there's only one port OctoPrint takes a shortcut and just assumes that to be the printer. If there's more than one port it tries probing. That doesn't work with your printer and it thus finds no printer at all. It doesn't matter how the ports in the list are called or how many there are, if your printer can't be put into programming mode auto detection will fail if there are more than one serial ports found. That's all.

The plugin above solves the issue for many because ttyS* as a port pattern was newly added in 1.4.0 and seems to match on quite a number of machines out there where previously only one port, the printer, was found, causing new issues for them. The auto detect probing was always broken for them, it just becomes visible now. Removing the port pattern again solves it for them until a proper solution can be implemented, removing the bloody probing and replacing it with a different approach.

If you read her previous email, when it finds multiple ports it tries to enter programming mode. If there is only one port, it just tries to open a connection and does not try programming mode

Ok, I looked at _detect_port () and now it's clear to me why it doesn't work ...

it is a bit risky to use the programming method since it mainly works with the bootloader of the MEGA2560.

I think most 32bit printers don't use this bootloader.
I use STM32F4 and it makes no sense to implement a compatible bootloader.

Maybe open the serial port, query and evaluate the answer give more reliable results.

Guess what I'm planning to do :stuck_out_tongue:

This programming mode approach is still a left over from the time when OctoPrint was forked from Cura back in late 2012.

This does resolve the issue for me.

I had this problem right after the last update for Octoprint. Before that been working great! Now I cannot connect to the printer it was connected to the entire time. I have looked at almost every post on this but can not seem to get it to work. I have tried the plugin mentioned above, I have tried the plug that lets you control your USB ports and nothing worked yet. I will attach my logs and stuff to see if someone smarter than me can find the issue. I have been trying to find a fix for two months now and nothing is working. I also rebuild Octopi to original settings no plugin just basic setup and still same thing happens.

Below is my setup:
Ender 3 Marlin v1.1.6 firmware
Octoprint 1.4.0
Raspbery pi 3 B+

serial.log (592 Bytes)
octoprint.log (208.3 KB)

dmesg output:
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.118-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1311 SMP Mon Apr 27 14:21:24 BST 2020
[ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 8 MiB at 0x37800000
[ 0.000000] On node 0 totalpages: 229376
[ 0.000000] Normal zone: 2016 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 229376 pages, LIFO batch:63
[ 0.000000] random: get_random_bytes called from start_kernel+0xac/0x4b4 with crng_init=0
[ 0.000000] percpu: Embedded 16 pages/cpu s36864 r8192 d20480 u65536
[ 0.000000] pcpu-alloc: s36864 r8192 d20480 u65536 alloc=16*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 227360
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 886284K/917504K available (8192K kernel code, 656K rwdata, 2232K rodata, 1024K init, 831K bss, 23028K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xb8800000 - 0xff800000 (1136 MB)
lowmem : 0x80000000 - 0xb8000000 ( 896 MB)
modules : 0x7f000000 - 0x80000000 ( 16 MB)
.text : 0x(ptrval) - 0x(ptrval) (9184 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 657 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 832 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] ftrace: allocating 27093 entries in 80 pages
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000023] Switching to timer-based delay loop, resolution 52ns
[ 0.000275] Console: colour dummy device 80x30
[ 0.000887] console [tty1] enabled
[ 0.000941] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[ 0.000985] pid_max: default: 32768 minimum: 301
[ 0.001350] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001386] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002334] CPU: Testing write buffer coherency: ok
[ 0.002819] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.003493] Setting up static identity map for 0x100000 - 0x10003c
[ 0.003661] rcu: Hierarchical SRCU implementation.
[ 0.004491] smp: Bringing up secondary CPUs ...
[ 0.005404] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[ 0.006377] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[ 0.007288] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[ 0.007403] smp: Brought up 1 node, 4 CPUs
[ 0.007484] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[ 0.007508] CPU: All CPU(s) started in HYP mode.
[ 0.007528] CPU: Virtualization extensions available.
[ 0.008516] devtmpfs: initialized
[ 0.021500] VFP support v0.3: implementor 41 architecture 3 part 40 variant 3 rev 4
[ 0.021772] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.021822] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.022428] pinctrl core: initialized pinctrl subsystem
[ 0.023290] NET: Registered protocol family 16
[ 0.026301] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[ 0.031985] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.032021] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.032241] Serial: AMBA PL011 UART driver
[ 0.034590] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.050028] raspberrypi-firmware soc:firmware: Attached to firmware from 2020-04-27 14:36, variant start_x
[ 0.060042] raspberrypi-firmware soc:firmware: Firmware hash is 3a8f1793b758d6fb7f375edaa260e069ecd34c88
[ 0.103013] bcm2835-dma 3f007000.dma: DMA legacy API manager at (ptrval), dmachans=0x1
[ 0.104688] SCSI subsystem initialized
[ 0.104925] usbcore: registered new interface driver usbfs
[ 0.105000] usbcore: registered new interface driver hub
[ 0.105119] usbcore: registered new device driver usb
[ 0.106647] clocksource: Switched to clocksource arch_sys_counter
[ 0.197084] VFS: Disk quotas dquot_6.6.0
[ 0.197195] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.197399] FS-Cache: Loaded
[ 0.197629] CacheFiles: Loaded
[ 0.207679] NET: Registered protocol family 2
[ 0.208541] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[ 0.208606] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.208736] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.208941] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.209097] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.209167] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.209426] NET: Registered protocol family 1
[ 0.210031] RPC: Registered named UNIX socket transport module.
[ 0.210059] RPC: Registered udp transport module.
[ 0.210080] RPC: Registered tcp transport module.
[ 0.210102] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.211716] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 7 counters available
[ 0.214821] Initialise system trusted keyrings
[ 0.215031] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[ 0.224999] FS-Cache: Netfs 'nfs' registered for caching
[ 0.225571] NFS: Registering the id_resolver key type
[ 0.225617] Key type id_resolver registered
[ 0.225639] Key type id_legacy registered
[ 0.225670] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.231197] Key type asymmetric registered
[ 0.231232] Asymmetric key parser 'x509' registered
[ 0.231307] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[ 0.231507] io scheduler noop registered
[ 0.231531] io scheduler deadline registered (default)
[ 0.231751] io scheduler cfq registered
[ 0.231775] io scheduler mq-deadline registered (default)
[ 0.231799] io scheduler kyber registered
[ 0.234055] bcm2708_fb soc:fb: FB found 1 display(s)
[ 0.243360] Console: switching to colour frame buffer device 82x26
[ 0.250247] bcm2708_fb soc:fb: Registered framebuffer for display 0, size 656x416
[ 0.256981] bcm2835-rng 3f104000.rng: hwrng registered
[ 0.259664] vc-mem: phys_addr:0x00000000 mem_base=0x3ec00000 mem_size:0x40000000(1024 MiB)
[ 0.264944] vc-sm: Videocore shared memory driver
[ 0.267777] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 0.283531] brd: module loaded
[ 0.296193] loop: module loaded
[ 0.299293] Loading iSCSI transport class v2.0-870.
[ 0.302459] libphy: Fixed MDIO Bus: probed
[ 0.304963] usbcore: registered new interface driver lan78xx
[ 0.307445] usbcore: registered new interface driver smsc95xx
[ 0.309795] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 0.840023] dwc_otg 3f980000.usb: base=(ptrval)
[ 1.042651] Core Release: 2.80a
[ 1.045028] Setting default values for core params
[ 1.047500] Finished setting default values for core params
[ 1.250240] Using Buffer DMA mode
[ 1.252627] Periodic Transfer Interrupt Enhancement - disabled
[ 1.255049] Multiprocessor Interrupt Enhancement - disabled
[ 1.257436] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 1.259779] Dedicated Tx FIFOs mode
[ 1.262468] WARN::dwc_otg_hcd_init:1074: FIQ DMA bounce buffers: virt = b7914000 dma = 0xf7914000 len=9024
[ 1.267066] FIQ FSM acceleration enabled for :
Non-periodic Split Transactions
Periodic Split Transactions
High-Speed Isochronous Endpoints
Interrupt/Control Split Transaction hack enabled
[ 1.277972] dwc_otg: Microframe scheduler enabled
[ 1.278029] WARN::hcd_init_fiq:457: FIQ on core 1
[ 1.280256] WARN::hcd_init_fiq:458: FIQ ASM at 8068fda0 length 36
[ 1.282470] WARN::hcd_init_fiq:497: MPHI regs_base at b8810000
[ 1.284730] dwc_otg 3f980000.usb: DWC OTG Controller
[ 1.287077] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 1.289410] dwc_otg 3f980000.usb: irq 56, io mem 0x00000000
[ 1.291712] Init: Port Power? op_state=1
[ 1.293948] Init: Power Port (0)
[ 1.296363] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19
[ 1.300892] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.303306] usb usb1: Product: DWC OTG Controller
[ 1.305670] usb usb1: Manufacturer: Linux 4.19.118-v7+ dwc_otg_hcd
[ 1.308114] usb usb1: SerialNumber: 3f980000.usb
[ 1.311057] hub 1-0:1.0: USB hub found
[ 1.313336] hub 1-0:1.0: 1 port detected
[ 1.316095] dwc_otg: FIQ enabled
[ 1.316101] dwc_otg: NAK holdoff enabled
[ 1.316106] dwc_otg: FIQ split-transaction FSM enabled
[ 1.316117] Module dwc_common_port init
[ 1.316391] usbcore: registered new interface driver usb-storage
[ 1.318881] mousedev: PS/2 mouse device common for all mice
[ 1.322018] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[ 1.324647] bcm2835-cpufreq: min=600000 max=1400000
[ 1.327492] sdhci: Secure Digital Host Controller Interface driver
[ 1.329905] sdhci: Copyright(c) Pierre Ossman
[ 1.332695] mmc-bcm2835 3f300000.mmcnr: could not get clk, deferring probe
[ 1.335618] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[ 1.338330] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.342392] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.345125] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.347918] usbcore: registered new interface driver usbhid
[ 1.350548] usbhid: USB HID core driver
[ 1.353852] vchiq: vchiq_init_state: slot_zero = (ptrval), is_master = 0
[ 1.357948] [vc_sm_connected_init]: start
[ 1.366713] [vc_sm_connected_init]: end - returning 0
[ 1.370245] Initializing XFRM netlink socket
[ 1.372678] NET: Registered protocol family 17
[ 1.375175] Key type dns_resolver registered
[ 1.378007] Registering SWP/SWPB emulation handler
[ 1.381071] registered taskstats version 1
[ 1.383475] Loading compiled-in X.509 certificates
[ 1.392656] uart-pl011 3f201000.serial: cts_event_workaround enabled
[ 1.395194] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[ 1.401918] mmc-bcm2835 3f300000.mmcnr: mmc_debug:0 mmc_debug2:0
[ 1.404447] mmc-bcm2835 3f300000.mmcnr: DMA channel allocated
[ 1.433216] sdhost: log_buf @ (ptrval) (f7913000)
[ 1.470890] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 1.474870] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.478753] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 1.483759] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 1.487053] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 1.490448] of_cfs_init
[ 1.492539] of_cfs_init: OK
[ 1.495025] Waiting for root device PARTUUID=6c586e13-02...
[ 1.526768] Indeed it is in host mode hprt0 = 00021501
[ 1.598340] random: fast init done
[ 1.609398] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.616757] mmc0: new high speed SDXC card at address 0001
[ 1.620360] mmcblk0: mmc0:0001 GC2QT 59.6 GiB
[ 1.624873] mmcblk0: p1 p2
[ 1.644711] mmc1: new high speed SDIO card at address 0001
[ 1.671992] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.676247] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.687124] devtmpfs: mounted
[ 1.696565] Freeing unused kernel memory: 1024K
[ 1.707051] Run /sbin/init as init process
[ 1.736691] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.739317] Indeed it is in host mode hprt0 = 00001101
[ 1.976989] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[ 1.982255] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.985772] hub 1-1:1.0: USB hub found
[ 1.988736] hub 1-1:1.0: 4 ports detected
[ 2.306716] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 2.330084] systemd[1]: System time before build time, advancing clock.
[ 2.446982] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[ 2.452505] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.456354] hub 1-1.1:1.0: USB hub found
[ 2.459375] hub 1-1.1:1.0: 3 ports detected
[ 2.471992] NET: Registered protocol family 10
[ 2.476053] Segment Routing with IPv6
[ 2.521648] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[ 2.530911] systemd[1]: Detected architecture arm.
[ 2.559342] systemd[1]: Set hostname to .
[ 3.126704] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg
[ 3.257152] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00
[ 3.262596] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.512045] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.526270] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.529768] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ 3.532683] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): No External EEPROM. Setting MAC Speed
[ 3.541798] libphy: lan78xx-mdiobus: probed
[ 3.547557] random: systemd: uninitialized urandom read (16 bytes read)
[ 3.550734] systemd[1]: Reached target Swap.
[ 3.558155] systemd[1]: Listening on Journal Socket.
[ 3.570987] lan78xx 1-1.1.1:1.0 (unnamed net_device) (uninitialized): int urb period 64
[ 3.574310] systemd[1]: Mounting Kernel Debug File System...
[ 3.589938] systemd[1]: Mounting POSIX Message Queue File System...
[ 3.612813] systemd[1]: Starting Load Kernel Modules...
[ 3.626432] systemd[1]: Starting Create list of required static device nodes for the current kernel...
[ 4.520277] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 4.665418] systemd-journald[127]: Received request to flush runtime journal from PID 1
[ 5.507014] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.509563] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 5.509579] [vc_sm_connected_init]: start
[ 5.514968] [vc_sm_connected_init]: installed successfully
[ 5.520927] media: Linux media interface: v0.10
[ 5.555228] videodev: Linux video capture interface: v2.00
[ 5.588259] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.593854] bcm2835_mmal_vchiq: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.605664] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.617723] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.664469] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.674712] bcm2835_audio soc:audio: card created with 8 channels
[ 5.852124] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 5.920054] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 5.996861] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 6.004355] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 6.004765] usbcore: registered new interface driver brcmfmac
[ 6.234384] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 6.234452] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 6.239322] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 6.239849] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 6.239890] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 6.243254] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 6.243278] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 6.288820] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar 2 2020 23:30:41 version 7.45.202 (r724630 CY) FWID 01-72f6ece2
[ 7.229839] random: crng init done
[ 7.229853] random: 7 urandom warning(s) missed due to ratelimiting
[ 8.025393] uart-pl011 3f201000.serial: no DMA platform data
[ 8.048268] 8021q: 802.1Q VLAN Support v1.8
[ 8.162379] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS
[ 8.435539] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 8.435559] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[ 8.707811] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 8.707824] 8021q: adding VLAN 0 to HW filter on device eth0
[ 14.413024] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 15.013645] Bluetooth: Core ver 2.22
[ 15.013723] NET: Registered protocol family 31
[ 15.013727] Bluetooth: HCI device and connection manager initialized
[ 15.014571] Bluetooth: HCI socket layer initialized
[ 15.014586] Bluetooth: L2CAP socket layer initialized
[ 15.014628] Bluetooth: SCO socket layer initialized
[ 15.071447] Bluetooth: HCI UART driver ver 2.3
[ 15.071454] Bluetooth: HCI UART protocol H4 registered
[ 15.071519] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 15.072661] Bluetooth: HCI UART protocol Broadcom registered
[ 15.312268] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 15.312280] Bluetooth: BNEP filters: protocol multicast
[ 15.312296] Bluetooth: BNEP socket layer initialized

you have to enable the serial logging first, otherwise it's just basically an empty file that says its the serial log file. do that under the settings menu under connection.
if you click the pulldown for the printer port on the main octoprint screen, does it have anything besides auto? If not, ensure the printer is on and the USB cable is secure on both ends.

I've found what's causing this is enabling the uart for LED monitoring, a common 'improvement' option. Before this change things were fine with only the USB port, after my OctoPrint now looks for a printer on /dev/ttyS0, which is expected if the uart is now enabled and it wasn't before...

The Pi4 has uart disabled by default, prior models haven't, so this may well be a historic thing.

Which follows that OctoPrint is polling this port/device first and not the USB device.

Is there an 'ignore' option that can be used to work around this?

To create this on the Pi4 edit /boot/config.txt and add enable_uart=1 at the bottom, which suggests that enable_uart=0 may turn it off... Which is worth the try for those that don't need the onboard tx/rx port

Nice useful work around, that white space is important in the gaps as well :slight_smile: the device alias and editing of the config.jaml sorted my version of the problem
The added touch of having the ports named means it'll be easier to add other printers and not mix things up. Nice!

1 Like

I had the same problem with a custom build printer using an BigTreeTech SKR 1.3 mainboard.

The "Remove ttyS ports" plugin mentioned earlier fixed it for me.

1 Like

Had the same problem: only "AUTO" and "/dev/ttyS0" available in Octoprints Serail-Selection-Menu, but not "/dev/ttyUSB0" as before – when my 3d-printer (in the cellar) was "On"... it was "Off" during the configuration of an Octoprint-Plugin. So restarting the printer, the Raspberry and Octoprint then "fixed the problem": Voilá: /dev/ttyUSB0 again was visible! :wink: