Serial connection drops at initialization

edited July 16 in Repetier-Server
I'm totally stumped. Using Pi4 with gpio uart to SKR Mini V1.2 connected to rxtx in TFT pins. Fresh install of Repetier-Server and Marlin. Repetier quickly connects to the printer and if I'm fast I can sneak in some commands myself as well before it disconnects. Using USB cable everything works well but I want to use uart to make cabling more tidy inside the case.

I have tried every combination of DTR/RTS settings, using baud 115200. Below is example terminal output, it functions the same regardless of DTR/RTS settings. Connection is made but then it's terminated for some reason.

Mesg:3:57:02.376: Dtr: false Rts: false
Mesg:3:57:02.382: Connection started
Mesg:3:57:02.382: Printer reset requested - emergency:false
Mesg:3:57:02.398: Dtr: true Rts: true
Mesg:3:57:02.418: Dtr: false Rts: false
Recv:3:57:02.423: Response while unconnected:echo:Unknown command: "echo:Unknown com: "e"
Recv:3:57:02.423: echo:Unknown command: "echo:Unknown com: "e"
Recv:3:57:02.423: Connection verified by:ok
Mesg:3:57:02.423: Received extra ok - ignored
Recv:3:57:02.423: ok
Send:3:57:02.423: N1 M110
Recv:3:57:02.426: Line: 1
Recv:3:57:02.426: ok (N1)
Send:3:57:02.439: N4 M115 ; Get firmware capabilities and info
Recv:3:57:02.462: FIRMWARE_NAME:Marlin 2.1.3-beta3 (Jul 3 2025 14:43:58) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender-3 Pro KINEMATICS:Cartesian EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Recv:3:57:02.464: Cap:SERIAL_XON_XOFF:0
Recv:3:57:02.466: Cap:BINARY_FILE_TRANSFER:0
Recv:3:57:02.468: Cap:EEPROM:1
Recv:3:57:02.469: Cap:VOLUMETRIC:1
Recv:3:57:02.472: Cap:AUTOREPORT_POS:0
Recv:3:57:02.473: Cap:AUTOREPORT_TEMP:1
Recv:3:57:02.475: Cap:PROGRESS:0
Recv:3:57:02.476: Cap:PRINT_JOB:1
Recv:3:57:02.478: Cap:AUTOLEVEL:0
Recv:3:57:02.479: Cap:RUNOUT:0
Recv:3:57:02.481: Cap:Z_PROBE:0
Recv:3:57:02.482: Cap:LEVELING_DATA:1
Recv:3:57:02.484: Cap:BUILD_PERCENT:1
Recv:3:57:02.486: Cap:SOFTWARE_POWER:0
Recv:3:57:02.488: Cap:TOGGLE_LIGHTS:0
Recv:3:57:02.491: Cap:CASE_LIGHT_BRIGHTNESS:0
Recv:3:57:02.493: Cap:EMERGENCY_PARSER:1
Recv:3:57:02.496: Cap:HOST_ACTION_COMMANDS:0
Recv:3:57:02.498: Cap:PROMPT_SUPPORT:0
Recv:3:57:02.499: Cap:SDCARD:1
Recv:3:57:02.501: Cap:MULTI_VOLUME:0
Recv:3:57:02.502: Cap:REPEAT:0
Recv:3:57:02.503: Cap:SD_WRITE:0
Recv:3:57:02.506: Cap:AUTOREPORT_SD_STATUS:0
Recv:3:57:02.508: Cap:LONG_FILENAME:1
Recv:3:57:02.509: Cap:LFN_WRITE:0
Recv:3:57:02.512: Cap:CUSTOM_FIRMWARE_UPLOAD:0
Recv:3:57:02.514: Cap:EXTENDED_M20:1
Recv:3:57:02.516: Cap:THERMAL_PROTECTION:1
Recv:3:57:02.518: Cap:MOTION_MODES:0
Recv:3:57:02.519: Cap:ARCS:0
Recv:3:57:02.521: Cap:BABYSTEPPING:1
Recv:3:57:02.523: Cap:EP_BABYSTEP:0
Recv:3:57:02.525: Cap:CHAMBER_TEMPERATURE:0
Recv:3:57:02.529: Cap:COOLER_TEMPERATURE:0
Recv:3:57:02.529: Cap:MEATPACK:0
Recv:3:57:02.532: Cap:CONFIG_EXPORT:0
Recv:3:57:02.532: ok (N4)
Send:3:57:02.532: N5 M220 S100 ; Speed multiplier 100%
Recv:3:57:02.545: ok (N5)
Send:3:57:02.545: N6 M221 S100 ; Flow multiplier 100%
Recv:3:57:02.565: ok (N6)
Send:3:57:02.565: N7 G92 E0
Recv:3:57:02.571: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:02.571: ok (N7)
Send:3:57:02.571: N8 G90
Recv:3:57:02.573: ok (N8)
Send:3:57:02.573: N9 M82
Recv:3:57:02.574: ok (N9)
Send:3:57:02.574: N10 G21 ; Use mm as unit
Recv:3:57:02.576: ok (N10)
Send:3:57:02.576: N11 M114
Exec:3:57:02.576: @getIP
Recv:3:57:03.577: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:03.577: ok (N11)
Send:3:57:03.584: N13 M114
Exec:3:57:03.584: @startCodeProcessed
Send:3:57:03.584: N14 M155 S1
Send:3:57:03.584: M117 192.168.1.52:3344
Recv:3:57:03.590: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:03.590: ok (N13)
Recv:3:57:03.590: ok (N14)
Recv:3:57:03.590: ok
Recv:3:57:05.764: echo:Unknown command: "[ 17.598172] rc.local[1354]: My IP address is 192.168.1.52"
Mesg:3:57:05.764: Received extra ok - ignored
Recv:3:57:05.764: ok
Mesg:3:57:06.794: Connection closed by os.
Mesg:3:57:07.936: Dtr: false Rts: false
Mesg:3:57:07.957: Connection started
Mesg:3:57:07.957: Printer reset requested - emergency:false
Mesg:3:57:08.013: Dtr: true Rts: true
Mesg:3:57:08.033: Dtr: false Rts: false
Recv:3:57:08.040: Response while unconnected:echo:Unknown command: "echo:U"echo:Unknown command: "repelogi"
Recv:3:57:08.040: echo:Unknown command: "echo:U"echo:Unknown command: "repelogi"
Recv:3:57:08.040: Connection verified by:ok
Mesg:3:57:08.040: Received extra ok - ignored
Recv:3:57:08.040: ok
Send:3:57:08.040: N1 M110
Recv:3:57:08.042: Line: 1
Recv:3:57:08.042: ok (N1)
Send:3:57:08.055: N4 M115 ; Get firmware capabilities and info
Recv:3:57:08.078: FIRMWARE_NAME:Marlin 2.1.3-beta3 (Jul 3 2025 14:43:58) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Ender-3 Pro KINEMATICS:Cartesian EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Recv:3:57:08.080: Cap:SERIAL_XON_XOFF:0
Recv:3:57:08.083: Cap:BINARY_FILE_TRANSFER:0
Recv:3:57:08.084: Cap:EEPROM:1
Recv:3:57:08.085: Cap:VOLUMETRIC:1
Recv:3:57:08.087: Cap:AUTOREPORT_POS:0
Recv:3:57:08.091: Cap:AUTOREPORT_TEMP:1
Recv:3:57:08.091: Cap:PROGRESS:0
Recv:3:57:08.093: Cap:PRINT_JOB:1
Recv:3:57:08.094: Cap:AUTOLEVEL:0
Recv:3:57:08.095: Cap:RUNOUT:0
Recv:3:57:08.097: Cap:Z_PROBE:0
Recv:3:57:08.098: Cap:LEVELING_DATA:1
Recv:3:57:08.100: Cap:BUILD_PERCENT:1
Recv:3:57:08.102: Cap:SOFTWARE_POWER:0
Recv:3:57:08.105: Cap:TOGGLE_LIGHTS:0
Recv:3:57:08.107: Cap:CASE_LIGHT_BRIGHTNESS:0
Recv:3:57:08.109: Cap:EMERGENCY_PARSER:1
Recv:3:57:08.112: Cap:HOST_ACTION_COMMANDS:0
Recv:3:57:08.114: Cap:PROMPT_SUPPORT:0
Recv:3:57:08.115: Cap:SDCARD:1
Recv:3:57:08.117: Cap:MULTI_VOLUME:0
Recv:3:57:08.118: Cap:REPEAT:0
Recv:3:57:08.120: Cap:SD_WRITE:0
Recv:3:57:08.122: Cap:AUTOREPORT_SD_STATUS:0
Recv:3:57:08.124: Cap:LONG_FILENAME:1
Recv:3:57:08.125: Cap:LFN_WRITE:0
Recv:3:57:08.128: Cap:CUSTOM_FIRMWARE_UPLOAD:0
Recv:3:57:08.130: Cap:EXTENDED_M20:1
Recv:3:57:08.137: Cap:THERMAL_PROTECTION:1
Recv:3:57:08.138: Cap:MOTION_MODES:0
Recv:3:57:08.138: Cap:ARCS:0
Recv:3:57:08.138: Cap:BABYSTEPPING:1
Recv:3:57:08.139: Cap:EP_BABYSTEP:0
Recv:3:57:08.141: Cap:CHAMBER_TEMPERATURE:0
Recv:3:57:08.144: Cap:COOLER_TEMPERATURE:0
Recv:3:57:08.145: Cap:MEATPACK:0
Recv:3:57:08.147: Cap:CONFIG_EXPORT:0
Recv:3:57:08.147: ok (N4)
Send:3:57:08.147: N5 M220 S100 ; Speed multiplier 100%
Recv:3:57:08.149: ok (N5)
Send:3:57:08.149: N6 M221 S100 ; Flow multiplier 100%
Recv:3:57:08.152: ok (N6)
Send:3:57:08.152: N7 G92 E0
Recv:3:57:08.159: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:08.159: ok (N7)
Send:3:57:08.159: N8 G90
Recv:3:57:08.162: ok (N8)
Send:3:57:08.162: N9 M82
Recv:3:57:08.164: ok (N9)
Send:3:57:08.164: N10 G21 ; Use mm as unit
Recv:3:57:08.166: ok (N10)
Send:3:57:08.166: N11 M114
Exec:3:57:08.167: @getIP
Recv:3:57:08.172: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:08.172: ok (N11)
Send:3:57:08.173: N12 M114
Exec:3:57:08.173: @startCodeProcessed
Send:3:57:08.173: N13 M155 S1
Send:3:57:08.173: M117 192.168.1.52:3344
Recv:3:57:08.178: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
Recv:3:57:08.178: ok (N12)
Recv:3:57:08.179: ok (N13)
Recv:3:57:08.179: ok
Mesg:3:57:37.292: Connection closed by os.

Comments

  • Ok, good news is that on server side your settings are 100% correct. DTR/RTS have no meaning for pure serial connection.

    This response: Recv:3:57:05.764: echo:Unknown command: "[ 17.598172] rc.local[1354]: My IP address is 192.168.1.52"

    shows clearly there is some other software talking via serial which interferes the communication and causes lots of issues. My guess is that linux is configured to also output everything to serial console.

    To disable the serial console on a Raspberry Pi, you need to modify the boot configuration to remove the serial console settings and potentially disable the serial getty service. This prevents the kernel and other processes from using the serial port for outputting messages. 
    Here's a breakdown of the process:
    1. Modify /boot/firmware/cmdline.txt:
    • Open the cmdline.txt file in the /boot directory using a text editor with root privileges (e.g., sudo nano /boot/cmdline.txt).
    • Locate and remove any lines containing console=serial0,115200 (or similar, like console=ttyAMA0 or console=ttyS0). These lines specify that the serial port should be used as a console.
    • Save the changes and exit the editor. 
    2. Disable the serial getty service (optional but recommended): 
    • The serial-getty@ttyAMA0.service (or similar, like serial-getty@serial0.service) is responsible for starting a login process on the serial port. To fully disable the console, you should mask this service:
      • sudo systemctl stop serial-getty@ttyAMA0.service
      • sudo systemctl mask serial-getty@ttyAMA0.service
    • You may need to adjust the service name (ttyAMA0 or serial0) depending on your Raspberry Pi model and configuration. 

    What image are you using? pi default is to have it but I thought I had removed that.
  • Thanks for the swift reply! Using Bookworm v38. I removed the console output with these instructions and also disabled getty service. With a quick test run seems to work. Will come back if I encounter new related problems.

    Maybe again add these hints to Communicaton errors / Connection problems with your printer knowledge base writes? Simple solution but finding it was not trivial!
  • Great it works now. I also have added it in connection issues list in FAQ as new point:
    https://www.repetier-server.com/knowledgebase/connection-problems-with-printer/

Sign In or Register to comment.