I bought a FlyingBear Ghost 5 with an integrated WiFi module, but I discovered no web interface. I don’t know why they can’t add a basic user interface. Then I went to see the web interface of the high-end Makerbase cards and realized that it was better they didn’t develop it.
My solution was to modify the firmware to support the Web Socket and develop the Web interface. This feature is compatible with all Makerbase cards with an MKS WiFi module.
The result of the BeePrint Web interface is in this screenshot.
I also decided to explain all the development phases of the project. In this article, I would like to expose the hardware infrastructure of the MKS WiFi card that interfaces with the Makerbase Robin Nano.
Here I’d like to explain the MKS WiFi module, how to program and connect a device that can be used as a WiFi module alternative.
How to program It from scratch
You can find the source code on the Makerbase GitHub repository, but remember that they don’t update the esp8266 core, so you must use the 2.4.2 version, you can refer to my version for the same code ported to 2.7.4; on master, you can find the latest version with data folder and Web UI.
esp12
The connection schema is the same as the article “esp12 esp07 (esp8266): flash, pinout, specs, and Arduino IDE configuration”, I insert It here, but to understand better the wiring refers to the article.
I used the 3D printed adapter and the relative programming board posted in the previous article to do the first test.
But you can print the adapter and use a breadboard
Socket for esp12 and esp07 with V base
Here is the adapter on a breadboard.
The programming parameter on your Arduino IDE for esp12 are
- Board: NodeMCU 1.0 (ESP-12E Module)
- Builtin Led: 2
- Upload Speed: 921600 (115200 is more secure)
- CPU Frequency: “160MHz” (80MHZ is more secure)
- Flash Size: 4MB
- SPIFFS: 3Mb
But you can use a regular NodeMCU board as MKS WiFi.
Program MKS WiFi module without OTA
The MKS WiFi module is more simple to connect and program from scratch. To explain better, I reproduce the PCB.
MKS WiFi module PCB
The board is quite simple to create.
You can directly order 10 pcb for 5$ here on PCBWay
Here the esp12 and esp07 that you can use with Aliexpress esp-12 - Aliexpress esp-07
So the position of the pin is linear, and the connection schema becomes very simple.
This is the GPIO mode to manage the board status.
Mode | GPIO15 | GPIO0 | GPIO2 |
---|---|---|---|
UART | Low | Low | High |
Flash Boot | Low | High | High |
And you must do this operation to enter in program mode:
- Hold down the FLASH button;
- Press and release the RST button;
- Release FLASH button.
When I compile the project first time, my libraries version are
- ArduinoJson@6.18.4
- ESP8266WiFi@1.0
- ESP8266mDNS@1.2
- EEPROM@1.0
- ESP8266HTTPClient@1.2
Upload Filesystem
If you select the latest version, you also need to upload the filesystem with the BeePrint interface.
You can upload filesystem data with the classic method via the plugin. Refer to the relative tutorial WeMos D1 mini (esp8266), integrated SPIFFS Filesystem.
Check if data
the directory exists in the sketch folder (with some files), and the plugin is used to upload.
NodeMCU
With NodeMCU, It’s all more simple. If the upload process does not start, disconnect the esp from the MKS Robin board temporarily.
You can find v2 and v3 version of NodeMCU here on WeMos D1 mini - NodeMCU V2 V2.1 V3 - esp01 - esp01 programmer
For the parameter check, the previous paragraph is the same as esp12.
Use OTA web page to upload the original firmware
An alternative method is to generate a bin file; first, open your source code on your Arduino IDE, compile It to check errors, and select. Sketch -> Export compiled Binary
,
then by click on Sketch -> Show Sketch Folder
you can find bin
file. Here “esp8266: flash compiled and signed firmware (.bin)” you can get more information about compiled firmware.
Now we can use the web page that you can find to the root of the IP assigned to MKS WiFi.
Remember the files name must be:
- MksWifi.bin: for firmware;
- MksWifi_WebView.bin: for filesystem.
Thanks
- MKS WIFI for Makerbase Robin: boards and how to wiring esp12 & NodeMCU
- MKS WIFI for Makerbase Robin: PCB and how to compile & upload firmware
- MKS WIFI for Makerbase Robin: communication protocol and Cura plugin
- MKS WIFI for Makerbase Robin: firmware upgrade and new Web Socket features
- MKS WIFI for Makerbase Robin: BeePrint web interface with Camera on Flying Bear Ghost