Failed to autodetect serial port, please set it manually

What is the problem?

when I'm trying to connect my printer to the OctoPrint, it gives that error.

What did you already try to solve it?

I've tried to set manually. I've found some /dev/tty... kind of things and tried it all.
Also find that https://docs.python.org/2/library/glob.html but I'm not a coder, I dont understand anything lol.

I guess I have to find right serial port but I''ve tried all that I can found in Internet

Logs (syslog, dmesg, ...)

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.

Additional information about your network (Hardware you are trying to connect to, hardware you are trying to connect from, router, access point, used operating systems, ...)

From: Ultimaker Extended 3
To: OctoPrint 0.17.0
With: Raspberry Pi 4

Disconnect the serial cable from the printer. Plug it back in. Run dmesg from the Pi and look for the device name that's indicated in the last, say, 20 lines of that output. You're looking for something like /dev/tty* or tty* or similar, usually.

So now, you'll know the device name. In fact, if the operating system can see the device then OctoPrint will auto-populate this in that pull-down list in the Connection side panel widget.

I've found tty1 and tried as just ''tty1'' OctoPrint didnt recgnize as a serial port so I've add /dev/ to it.
Then this error occured.

error

Connecting to: /dev/tty1
Changing monitoring state from "Offline" to "Error: Connection error, see Terminal tab"
Unexpected error while connecting to serial port: /dev/tty1 SerialException: '[Errno 13] could not open port /dev/tty1: [Errno 13] Permission denied: '/dev/tty1'' @ comm.py:_openSerial:2611 (hook default)

are you sure it isn't something like ttyUSB0 or ttyUSB1 ?

no, even doesn't recognize as a serial port

I think it's the best if we're going back to @OutsourcedGuru advice.
Disconnect your printer, connect it again, enter dmesg | tail -n 20 and post the output here

2 Likes
[   14.160283] Bluetooth: HCI UART protocol H4 registered
[   14.160327] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   14.160453] Bluetooth: HCI UART protocol Broadcom registered
[   14.326860] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   14.326869] Bluetooth: BNEP filters: protocol multicast
[   14.326883] Bluetooth: BNEP socket layer initialized
[   58.956421] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c
[   58.967878] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
[  122.557156] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46
[  122.568652] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
[  173.318688] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca
[  173.330093] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered.
[  249.759691] w1_master_driver w1_bus_master1: Attaching one wire slave 00.200000000000 crc 23
[  249.771468] w1_master_driver w1_bus_master1: Family 0 for 00.200000000000.23 is not registered.
[  313.361082] w1_master_driver w1_bus_master1: Attaching one wire slave 00.a00000000000 crc af
[  313.372824] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered.
[  351.281809] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65
[  351.293564] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered.
[  391.762220] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9
[  391.774193] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered.
pi@octopi:~ $ [   14.160283] Bluetooth: HCI UART protocol H4 registered
[  313.372824] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered.
[  351.281809] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65
-bash: [: missing `]'
[  351.293564] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered.
[  391.762220] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9
[  391.774193] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered.
pi@octopi:~ $ [   14.160327] Bluetooth: HCI UART protocol Three-wire (H5) registered
-bash: syntax error near unexpected token `('
pi@octopi:~ $ [   14.160453] Bluetooth: HCI UART protocol Broadcom registered
-bash: [: missing `]'
pi@octopi:~ $ [   14.326860] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
-bash: syntax error near unexpected token `('
pi@octopi:~ $ [   14.326869] Bluetooth: BNEP filters: protocol multicast
-bash: [: missing `]'
pi@octopi:~ $ [   14.326883] Bluetooth: BNEP socket layer initialized
-bash: [: missing `]'
pi@octopi:~ $ [   58.956421] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c
-bash: [: missing `]'
pi@octopi:~ $ [   58.967878] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  122.557156] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46
-bash: [: missing `]'
pi@octopi:~ $ [  122.568652] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  173.318688] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca
-bash: [: missing `]'
pi@octopi:~ $ [  173.330093] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  249.759691] w1_master_driver w1_bus_master1: Attaching one wire slave 00.200000000000 crc 23
-bash: [: missing `]'
pi@octopi:~ $ [  249.771468] w1_master_driver w1_bus_master1: Family 0 for 00.200000000000.23 is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  313.361082] w1_master_driver w1_bus_master1: Attaching one wire slave 00.a00000000000 crc af
-bash: [: missing `]'
pi@octopi:~ $ [  313.372824] w1_master_driver w1_bus_master1: Family 0 for 00.a00000000000.af is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  351.281809] w1_master_driver w1_bus_master1: Attaching one wire slave 00.600000000000 crc 65
-bash: [: missing `]'
pi@octopi:~ $ [  351.293564] w1_master_driver w1_bus_master1: Family 0 for 00.600000000000.65 is not registered.
-bash: [: missing `]'
pi@octopi:~ $ [  391.762220] w1_master_driver w1_bus_master1: Attaching one wire slave 00.e00000000000 crc e9
-bash: [: missing `]'
pi@octopi:~ $ [  391.774193] w1_master_driver w1_bus_master1: Family 0 for 00.e00000000000.e9 is not registered.
-bash: [: missing `]'

@PrintedWeezl this is the output sorry I've forgot the mention you

For whatever reasons, some of the dmesg output got confused and your system tried to interpret some of that. Try just a dmesg and manually highlight copy/paste the last 20 lines here so that we can see it.

Now Raspberry closed itself to remote access. I can't find my RPi when I've tried in IP scan. I create ssh file to enable remote access but it didn't work. I can't access my OctoPi right now.So I guess i have to reboot or format my RPi. I will try 'dmesg' thing in Monday and I will send the reply to you guys, thanks a lot for your helps.

[ 13.601709] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 14.197957] Bluetooth: Core ver 2.22
[ 14.198022] NET: Registered protocol family 31
[ 14.198026] Bluetooth: HCI device and connection manager initialized
[ 14.199760] Bluetooth: HCI socket layer initialized
[ 14.199771] Bluetooth: L2CAP socket layer initialized
[ 14.199808] Bluetooth: SCO socket layer initialized
[ 14.208540] Bluetooth: HCI UART driver ver 2.3
[ 14.208556] Bluetooth: HCI UART protocol H4 registered
[ 14.208625] Bluetooth: HCI UART protocol Three-wire (H5) registered
[ 14.208761] Bluetooth: HCI UART protocol Broadcom registered
[ 14.376969] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 14.376977] Bluetooth: BNEP filters: protocol multicast
[ 14.376992] Bluetooth: BNEP socket layer initialized
[ 58.956401] w1_master_driver w1_bus_master1: Attaching one wire slave 00.800000000000 crc 8c
[ 58.969569] w1_master_driver w1_bus_master1: Family 0 for 00.800000000000.8c is not registered.
[ 122.386790] w1_master_driver w1_bus_master1: Attaching one wire slave 00.400000000000 crc 46
[ 122.399878] w1_master_driver w1_bus_master1: Family 0 for 00.400000000000.46 is not registered.
[ 173.395561] w1_master_driver w1_bus_master1: Attaching one wire slave 00.c00000000000 crc ca
[ 173.407136] w1_master_driver w1_bus_master1: Family 0 for 00.c00000000000.ca is not registered.

I found the pi4 had issues if the usb cable was plugged into the blue USB3 ports, plugging it into the white USB2 ports resolved it for me

1 Like

@plexiglass
You may try an USB memory stick with dmesg if that is recognized.

I dont have any usb connection through my pi. Has it to be usb cable connection between pi and 3d printer?

I thought sharing the same internet connection will be enough.

on my pi there is a USB cable connecting the Pi4 to the mainboard on the ANET A8, it uses this to send the commands to the printer

is it(usb cable) enables also connect through octoprint?

I connect to the PI over wifi to connect to octoprint, then there is a USB cable which is used by octoprint to send the Gcode commands and read the data like bed and extruder temps from the printer

1 Like

Unless your printer is uber fancy it won't support wifi printing hence why octoprint exists. You can connect to octoprint using the internet and the pi then talks to the printer over USB allowing you to experience what seems like wireless printing. Your printer will almost certainly have a mini or microusb port, you simply need to use a cable to connect this to the pi.

The port in between the one the cable is being plugged into in the photo and the power button is the port you need to use

1 Like

Oh i am so dumb, thanks for help. I will try connect between pi and printer with USB to USB cable because I didnt see any other port beside the power port like in the photo. I will write the conclusion tomorrow.

1 Like