Reversing Mini Fabrikator V2 (Malyan M100) 3D Printer

Reversing Mini Fabrikator V2 (Malyan M100) 3D Printer


And all of this started when EMARD ordered one Mini Fabrikator V2

For a some time I have this small printer I have buy it from EMARD that already applied  his fixes on it.

When you get printer it usually comes partially disassembled with missing or unscrewed bolts and screws.

When you fix that you are usually trying to set repetier host working over serial port, and on this printer this is not a good Idea.
Serial port is bad to.
We have tested it on linux, windows and mac and it is not working.
Maybe you will be able to get is to start printing, but after few minutes you will end up in some error :(
We enven tried to print over TCP you can connect to printer on port 23 and use it that way, but we got same errors.
But ok printer has nice web interface and you can somehow set it over serial.
In windows you can use putty  and in linux you can try screen

screen /dev/ttyACM0 115200

will give you blank screen so you need to type M550 to get defaultSSID
now setup the wireless

M550 YourSSID
M551 YourPassword

all without quotes
Now wait a bit and enter M552 – you will get IP of the printer.
Go to web page of the printer and you are now in nice GUI (if you have internet connection)
So again problem.
This printer is getting all images and js files from internet and that is not secure.
But anyway, you can now send GCODE over web and all will work!
Well you can if GCODE if smaller then 1Mb, and usualy it is not :(
So another problem that needs to be fixed.
So how to print?
The only way I can print is to put auto00.g to SD card, then printer print flawlessly (considering the price and with good settings).
And I could live with that, but members of my maker space decided to buy more of this printers, so we ended up with 12 printers.
From 10 ordered printers only one was ready to print, rest was missing something.
After working on them for a few days we manage to get almost all printers to good shape.


We had only one printer that has 12V connected to GND, and sometimes it is working (probably some wire is cut).
But we will fix that.
After fixing all those problems, I had one more problem with my printer(first one).
My bed sensor started to show 1000 degrees.

My last successful print :(

After this print I got this.

So it is problem with sensor or with bad solder on stm32.
So I decided to take it apart!

And when I got the board out I was thinking “somethings must to be done”.
So I decided to reverse it and to try improve it a bit more.
First I needed schematics.
So I measured a bit and put all on git – it is still unfinished.
Then rest of crew told me that they can get table up to 100 degrees, and EMARD could get table maximum on 65 degrees.

So I have searched for a new fw but did now find newer.
There is update for part of the firmware and it is done by putting bin file on SD card, but how could I be in safe zone with that fw.
Maybe I could put it in but will it brick my printer?
So I needed better way.
I already had all parts on my table so first I have tried to extract ESP8266 fw.

I did send mail before to Malyan if they can give me source for ESP8266 to remove linking to outside sites, and to transfer code to ESP32, but did not get any response.
Extracting fw from ESP was easy. I just used ESPTOOL and I got fw, but will it work?

ESP image is here

And inside this fw are all passwords and SSID I have used :)
So I have connected my ESP to original board and instantly got WEB gui :)

So now I need STM32 fw.

I did try swd, and serial, but it seams both are locked.
Even BOOT1 and BOOT0 pins are used for other purposes.

But why bother with on board chip I can try available bin file from web site and connect it to ESP.
So I downloaded file, and try to flash but got some errors with st-flash.
It was complaining that code is to big to fit.
Then I have read that some bluepill have 128K.
And that DFU loader is recognizing it like 128K.
So I decided to put DFU bootloader.

And after that I used arduino to check how it is uploading code to board, and just changed binary to available one.

And ended up with working 3D printer bluepill :)

Now I can experiment a bit with my new printer clone.
First thing I want to try is to create simple soft that extract bootloader to SD card so I can extract original from fw.
Then maybe to experiment and create bootloader that extract fw from board (I did not find new version for M100 – the one with table able to get to 100 degrees).
And main thing I want to try is to get Marlyn fw working on this printer and for wireless part to use ESP32.

You can get original fw from here

Now download bootloader

connect stlink and write bootloader to bluepill

st-flash write generic_boot20_pc13.bin 0x8000000

next remove stlink, connect bluepill to usb – LED should blink

Now load update.bin

maple_upload ttyUSB1 2 1EAF:0003 update.bin

Now you have all you need to continue with non invasive reversing!!!
Note that serial over USB will not work (you do not have right bootloader)
I have tried V1 and V2 bootloader but for now did not get it to show as serial device :(

Ok I have found a reason why it was not working.
Maple bootloader is a bit smaller then V1 and V2 bootloader so you need to do it like this
While having maple bootloader connect SD card and put update.bin and empty fcupdate.flg to empty SD card
Now flash V2 bootloader

st-flash write V2LOADER.bin 0x8000000

it will reboot and LED will not be on
please wait until LED gets ON
disconnect all
try to connect bluepill with USB
You should have serial port now ;)

And then Radiona member Marvin compiled Marlyn for Malyan

It is easy to switch between firmwares.

We still need to get all pins to work and usb-serial is not working….

This week we even have organized workshop in our makerspace to apply EMARD fixes rest of the new printers :)

Leave a Reply