QIDITECH / QIDI_MAX3

GNU General Public License v3.0
46 stars 4 forks source link

Reflashing Toolhead from 0.12 to stock #47

Open leadustin opened 6 months ago

leadustin commented 6 months ago

Is it possible to flash a tool head flashed to Klipper 0.12 back to the original Qidi Klipper? The original image is installed. One user claims that it is not possible to flash from 0.12 back to stock

CChen616 commented 6 months ago

As far as I know, this is reversible; at least, I do it frequently

scaramonga commented 6 months ago

As far as I know, this is reversible; at least, I do it frequently

Great. Then a detailed guide of how to do so would be nice. A simple step my step guide showing how to return an X-PLUS 3 back to the stock QIDI version - 4.2.13. There is too much conflicting info out there.

My system sits borked ATM, with conflicting attempts at trying to flash print head, one method uses 'Katapult', the other not, which is it? A method for returning the print head to how Qidi has it would be much appreciated.

MCU' errors galore, and this shows something is not right: 20240508_083914

For EMMC I use the image from QIDI - xindi-20230309 For Mainboard I create flash files from the klipper installed on EMMC and install via SD Card slot on mainboard For Print head I have no clue what direction to take?

Is this correct?, and what other things am I missing, if any?

As it stands, no recovery files work, and no factory reset can be done on unit.

CChen616 commented 6 months ago

Try updating using the latest update package then flash the MCU according to the instructions here https://github.com/QIDITECH/QIDI_PLUS3/issues/27#issuecomment-2073932891

I have not worked with Katapult, so not sure about it.

scaramonga commented 6 months ago

Try updating using the latest update package then flash the MCU according to the instructions here QIDITECH/QIDI_PLUS3#27 (comment)

I have not worked with Katapult, so not sure about it.

I did, no difference.

CChen616 commented 6 months ago

According to my colleague, if you choose to update when the SOC version is 2.0.6 on the Plus3, there won't be an "updating" interface visible, but it will actually perform the update. If you don't take any action and just wait for the update to complete, you should see a prompt to manually restart. At that point, the update should be finished.

If the method to refresh the toolhead board does not work, then I suggest following the procedure provided by Katapult to reflash the firmware.

scaramonga commented 6 months ago

Sigh.

Updating without visual reference?, not good.

I don't wish to flash head via Katapult, I just want it back to stock, but it seems this is now impossible once one does it.

It's confusing, to me, anyway.

What are the actual MCU's that get flashed? Let's start with that, and more importantly, let's list what versions each should be on, stock. (4.2.13) as of today.

EMMC - this is easy, and Qidi have 'xindi-20230309' image for this. Easily flashed, I use Balena, but Rufus, or most will do. I also have the official EMMC adapter to do this with.

MAINBOARD - Easy also, flashes fine, manually only for me, as nothing else works.

MCU Extruder - A maze of confusion, with one saying do this, the other do that, and one using 'Katapult', the other not? < -This is what we need clarification on. Katapult is not 'stock', and in no way returns the head to Qidi defaults. One guide says to press 'BOOT' & 'RESET', the other just relies on 'BOOT'? I'm sorry, but unless I'm totally stupid?, the guides conflict, and are not clear, hence confusion. We need a clear and concise guide regarding the MCU for print head.

MCU RPI - What the hell is this? Not even mentioned in other guides?, and the one I'm looking at makes no sense?

What are the SOC/MCU/UI figures supposed to look like when 'stock' QIDI, has been successfully flashed to all?

A 'stock' MCU Extruder flash would probably solve this?, but I fear once flashed with anything, then we are where we are, waiting on a replacement board :)

Fluidd as I'm at:

Annotation 2024-05-08 222628
Fisheye3D commented 6 months ago

Sigh.

Updating without visual reference?, not good.

I don't wish to flash head via Katapult, I just want it back to stock, but it seems this is now impossible once one does it.

It's confusing, to me, anyway.

What are the actual MCU's that get flashed? Let's start with that, and more importantly, let's list what versions each should be on, stock. (4.2.13) as of today.

EMMC - this is easy, and Qidi have 'xindi-20230309' image for this. Easily flashed, I use Balena, but Rufus, or most will do. I also have the official EMMC adapter to do this with.

MAINBOARD - Easy also, flashes fine, manually only for me, as nothing else works.

MCU Extruder - A maze of confusion, with one saying do this, the other do that, and one using 'Katapult', the other not? < -This is what we need clarification on. Katapult is not 'stock', and in no way returns the head to Qidi defaults. One guide says to press 'BOOT' & 'RESET', the other just relies on 'BOOT'? I'm sorry, but unless I'm totally stupid?, the guides conflict, and are not clear, hence confusion. We need a clear and concise guide regarding the MCU for print head.

MCU RPI - What the hell is this? Not even mentioned in other guides?, and the one I'm looking at makes no sense?

What are the SOC/MCU/UI figures supposed to look like when 'stock' QIDI, has been successfully flashed to all?

A 'stock' MCU Extruder flash would probably solve this?, but I fear once flashed with anything, then we are where we are, waiting on a replacement board :)

Fluidd as I'm at:

Annotation 2024-05-08 222628

I will start by saying both guides give you a warning about updating. As for the extruder, both guides state Boot and reset, I'm not sure where you're not seeing this. Flashing the RPI is part of Klipper and is fully documented in the Klipper guide. You need to follow the guide for flashing the toolhead but without updating to the latest klipper build. Install Qidi's klipper and build and flash the toolhead as the updating guide shows. It will flash the correct build.

scaramonga commented 6 months ago

I will start by saying both guides give you a warning about updating. As for the extruder, both guides state Boot and reset, I'm not sure where you're not seeing this.

I will start by saying that I acknowledged this in original thread :)

Annotation 2024-05-09 024756

Note RED line, no 'RESET' referred to ;)

On the other hand:

Annotation 2024-05-09 025456

Which is it? ;)

Regardless. I have been through everything, tried everything, hours and hours of trying, and have come to the conclusion, that once you flash print head, you roll the dice. Believe me, I have read and scrutinised every detail of each guide, and nothing will return the system to stock. EMMC & Mainboard yes, but not the print head.

Fisheye3D commented 6 months ago

I will start by saying both guides give you a warning about updating. As for the extruder, both guides state Boot and reset, I'm not sure where you're not seeing this.

I will start by saying that I acknowledged this in original thread :)

Annotation 2024-05-09 024756

Note RED line, no 'RESET' referred to ;)

On the other hand:

Annotation 2024-05-09 025456

Which is it? ;)

If you had to flash the board the first time using both the boot and reset which one would you think it would be the next time you need to put into dfu mode?

scaramonga commented 6 months ago

If you had to flash the board the first time using both the boot and reset which one would you think it would be the next time you need to put into dfu mode?

Well no. Regardless, I've tried both since, it don't matter either way. The whole point is, a return to 'STOCK', which I now understand is not possible, once one flashes the print head, just cannot be done.

Just be aware, and have that spare board handy :)

Both, and all, guides are written with the intention of circumventing the original firmware/software, and using these very guides to try and get back, is a minefield at best, and a nightmare otherwise, more so, when most of the stuff is conflicting.

CChen616 commented 6 months ago

Only the older versions of the SOC are without an update prompt.

A stock version should look like this:

SOC: 4.3.13
MCU: 0.10.0
UI: 4.3.13

Have you updated successfully yet?

As for Katapult, I'm not sure how to use it, but you might be able to find some information from its official repository: https://github.com/Arksine/katapult Currently, I'm uncertain about the status of your print head board, so I can't offer any specific advice. I will continue to look into this plugin.

MCU here in Fluidd page refers to the mcu on the motherboard. I'm not sure why it still can't connect after flashing; perhaps providing a detailed klippy.log could help me understand more.

image

scaramonga commented 6 months ago

Only the older versions of the SOC are without an update prompt.

A stock version should look like this:

SOC: 4.3.13
MCU: 0.10.0
UI: 4.3.13

Have you updated successfully yet?

Exactly. Look at my S.O.C version in above image - 2.0.6??? Something is not right.

CChen616 commented 6 months ago

Yes, version 2.0.6 is the original image version and needs to be updated to the latest version for use. Have you tried pressing the update button and waiting for it to complete the update? There's no interface showing progress during the update, but there will be a prompt once the update is completed. Please ensure that the update file is located in the QD_Update folder at the root directory of your USB device and is named QD_Plus_SOC without any suffixes like .bak.

Fisheye3D commented 6 months ago

@scaramonga

If you have Qidis firmware on the emmc and the board you can do the following, If you have already flashed the toolhead with katipult when you originally did the update you will need to redownload it as qidi's stock image doesn't contain it

git clone https://github.com/Arksine/katapult

as you have katapult on already you can move on to flashing the klipper image to it.

cd ~/klipper
make menuconfig

Copy the settings image

Q then Y to save. then use

make clean
make -j4

use this command to get your serial

ls /dev/serial/by-id/*

next install python 3

sudo apt install python3-serial

Next you will flash the toolhead using this command, Make sure you put in your serial id.

python3 ~/katapult/scripts/flashtool.py -f ~/klipper/out/klipper.bin -d /dev/serial/by-id/usb-katapult_rp2040_YOUR_ID
Fisheye3D commented 6 months ago

@scaramonga

If you still get the mcu error you might need to flash the linux mcu, Do that with

cd ~/klipper/
make menuconfig

then under microcontroller arch choose Linux process then save and exit. then use the following commands

sudo service klipper stop
make flash
sudo service klipper start

this will flash the rpi mcu

scaramonga commented 6 months ago

I don't get any of they settings with 2040

Annotation 2024-05-09 035901
Fisheye3D commented 6 months ago

@CChen616 Can you provide the correct flash chip for the toolboard for @scaramonga

CChen616 commented 6 months ago

Just keep it the same as in the picture image

scaramonga commented 6 months ago

Yup I did, here we go lol

Annotation 2024-05-09 042511 Annotation 2024-05-09 042257

I give up.

CChen616 commented 6 months ago

try sync time first using

# Remove any conflicting services
sudo apt remove -y chrony ntp
# Enable NTP
sudo timedatectl set-ntp true
# Set the timezone
dpkg-reconfigure tzdata 
scaramonga commented 6 months ago

Jesus, why? I've not set up anything, nor installed nothing? Image from Qidi? Now I've got to fiddle with more settings?

Thanks for all your help guys, I really do appreciate it! :), but I'm done with this.

I do accept that it was my choice to deviate from the stock variant, and for that, I regret, and blame no one but myself. I take FULL responsibility for my actions, and blame not a soul otherwise.

I will say this. PLEASE keep in mind, before you mod, to have a way back, and test that way back, before all else fails :)

HAPPY PRINTING! :D

leadustin commented 6 months ago

Incorrect system time seems to be a recurring problem with Qidi. I hope that this will be solved at some point. @scaramonga: don't give up, this will probably be the last step to success.

billkenney commented 6 months ago

@scaramonga you can try updating your SOC firmware by downloading mksclient-plus3.deb from here: https://github.com/billkenney/max3_plus3_recovery. Put it on a flash drive, ssh into your printer, and install it with sudo dpkg -i /home/mks/gcode_files/sda1/mksclient-plus3.deb. I had to comment out the line "systemctl disable gpio-monitor.service" in the DEBIAN/postinst script, because that service did not exist on my printer and it caused the firmware update to fail. Could be the reason it's failing on your printer as well. @CChen616 maybe you could update the firmware postinst script to check if the gpio-monitor.service exists, and only disable the service if it does exist.

scaramonga commented 6 months ago

Thanks.

EMMC OK, flashed tool head OK, now no connection to printer?

System is borked.

billkenney commented 6 months ago

@scaramonga does it boot up and does the screen work? Is the firmware version updated? Maybe the IP address changed. I don't know what else could be wrong.

scaramonga commented 6 months ago

Yup, boots, and screen shows normal layout, but nothing works.

I loaded EMMC tonight with their image, flashed print head using these instructions, doing the 'time' thing: https://openqidi.com/books/upgrades-updates/page/updating-and-flashing-the-the-toolhead-mcu

All went fine, apart from, I no longer can connect, nor SSH into printer? It's set on a fixed IP, shows up in Router etc.

I'm beginning to wonder if EMMC (the new 32G) one I got is borked? Problems have stemmed from that. I have the original 8G one, but I wanna keep that as is, and using it results in the above errors.

I may just try and 'image' the 8G variant, wipe it, then proceed? What do you think?

The problem is, connection is fine until I update EMMC/Tool Head, then I'm in limbo, as no access (unless I'm missing something?) I did what you said anyway with recovery files on SD Card, but nothing happened, but you also said that may happen. Trouble is, I have no access to system to do otherwise, manually.

Just to confirm, xindi-20230309 is the one I should be using?

billkenney commented 6 months ago

As long as you got the firmware updated you should be able to connect. I'd try writing the Qidi image to the emmc again (whichever one you want to use), and see if you can connect. Someone also said you can write the image to and boot from a flash drive (https://github.com/QIDITECH/QIDI_PLUS3/issues/27#issuecomment-2081588087), and it takes priority over the emmc, so you could try that as well if you dont want to overwrite your emmc.

Also I said flash drive (usb in the top of the printer), not sd card. I don't know if an sd card mounts to ~/gcode_files/sda1. I don't think you see anything happen when you install the mksclient file, but as long as there are no errors the firmware should be updated. You can confirm by checking that the SOC version is 4.2.13 or 4.3.13 on the screen.

Yes xindi-20230309 is the correct image.

scaramonga commented 6 months ago

OK.

Put original EMMC in, connection fine, but: 20240511_030809

Note, both restart buttons, none work. Still, I have access to system now.

Had this since I flashed print head with Katapult, cannot get rid of it.

billkenney commented 6 months ago

My best guess is that you didn't flash the extruder with the 0.10 klipper file. Restart holding the bottom left button on the back of the extruder for like 1 min. ssh into your printer, cd /home/mks/klipper ; make clean ; make menuconfig. select rpi2040, w25q080 with clkdiv 2, communication interface usb. then make. then ls /home/mks/gcode_files/*. if you see sda1 in the list, cp /home/mks/klipper/out/klipper.uf2 /home/mks/gcode_files/sda1. if you dont see sda1, sudo mount /dev/sda1 /dev/mnt ; cp /home/mks/klipper/out/klipper.uf2 /dev/mnt. then restart the printer

scaramonga commented 6 months ago

AT LAST!!!! WooHoo, LOL!!!

I tried one more shot at flashing mainboard, and it worked! Light actually came on in chamber (long time since I've seen that lol).

All seems OK, not printed yet, but no errors thus far. I would like to know (I'm like that) as to what the problems was?, but I suspect flashing the print head was it. Fluidd ain't working, neither is connection in Orca, but Rome wasn't built in a day lmao :D

Does not like the new 32G EMMC?

billkenney commented 6 months ago

If fluidd isn't working, try both port 80 and 10088, i.e., 192.168.1.xxx:80 and 192.168.1.xxx:10088.

If it still isn't working, ssh into your printer, run the following commands: cd /home/mks ; rm -rf fluidd ; wget 'https://docs.google.com/uc?export=download&id=1Essar3y789UNelY1G5T_Dro7V41O4m4K' -O fluidd-1.28.tgz ; tar -xzf fluidd-1.28.tgz ; mv dist fluidd ; rm fluidd-1.28.tgz Make sure the fluidd folder is there with ls /home/mks/fluidd. Assuming it is there, try both ports again. If it doesn't work immediately, turn your printer off and on again

scaramonga commented 6 months ago

Good stuff!! Fluidd working dandy ho :)

Hey bud, many thanks for all your help, it is honestly much appreciated! Superb, and I can't thank you enough :)

What I will say, is, if your gonna mess with this 'mess' of a system, then have that original system backed up!, as I can say, for certain, I'd be F'''d. ;) Weird way Qidi have done this.

billkenney commented 6 months ago

What I will say, is, if your gonna mess with this 'mess' of a system, then have that original system backed up!, as I can say, for certain, I'd be F'''d. ;) Weird way Qidi have done this.

You're welcome. I definitely agree you need a working backup before trying to update to unsupported software. I'm running the latest software with a working stock screen, but I'm sure there are issues other people could run into that I didn't run into.

scaramonga commented 6 months ago

A little update.

Cloned EMMC image to 32G variant, extended usable space, all good still :) Camera (Qidi) back working, whereas, it just would not work on conversion.