Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Ender 3 V2 with DACAI LCD not working with Landscape #25195

Closed
1 task done
knuxyl opened this issue Jan 6, 2023 · 10 comments · Fixed by MarlinFirmware/Configurations#880
Closed
1 task done

[BUG] Ender 3 V2 with DACAI LCD not working with Landscape #25195

knuxyl opened this issue Jan 6, 2023 · 10 comments · Fixed by MarlinFirmware/Configurations#880

Comments

@knuxyl
Copy link

knuxyl commented Jan 6, 2023

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I bought an Ender 3 V2 with RET6 chip that came with a DACAI LCD screen that I believe is the same one used in the Ender 3 S1. This screen only updates by using private folder. I set define DWIN_MARLINUI_LANDSCAPE and it is still portrait, altough it does look offset on the progress bar.

Portrait mode also results in text being overwritten by other text instead of it being cleared, so eventually it looks like a jumbled mess and unreadable. Creality UI works fine without any issues, excluding lack of support for landscape mode.

This was tested on 2.1.2, 2.1.X, and bugfix-2.1.X

Also, I don't know if it's actually called DACAI or what, I think I read that somewhere.

Bug Timeline

Present since at least 2.1.2

Expected behavior

With Landscape set : Marlin UI to be in landscape mode
With Portrait set : UI to update the text properly by not overlaying on it but instead replacing it.

Actual behavior

With Lanscape set : Marlin UI is in portrait mode with a lot of information cut off horizontally
With Portrait set : Text gets overwritten instead of replaced so eventually 0-9 are all on the same spot and makes it unreadable.

Steps to Reproduce

For Landcsape error : Flash firmware with define DWIN_MARLINUI_LANDSCAPE on Ender 3 V2 with newer DACAI screen.
For Portrait error : Flash firmware with define DWIN_MARLINUI_PORTRAIT on Ender 3 V2 with newer DACAI screen.

Version of Marlin Firmware

bugfix-2.1.X

Printer model

Creality Ender 3 V2

Electronics

Stock 4.2.2 RET6 board

Add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

configuration.zip

@The-EG
Copy link
Contributor

The-EG commented Jan 6, 2023

Take a picture of the back of the LCD board so it can be positively identified.

Unfortunately, it sounds like you have one of the clone LCDs that does not support the rotation function. If that is the case there's not going to be anything that can be done to get it to support landscape mode unless someone figures out how to get it into that mode.
You should complain to Creality for holding a hardware lottery instead of selling consistent products.

@ellensp
Copy link
Contributor

ellensp commented Jan 6, 2023

Also hound Creality to release details on the display! It is complete undocumented.

@vlad-the-compiler
Copy link
Contributor

I have just received the same screen and can confirm your issues. It seems like the DACAI screen doesn't implement the same exact protocol.
Regarding text, right off the bat I can tell you that the DWIN variant uses bitmap fonts, whereas DACAI has a TTF renderer.
It is still unclear to me why the custom UIs work well but the simpler Marlin UI does not.

I'll do some investigation and check back with my findings.

@vlad-the-compiler
Copy link
Contributor

vlad-the-compiler commented Jan 7, 2023

I've done some poking around and compiled a proper private bundle for DACAI screens that will work correctly with MarlinUI.

Please flash your display with the private folder from this:
MarlinFirmware/Configurations#880

Also, I've found a bug in MarlinUI. It's an off-by-one glitch on the border for the X Y Z coordinates on the status screen. It only appears on DACAI screens as DWIN units seem to ignore out-of-bounds coordinates and rectify them to the display viewport. Refer to this PR:
#25206

2 additional notes:

  • Display brightness seems to be on a non-linear curve for DACAI displays, as it only starts falling off under 50 (out of 255); I've checked with Creality's Ender 3 S1 repo (which uses this exact display) and there is no difference in protocol compared to what mainline Marlin adopted, so it appears this is a hardware difference
  • Display rotation does not work indeed; I am not sure if this is due to the lack of the feature in the DACAI unit's firmware itself, or if the opcode is different. Again, the E3S1 repo uses the exact same protocol for rotating the display, yet the command fails on DACAI (but works on DWIN)

It appears that DACAI units are designed to clone the original DWIN controllers - and said cloning is incomplete. It might be that Creality initially adopted the DWIN displays when they wanted to implement a color display interface, but due to the parts shortages (or due to pricing?) they've also looked towards working with other contractors, and the easiest solution was to use display panels that are compatible enough - by that I mean they've only cloned/adapted the functionalities that their firmware uses; yes, DWIN might've had a more robust feature set, but when they used modules from other manufacturers, they've only had them clone the required firmware features that their printers actually use - in this case leaving us with some pretty bad backlight control, and the lack of display rotation.

@vlad-the-compiler
Copy link
Contributor

vlad-the-compiler commented Jan 7, 2023

Also hound Creality to release details on the display! It is complete undocumented.

DWIN-based knob displays are documented. Not only are there tools to recompile asset bundles for them, but the API can be found in the Ender 3 V2 and S1 firmware repos. Marlin used that API in order to adapt the classic UI to those displays.

The undocumented LCDs are the newer S1 Plus and S1 Pro touch displays (which ironically are also in 2 variants, DWIN and DACAI) - we're still waiting on a firmware source code release for these, but you should bear in mind that these units are currently pretty dreadful, offering very limited functionality compared to what you can do with a knob display (be it the E3V2 / S1 color unit or the classic 128x64 displays).

@ben-wallis
Copy link

The undocumented LCDs are the newer S1 Plus and S1 Pro touch displays

Is there not another undocumented LCD, the one requiring the TJC_SET directory on the SD card to flash? I have one of these on a new Ender 3 S1 and as far as I can tell there's no Marlin firmware available for it that maintains the LCD functionality.

@ellensp
Copy link
Contributor

ellensp commented Jan 7, 2023

@ben-wallis there are currently 4 known LCD of that type that look the same on the outside.

The first was DWIN, well known, well documented..
the second was DACAI, an undocumented clone, but there are tools that converts from DWIN files to "private" files for this display.. (but it looks like it doesn't support some DWIN features)
The third is VIEWE, another undocumented clone, no tools.
The forth is TJC using TJC_SET, no documentation and no tools are available.

Here are some images of the 4 boards
https://marlin.crc.id.au/forum/t/identifying-ender-3-v2-screen-versions/960

@EvilGremlin
Copy link
Contributor

What? They use TJC now? TJC have EVERYTHING available! It's probably best documented of them all (if you look at Nextion docs and forums)

@vlad-the-compiler
Copy link
Contributor

vlad-the-compiler commented Jan 7, 2023

@ben-wallis @ellensp I stand corrected, I did not know there are other compatible units other than DACAI.

Regarding VIEWE, from what I can see on the board, that looks like an STM32 clone - since the DWIN units are also seemingly based on STM32 (clones?), I wonder if those provide a 1:1 emulation of the original DWINs. Is there any firmware package available from Creality for those? I wouldn't be surprised if they used the same DWIN_SET.
Later edit: Yes, there are firmware packages from Creality for SYNWIT MCU-based displays, and they use raw firmware and SPI flash images, Firmware.bin for the microcontroller and FlashBin for the SPI flash. I was unable to determine what format the SPI flash image is in, and a string dump from Firmware.bin yielded no references to any non-volatile storage libraries apart from FatFS, which seems to be used for the SD card bootloader only, not the onboard flash.

And yes, as @EvilGremlin said, TJC have readily available tools, they're the manufacturers of the Nextion line of displays - they won't admit it, but disassembling their binaries and looking at their releases points to exactly that. Nextion is just the EU/US market-facing entity with a 200% markup.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.