Failed to auto detect serial port (Qidi X-pro)

If you already have cables attached to the printer that solution is probably preferable to my workaround. There are no firmware changes needed.

For my solution I suggest that you try locate where the error is. The error is has probably nothing to do with braudrate setting, just that you are unable to connect. There are two general areas that might give you trouble, the setup on your RPi or your network.
There are a few simple things I could suggest you make sure is OK:
*The printer is powered on
*The printer and RPi is connected to your network

*You need to modify the last command before you send it. Make sure you understand the explanation in notes when you modify.
*You only need to install socat once. But the two others need to be runned every time you restart the RPi. (Once you get this working I would suggest you automate it)
*The terminals running the commands are active. Use two separate terminal windows sending the commands in correct order.
*The ports showing up in octoprint should be the same as the ones you recieve from the terminal.

*RPi and printer on same LAN.
*Try from same access point as RPi with a computer to use Qidi print and send print remotely

So i have confirmed that the pi and the printer are both on the same network through the same access point. Printer is powered on and qidi print is seeing it on that network and it is ready to print. Just to confirm you are successfully communicating with a qidi tech X-Max printer correct? I've just seen a lot of mixed reviews on qidi xmax ability to work with octoprint. Don't want to be waisting your time or mine.

It does work on X-max.
If you follow how I do it, it should work.
Virtual-ports

1 Like

So I did click for click what you did still to no luck. what version of firmware are you running for octiprint and for the xmax? wondering if I have a newer or older version. Although now connection is just timing out when trying to connect.

I think the firmware is the same on our printers. Mine is V4.2.9. I don't think it would matter as long as you are able to print remotely. Since the slicer provided by Qidi would likely send commands the same way.
Maybe try if you are able to reach the printer IP-addr from RPi? If 'Destination Host Unreachable' then that is your problem, if not I do not know. (In terminal: 'ping your.printer.ip.addr')

so I ended up connecting them both directly to a switch and now its working also I am running an older firmware 4.2.6.5 is what mine is at which is odd as I just got it last week. Qidi also doesn't have any firmware on there website either. But its working via either net to switch. Thanks for all the help I appriacte it!

1 Like

I know this is an older post but seems to keep updating every now and then as many people like me used to to figure out how to hookup Octopi to my Qidi X-Pro. I wanted to chime in with a simple one that may help others. Above there are multiple references to using a CP2102 USB UART but that is not your only option. I work a lot with Arduino's and have several flavors of USB to FTDI breakout board programmers. Those work just fine too and perform a similar job just through a different chipset. The FTDI adapters are much more common and plentiful especially if your in a hurry for the next day Amazon order. In fact if your not planning on installing the Octopi server under the printer save yourself some bulk and order a FTDI USB adapter with the wires built in. It'll save you a little bulk plugged into the pi and you won't have to worry about a DuPont cable falling off.

This worked for me and my QIDI X-MAX- I got a firmware error in octoprint but after following the links I installed the plugin "Fix CBD Firmware Plugin (0.3.0)" and it worked right away. (after a reboot)

For a little while I was confused about how it all connected. So for those who follow behind, plug your raspi and qidi printer into the same network switch via ethernet (I have read various things about wifi issues to steer clear of that)
Set your network switch / router to assign fixed IP to both the raspi and Qidi Printer in DHCP reservation.

Then run the commands lulukul outlines above.

However -
I am stuck with the automation of steps 2 and 3 though.
I have tried using cron (sudo nano crontab -e) to run those commands but it doesn't seem happy.
Each time it boots the port numbers increase. And the previous ones are no longer working.

In crontab I added this;

@reboot socat -d -d pty,raw,echo=0 pty,raw,echo=0
@reboot socat -v udp4-datagram:192.168.0.113:3000 open:/dev/pts/2,raw,nonblock,waitlock=/tmp/s0.locak,echo=0,b115200,crnl

But it doesn't really work. Any tips on the best way to automate this step?

I am not sure of the best way to automate. But I think using sudo nano crontab -e would just create a regular textfile. When I automated it I ran the command crontab -e. and it looks like this:
Notice I put some delays. Not sure that is necessary but the first command must come before the second.

Edit: I've noticed that you used '/dev/pts/2', which might be your problem. I would use port "/dev/pts/1" as port in the connection command. I'm not sure how it works but I think that if you have terminals opened they are assigned a port (since when you echo to them the text echoed would appear in that terminal). This means that when you boot and have no terminals open the virtual ports that you create will be '/dev/pts/0' and '/dev/pts/1'.

Ok ive been following this in relation to getting my Qidi X-Plus connected to Octoprint via the software method and i know i'm so close but cant quite get a handshake working properly. However i am trying this via wifi and this could be my issue ? Are you guys connecting via LAN ?

So heres what i did.

I installed socat in my raspberry pie via

sudo apt-get install socat

The run up two terminals connected to the pi via putty. On the first i run

socat -d -d pty,raw,echo=0 pty,raw,echo=0

This gives me the following output

2021/05/11 09:58:54 socat[1106] N PTY is /dev/pts/1
2021/05/11 09:58:54 socat[1106] N PTY is /dev/pts/2
2021/05/11 09:58:54 socat[1106] N starting data transfer loop with FDs [5,5] and [7,7]

On the second putty connection i run

socat -v udp4-datagram:192.168.1.121:3000 open:/dev/pts/1,raw,nonblock,waitlock=/tmp/s0.locak,echo=0,b115200,crnl

Added

/dev/pts/*

To additional serial ports, which gives me

image_2021-05-11_100554

Connecting to /dev/pts02 gives me

< 2021/05/11 10:06:35.276030 length=1 from=0 to=0

< 2021/05/11 10:06:35.283165 length=11 from=1 to=11
N0 M110*35

2021/05/11 10:06:35.378975 length=38 from=0 to=37
Error:Wifi reboot,please reconnect!\r\r
2021/05/11 10:06:35.383243 length=38 from=38 to=75
Error:Wifi reboot,please reconnect!\r\r
< 2021/05/11 10:06:35.386209 length=5 from=12 to=16
M112
< 2021/05/11 10:06:35.393818 length=11 from=17 to=27
N1 M11232
< 2021/05/11 10:06:35.394505 length=17 from=28 to=44
N2 M104 T0 S0
35
< 2021/05/11 10:06:35.395014 length=15 from=45 to=59
N3 M140 S0*102
2021/05/11 10:06:35.599876 length=38 from=76 to=113
Error:Wifi reboot,please reconnect!\r\r
2021/05/11 10:06:35.619797 length=38 from=114 to=151
Error:Wifi reboot,please reconnect!\r\r
2021/05/11 10:06:35.648487 length=38 from=152 to=189
Error:Wifi reboot,please reconnect!\r\r
2021/05/11 10:06:35.649479 length=38 from=190 to=227
Error:Wifi reboot,please reconnect!\r\r

So it looks like its trying to connect

connecting to /dev/pts1 gives

State: Detecting serial connection

and /dev/pts00

N0 M110*35

      N0 M110*35

                N0 M110*35

                          N0 M110*35

                                    N0 M110*35

                                              N0 M110*35

                                                        N0 M110*35

                                                                  N0 M110*35

                                                                           N0 M110*35

     N0 M110*35

               N0 M110*35

                         N0 M110*35

                                   N0 M110*35

                                             N0 M110*35

                                                       N0 M110*35

                                                                 N0 M110*35

                                                                           N0 M110*35

     N0 M110*35

               N0 M110*35

                         N0 M110*35

                                   N0 M110*35

/dev/pts/3 gives the same output but obviously a different window in putty.

I have the CBD fix plugin installed. What am i doing wrong or is it just issues with wifi handshake ?

For the UART... Maybe the TX and RX are reversed. TX to RX and RX to TX... Just an observation should be black/green/white.

I am having trouble getting the Qidi X-Plus hooked up with a FTDI USB adapter with the wires built in. I have connected the ground, TX and RX cables to the printer and the usb to the Pi. However when I hit connect it just times out and never connects. What am I doing wrong?

Ok I have it connected now but I am using the slice that came with the Qidi machine and getting errors when I load the guide saying some settings were not set. How do you fix this or do I just need a different slicer?

Looks like you have installed the OctoLapse plugin. You'll need to correctly configure it for your slicer. The OctoLapse settings have loads of blue questions marks explaining all the settings to help you set it up.