Why

I bought the SparkMaker and made a few prints, but a mishap left me with a broken screen. So, roughly a year later I purchased and installed the FHD upgrade kit. after a few failed prints I shelved the project, then returned recently with the first successful FHD print. While checking for firmware updates, I noticed there was an android app. I had not realized the printer could be controlled via bluetooth before this, and I was intrigued. I set off on installing the application, and found it less than desireable. The UI was clunky, and for some reason it wouldn't let me pick a file to upload. So I get an idea: reverse engineer the android app and build a desktop application to integrate more cleanly with the printing workflow.

The app was written in react native as luck would have it, so after using a random web tool for cleaning up react bundles i was able to sift through all the javascript to find the commands that are being sent and how it handles responses. using standart web bluetooth functions and vue.js I threw together this frontend. Spoiler: You can't send files to the printer, they have to already exist on the SD Card. As far as I can tell, to add that capability would require a firmware level change - and that is a project for another day.

The API

The bluetooth communication API for the SparkMaker FHD is ...interesting. It seems like it was just patched in as an after thought. Communication is donve VIA BluetoothLE Characteristics. The receive and transmit channels are A CHL(RX,20Byte) and B CHL(TX,20Byte). They are UTF-8 encoded streams, split by newlines(?)

There are really 2 classes of command: Execution commands and Information commands.

Execution Commands Start Printing; - Start printing, like pressing the control button when in standby (not printing)

- Start printing, like pressing the control button when in standby (not printing) Stop Printing; - Ends printing. cannot be resumed. Waits to complete current step

- Ends printing. cannot be resumed. Waits to complete current step Pause Printing; - When printing, sets state to paused. (like pressing the control button on the machine.

- When printing, sets state to paused. (like pressing the control button on the machine. Keep Printing; - Resume from paused state

- Resume from paused state Emergency; - Emergency shut off. basically soft resets the printer.

- Emergency shut off. basically soft resets the printer. Clean; - Should be self explanatory, but I don't know what it does.

- Should be self explanatory, but I don't know what it does. Display; - Probably turns on the display.

- Probably turns on the display. Return; - No idea what this one does.

- No idea what this one does. G1 Z[n]; - Move the build platform up or down. [n] can be one of the following: -50, -10, -5, -1, 1, 5, 10, 50

- Move the build platform up or down. [n] can be one of the following: -50, -10, -5, -1, 1, 5, 10, 50 N2 R255; - Turn on the UV LEDs. Do not send this with Resin in the printer as it will likely cure. Information Commands PWD-OK - Part of the odd login handshake

- Part of the odd login handshake scan-file - Retrieves the name of the file queued in the printer

The Handshake

sort of anyway. When you first connect to the printer, it will be broadcasting two messages repeatedly, 'P-[password]' and 'online'. 'online' is sent constantly throughout comms, and is sort of a heartbeat signal. I just ignore it. The correct response to the P- command is to verify the password and respond with PWD-OK

. I just send this if I get a P- message, because if you're already connected to the bluetooth you have already validated that password, but I digress. once the PWD-OK command is sent, you get more info.



At this point, the printer will send a few more messages.

standby_sts - tells you the current state pf the printer. [printing, no sd card, standby, paused, print over, pause over]

pf_ - the name of the currently printing file. if it's on standby this will be blank.

f- - similar to pf_, but sent as the response to scan-file. will have a file name with a .[index] attached, i.e. f-print.fhd.0

F/S=n/n - current / total layers. i.e. F/S=25/259. This only sends when printing

Files

You would think this thing would have the ability to load files over bluetooth, but sadly, no. It can however pick a file on the SD card to print via bluetooth. here's how it works:

send scan-file - this will return a list of files with an id appended

file-[id] - tell the printer which file to use

That's pretty much it, have fun.