This is a big one. Over the last weeks I worked my way through the whole chain from access point to tag, including the radio firmware on the ESP32-C6/H2, which hadn't been touched in a long time. The radio now sends the image data on time and complete, and in my measurements that gives tags 15 to 30% more battery life, depending on how often they get a new image. Along the way I fixed a number of things that could make the AP reboot at random, and if it does crash, the log now shows where. If the radio doesn't come online, the AP can now check the wiring itself and tell you what's wrong. The home tab became a dashboard, rendering is a lot faster, and quite a few long-standing issues are closed. Please update the radio as well; that's where most of the battery gain comes from.
Upgrade notes
- Update the AP as usual on the update page, and then also flash the ESP32-C6 or H2 from the same page (radio firmware version 0021). Old and new firmware on either side still work together, but most of the improvements are in the radio firmware.
- The default fonts now ship as
.vlw.gz, 29 KB instead of 259 KB. After updating, you can delete the old.vlwfiles from/fontsto free the space; as long as they're there, they are used instead. - If you use one of the corrected timezones (Jerusalem, Brazil, Mongolia, Australia, New Zealand, US), select it again in the AP settings.
- The AP now uses a single NTP server: the one your DHCP server hands out, otherwise
time.cloudflare.com. - Some parts I couldn't test myself, because I don't have the hardware: a C6/H2 with a sub-GHz (CC1101) radio, the 4" AP, and the H2 update on the LilyGo T-Panel. Please let me know if something doesn't work there.
Changelog
Tag battery life and the radio (ESP32-C6/H2 firmware 0021)
- Every full 4 KB block arrived without its first part, so the tag had to ask for it again. The radio copied the next frame into the transmit buffer while the previous one was still being sent.
- Block data was sent about 70 ms after the moment promised to the tag, because the radio only woke up for radio packets. It now also wakes up for serial data and timers, and only starts sending when the complete block has arrived with a correct checksum.
- Requested parts are repeated at most twice instead of filling up to 42 frames: about half the airtime for the same images, which leaves more room for other tags.
- Measured on a 2.9" tag: an image transfer costs 35% less charge, a check-in without new data 15% less. That's roughly 13% (no updates) to 32% (an update every 15 minutes) more battery life.
- Tag requests that waited too long to be answered in time are skipped; sub-GHz requests are no longer skipped because of 802.15.4 timing.
- Changing the channel no longer re-initialises the radio (it was deaf for about 400 ms).
- Built in DIO flash mode, so C6 modules with flash that can't do QIO boot again (#596).
Serial link between the S3 and the radio
- Block hand-overs to the radio no longer fail. The S3 gave up waiting for the radio's acknowledgement after 200 ms while the radio was busy sending, and the radio then took the next commands as image data.
- The channel/power command now gets the right size for the radio type, so changing the channel works on builds without sub-GHz support (#427).
- No more debug text from the radio between the real messages; a 4 KB receive buffer, and incomplete or oversized messages are dropped.
- Radio wiring self-test: when the radio doesn't come online, the AP checks each line and tells you what's wrong, for example "TX and RX swapped". There's also a button for it on the update page.
Stability
- Fixed a series of likely causes of random reboots (#586): the tag database and the pending queue were used from several tasks without locking, the file system lock was held for seconds while the web server waited for it, and some buffers could be freed twice or read after being freed.
- After a crash, the AP writes the crashing task and backtrace to
log.txt, and the core dump can be downloaded on/coredump. /imguploadkeeps the image in memory instead of writing it to flash in the web server task, which stalled the web interface under load. Uploads are refused when the file system is almost full (a full file system crashed the AP), and partial files of aborted uploads are removed.- Large uploads in the file editor (
/edit) crashed the AP; they now go through the same path as the other uploads. - An empty text, or only spaces, in a TrueType font crashed the AP (#429). Invalid UTF-8, very long texts and line feeds could hang content generation.
- Fixed several memory leaks.
Image delivery and scheduling
- A newer image now replaces an older one that is still waiting for the tag, instead of the tag showing both in a row. This also stops
.pendingfiles from piling up until the file system is full, which caused boot loops (#573). - Expected check-in times were sometimes wrong (#466): updates were delayed, while the tag kept checking in every 40 seconds. The AP now uses what the radio actually told the tag (also #434).
- Force refresh and tag reboots after
/imguploadfailed with "Not found"; the AP now resends the last image (#567). - A repeated "xfer complete" made the AP send the same image again (#462).
- Failed content downloads, and the reason content is more than 15 minutes overdue, are written to the log (#579).
Home tab and web interface
- New dashboard on the home tab: AP and radio status, tag counts that open the filtered tag list, tags that need attention (timeouts, overdue content, low battery, weak signal), the latest previews, upcoming updates, memory and file system use, the last restart and its reason, and the last log lines.
- The update procedure no longer gets stuck halfway when a file fails to download; the firmware is only flashed after the file system update succeeded. A firmware update from a slow server no longer fails with "Wrong Magic Byte".
- Dark mode improvements, also in the file editor.
- "Set Tag Config" has a minimum check-in time (#467).
- Timezones fixed: Jerusalem (#511) and outdated daylight saving rules for several countries.
- A short WiFi outage no longer takes the AP offline for 5 minutes.
- NTP (#167): one NTP server, taken from DHCP when available. Without internet access, the three servers made the AP flood the local DNS server.
Content and rendering
- Rendering is up to four times faster. A 7.5" forecast went from 12.6 to 3.1 seconds, the "Today" screen from 7.4 to 1.4 seconds, the Spectra calendar from 22.5 to about 10 seconds.
- TrueType text looks smoother, and text boxes in JSON templates can use TrueType fonts too, with a font size.
- Chinese and Japanese text (#458): characters overlapped because the advance widths were read from the wrong place.
- Gzipped fonts (#464): upload
name.vlw.gzinstead ofname.vlw, templates don't change. Thanks @olanwe, the decompression is based on your code. - Sunrise, sunset and moon phase in the date view are now calculated on the AP itself, instead of with an external API that stopped working.
- Google Calendar: configurable period, by @MagnusErler (#482).
- Day-ahead prices: the graph fills its area, the cheapest block per day is marked, and with a gap in the price data the previous image is kept instead of showing "nan". The price service now uses Nord Pool first, with ENTSO-E as fallback (#559).
- A missing template is reported as such instead of "json error" (#618).
Other
- New tag type M3 3.5" BWRY (
92.json), by @skiphansen. Adjusted font sizes for tag type D0, by @atc1441. - H2 updates on the LilyGo T-Panel fetched the C6 firmware (#621).
- New firmware hash for the ST-GR2900N, by @hellma314 (#515).
- Virtual tags for testing without hardware:
miscellaneous/virtual_tags/simulates tags as a second AP (an alternative to #590). - Library versions are pinned, and the C6/H2 firmware is built with ESP-IDF 5.5.5, for reproducible builds.
Full Changelog: 2.92...2.95