Wifi Printing

A project log for Monoprice Mini Marlin 2.0 Support

Getting Marlin to run on the Monoprice Mini/Malyan M200.

J.C. NelsonJ.C. Nelson 04/26/2019 at 19:590 Comments

The MalyanM200/Monoprice Mini has an interesting feature in that it supports wifi printing - the ability to connect Cura or something similar via wifi and print directly that way. This is accomplished via  combination of features, starting with the ESP8266 which drives the LCD. By default the ESP bridges telnet to serial.

The Malyan firmware also supports a sort of dual host support, in which bytes with the high bit set from the UI are UI commands, and bytes with the high bit off are channeled commands.

Marlin 2.x has multihost support in which you can have multiple serial outputs, but what is missing is a simple bit of glue: A ring buffer Serial implementation which can be fed the channel bytes, while the UI code consumes the encoded ones. Fortunately, both the ESP and Linux HALs have a sort of fake Serial, which I quickly adapted to MemorySerial, and plugged into the LCD code.  There's a new feature in configuration.h, WIFI_PRINTING, which enables this. 

I'll be testing this once I can get my mini joined to the WIFI network. Malyan's firmware supports custom GCODE commands to set the SSID and password. Marlin does not. I'll need to figure out a way to get it set up.

The last missing chunk only really works on Windows. MalyanLink uses the opensource Com0Com virtual com port driver to link a host and port to a virtual com port. I'm not sure what I'll use, yet, since OSX doesn't let me symlink using netcat to create a virtual modem.