-
Notifications
You must be signed in to change notification settings - Fork 7
First Boot
What happens — on the hub and the transmitter — between "power applied" and "tank levels showing up in the app."
The hub is USB-C-powered; the moment it gets 5 V, the firmware starts.
- ESP32 boots, mounts NVS, checks for stored Wi-Fi credentials.
- OLED splash:
TankSync · v2.8.x · loading… - I²C scan — must find the SH1106 OLED at
0x3C. If absent, the display stays blank but the hub still runs. - UART probe — sends
AT\r\nat 115200 baud to the RYLR998. Must receive+OK\r\nwithin 1.5 s. -
If no Wi-Fi creds stored → goes into setup mode (AP
TankSync-Setup-XXXX). - If Wi-Fi creds stored → tries to join; on success connects to the configured MQTT broker.
- OLED switches to the standard 3-screen carousel (Tanks / Health / System) and the hub starts publishing.
The hub's OLED shows the AP name and the IP 192.168.4.1. The LED strip (if attached) pulses orange.
TankSync
Setup mode
SSID: TankSync-Setup-XXXX
PWD: on OLED below
IP: 192.168.4.1
Connect to that network from your phone; a captive portal opens. See Quick Start step 3.
- Hold the BOOT button on the hub for 5 seconds.
- Or visit
http://<hub IP>/factory-reset(will require confirm).
The TX is battery + solar powered. When the power switch closes (or you plug the 18650 in), the firmware starts.
- ESP32-C3 boots from deep-sleep wake reason (or hard power-on).
- WS2812 blinks blue for ~500 ms — "I'm alive."
- UART probe to the RYLR998 (same
AT\r\nhandshake as the hub). - I²C scan at
0x40— if INA219 found, switches to Variant B (current + voltage telemetry). If absent, uses the GPIO 0 voltage divider (Variant A). - If unpaired — WS2812 pulses cyan every 5 s, indicating "looking for hub." Stays awake; doesn't sleep.
- If paired — wakes, samples the sensor, transmits, waits for ACK, sleeps for the configured interval (default 5 minutes).
- With the hub already on and in normal mode, hold the TX BOOT button 5 seconds.
- WS2812 turns solid cyan, then transmits a pairing beacon.
- Hub responds; LED turns solid green for 2 s = success.
- Hub OLED briefly shows
paired tank: <name>; PWA / web UI updates.
If the cyan pulse continues for more than 30 s, the TX is not receiving the hub's beacon. See Troubleshooting → Pairing.
In normal operation the TX is only awake for ~250 ms per cycle:
- Take 5 ultrasonic samples (5 ms each) → median = level.
- Read INA219 (or ADC).
- Build a TANK packet → transmit → wait up to 3 s for ACK → up to 3 retries.
- Go back to deep sleep for
SLEEP_INTERVAL_S(default 300 s).
Average current draw is around 1.5 mA with the standard configuration → typical 18650 lasts months without solar, indefinitely with the panel.
After first boot, you can confirm what's running:
-
Hub OLED — System screen shows
RX v2.8.xand the build short SHA. -
Hub web UI — Footer shows
Receiver firmware vX.Y.Zon every page. -
Hub MQTT — publishes
firmware_versionfield in retained/hub/statustopic. -
TX — publishes
tx_versionin every TANK packet → hub forwards to MQTT → visible in PWADevicesandFirmware updatespages.
If the version doesn't match what you flashed, see Firmware Versions — there's a known historical gotcha with version stamping that was fixed in rx-v2.8.5.
Start here
Build it
Flash it
Use it
Reference