makerbase-mks / MKS-TinyBee

MKS TinyBee is a mainboard for 3d printing, based on ESP32 module
GNU General Public License v3.0
116 stars 115 forks source link

Wifi Support on Marlin bugfix 2.1.x #100

Closed JazzinSA closed 1 year ago

JazzinSA commented 1 year ago

I finally sorted out all warnings and errors when compiling by using Marlin Bugfix 2.1.x for the TinyBee. This is the first version of Marlin that I managed to compile without a single error or warning. I've been having issues with Marlin on this motherboard from the start so I was quite happy to see that it compiles without errors. (#define CONFIGURATION_H_VERSION 02010300) However when I got to the WiFi section, unfortunately there are a new headache now with the WiFi UI.

The older version of marlin configured Wifi by simply enabling the WiFi in the adv config file, yet on the new bugfix V2.1.x the WebUI does not appear when I connect to the printer.

The old code looked like this: /**

WiFi Support (Espressif ESP32 WiFi) */ //#define WIFISUPPORT // Marlin embedded WiFi managenent

define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)

if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT)

define WEBSUPPORT // Start a webserver (which may include auto-discovery)

define OTASUPPORT // Support over-the-air firmware updates

define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host

Which means once I enabled ESP3D_WIFISUPPORT the websupport OTA support could also be enabled. However the new Bugfix 2.1.x Looks different:

/**

Native ESP32 board with WiFi or add-on ESP32 WiFi-101 module */ //#define WIFISUPPORT // Marlin embedded WiFi management. Not needed for simple WiFi serial port.

define ESP3D_WIFISUPPORT // ESP3D Library WiFi management (https://github.com/luc-github/ESP3DLib)

/**

Extras for an ESP32-based motherboard with WIFISUPPORT These options don't apply to add-on WiFi modules based on ESP32 WiFi101. */

if ENABLED(WIFISUPPORT)

define WEBSUPPORT // Start a webserver (which may include auto-discovery) using SPIFFS

define OTASUPPORT // Support over-the-air firmware updates

define WIFI_CUSTOM_COMMAND // Accept feature config commands (e.g., WiFi ESP3D) from the host

The result is that WEBSUPPORT and OTASUPPORT never gets enabled. And thus when I connect the web interface is missing.

Because the if statement does not include the ESP3D_WIFISUPPORT like in the older version WEBSUPPORT and OTASUPORT is not enabled. I can't find any other places to enable the ESP3D. Any help will be appreciated greatly.

JazzinSA commented 1 year ago

Issue solved..(hopefully) Had the wrong version of Marlin 2.1.x. Thanks Luc for the help. There are some warnings in the compile, but I will try and solve them myself. Its quite a compile, It feels like I've just recompiled Windows ;-)