Kicking around some ideas on how to handle the not-even-really-new-anymore Nextion firmware releases that bring AA fonts to the table.
One year ago I posted some details about the 0.55 (TJC-only) release and the nice anti-aliased and proportional font support that came with it. The problem at that time was the HASP project was just a little too big to fit into memory with that new release. Removing page 9 with the graph component and replacing it with a page suitable for climate controls appeared to be a working solution.
Since then, TJC has released a string of updates and Nextion has finally followed suit. The current 0.59 release not only supports AA fonts, but also UTF-8 encoded fonts. During this time, the new font format has been pretty well reverse-engineered allowing some advanced capability beyond what the native TJC/Nextion tools provide. One such capability is extending a font to include icon sets, which means we can now mix characters and icons in a single text field. I can see this being crazy handy and I’ve created several such fonts with the Font Awesome icon set included.
However, there’s once again a memory problem. With the releases supporting UTF-8, replacing page 9 isn’t clearing up nearly enough memory. Simply deleting pages only works if I delete pages 6-9, leaving a lot of handy page layouts being cut from the project which seems like it’s too much.
The major component left in the project which is consuming a lot of RAM is the QR code on page 0. Removing that one element allows me to include extended font sets, the page 9 climate controls, and everything else we have in the existing project. The QR code is notionally only used once during initial setup, and even then it’s kind of redundant as the pertinent info is already on the screen for the user to type into a phone or laptop. The QR just makes it easy to connect to the WiFi AP to handle the first-time config.
So, one option is to nuke the QR code and leave everything else the same.
Another option is to make the first-time setup slightly less secure. Currently, the HASP generates an SSID and password based on the ESP8266’s MAC address. This isn’t really secure as that MAC address is broadcast to anyone listening, and the algorithm by which the SSID/password is generated isn’t even trying to be secure (and is also open source so it wouldn’t matter if it was, as the seed is broadcast). So, given that this fake security doesn’t seem to benefit anyone, another solution would be to change the ESP8266 code to use the same SSID and password every time, then generate a QR code as a static image, then include that image in the project on page 0. This frees up memory, allows for the first-time setup to work as normal, while slightly reducing security (although not really), and also removing the ability to use the QR code component for other use cases. I’m not sure if anyone is really using that feature outside of first-time setup.
I’m kinda just typing this out to collect my own thoughts on the matter, but now that I’ve done so… Still not sure what to do.
Anyone have any thoughts on this to share?