How the P4 brings its WiFi co-processor up to date — from its own flash, with an SD override.
The ESP32-P4 has no radio of its own — WiFi runs on a companion ESP32-C6 co-processor. To load disks over the air, that C6 has to be on firmware 2.12.13. Rather than make you build ESP-IDF or fumble with a second flasher, the GTi patches the C6 itself, from inside the GTi. Here's the whole path:
The version gate
On boot the P4 reads the C6's version. 2.12.13 or newer → it does nothing. Anything older → it offers the update. A true three-field compare, so a 2.12.0 is correctly seen as behind.
Embedded by default
The ~1.2 MB C6 image is baked into a dedicated c6fw flash partition. The board self-updates from its own flash — no file to copy, no SD needed.
SD override
Drop a c6_network_adapter_*.bin on the SD root and it wins over the embedded copy — the escape hatch for a future C6 bump without re-flashing the whole board.
Can't brick it
The update writes the C6's inactive OTA slot, then activates it. Pull the power mid-flash and the old C6 still boots — you're simply offered the update again next time.
Where c6fw lives — the P4's 16 MB flash
0xEB0000 — no user data touched.Two ways a board gets provisioned
Web-flash (full image). Flashing the whole firmware over USB — from the web flasher or esptool — writes the partition table and the C6 image into c6fw. This is the board that self-updates the C6 from its own flash, with nothing on the SD card.
SD update (.bin to the card). The in-firmware FW-UPDATE path refreshes the app only — it doesn't rewrite the partition table, so those boards have no c6fw and simply fall back to the SD-override file. Both routes end up in the same place; they just source the image differently.
Under the hood
The image streams to the C6 over the esp-hosted SDIO link in 1400-byte chunks (esp_hosted_slave_ota_begin / write / end / activate) with a progress bar on the panel, then the P4 reboots so the host re-links to the freshly-updated radio. The whole chain — SDIO link → C6 → WiFi stack — comes up live: it scans, joins, and opens a TCP socket to a dongle. Lives in Gotek_P4.ino → c6SelfUpdate(); the c6fw partition is baked into the published firmware by bake_c6.py.
Manual C6 update — download
Most boards never need this: a web-flashed P4 already carries the C6 image in its own flash and offers the update at first boot. Use this only if the C6 is stale — WiFi crashes, or SCAN never finds a dongle — and the update screen isn't appearing on its own.
- Download: c6_network_adapter_2.12.13.bin (~1.2 MB).
- Copy it to the root of the SD card, exactly as named.
- Insert the card and power the P4. If the C6 is behind, the amber “WiFi CO-PROCESSOR UPDATE — TAP to update” screen appears (25 s to skip).
- Tap the screen. Let the progress bar reach 100 % — do not power off. It activates and reboots.
- Done. The radio should now scan and fling. An interrupted flash just boots the old C6 — no brick.