Wi-Fi and the clock#
Wi-Fi does one thing on both boards: while the car is parked on a known network, the board asks one HTTPS time server for the time. It checks the server’s certificate, sends nothing else and listens on no port. You can compile Wi-Fi out with OCM_WIFI_CLOCK_SYNC.
On the ESP32-S3 you add networks in the desktop app. On the ESP-Mosaico you can also search for a network and join it from the touch screen. See the manual chapters for the S3 and OpenCarMind EdgeOS 2.1.0.
Saved networks#
Wi-Fi sets the clock and, once the board is paired with the desktop app, carries new drive data to it. The desktop app can write these files for you. To do it by hand, put a file called wifi.csv in /sdcard/obd/ with one network per line:
My Home Wifi,my-wifi-password
-Old Network Name
A line that starts with a minus sign forgets that network. The board imports the file at boot and then deletes it. It keeps up to 8 networks in flash (NVS), and the passwords are stored there in plain text. The ESP32-S3 has a 2.4 GHz radio only. If no network is known, the board writes wifi.example.csv as a template, and Wi-Fi stays off.
The board connects only while parked. It scans, connects, reads the time, stays connected for 30 seconds, disconnects, and tries again every 6 hours. Until the clock has been set it scans every 20 seconds. Once paired with the desktop app, it stays connected while parked and looks for the network again 20 seconds after losing it. It never scans or connects while the OBD link is up. All of these times are settings in the Wi-Fi clock sync menu.
The clock#
The board has no battery for its clock. Every save writes the time to /sdcard/obd/clock.txt. After a power cut the clock resumes from that file, behind by the time the car was off, and the screen shows it in amber until the next Wi-Fi sync corrects it. Each session JSON says where its time came from in the clock field: https (set over Wi-Fi from the time server; sntp in versions before 2.5.0), rtc (kept through a reset), resumed (from the card, an estimate) or unset. Rows also carry uptime_ms, and time_sync in the JSON maps uptime to real time, so a session can be re-timed once the clock was corrected.
Clock, brightness and theme on the ESP-Mosaico#
The board has no battery-backed clock chip. The clock comes from Wi-Fi (an HTTPS time server), or you set it by hand in Settings > Set clock, and the chip’s RTC keeps it through a soft reset. The Settings clock line says where the time came from: “Not set”, “Estimated, not synced”, “Set by hand” or “From Wi-Fi”. The board saves the last known time to a file at most once a minute (on the NAND when it is mounted), so after a power cut it starts from that time and Wi-Fi corrects it later.
Brightness is a slider in Settings. The panel’s brightness is a command to the AMOLED, not a backlight.
The theme is Auto (light by day, dark at night once the clock is known), Light or Dark, and it covers every app. On an AMOLED every lit pixel draws current and black pixels almost none, so Light costs more battery than Dark at the same brightness. How much has not been measured yet. Every text and ground pair in both palettes is checked by a host test for at least 4.5:1 contrast (graphics 3:1). The worst text pair is 4.58:1.
Screen off after a set time turns the panel’s display off without its sleep mode. With the sleep mode, every one of 4 wakes stopped the touch controller from answering about 5 seconds later. Without it, 20 of 20 wakes were clean. If the touch controller ever stops answering anyway, the board opens it again after 30 bad reads, which took about 1 second each time it happened on the bench.
On the ESP-Mosaico, OpenCarMind EdgeOS 2.1.0 also refuses a Wi-Fi time that jumps more than 24 hours ahead or 10 minutes back. See Pairing safety.