Skip to content

Getting Started

Roman Kuraev edited this page Jul 10, 2026 · 5 revisions

Getting Started

What you need

  • An original Awair Element
  • A CMSIS-DAP probe, such as a Raspberry Pi Pico running picoprobe
  • Access to the test points on the back of the EMW3165 module

The probe is required for the initial installation and low-level recovery. For a closer look at the device itself, see Hardware Architecture.

Connect the probe

Connect the probe to the test points on the opposite side of the EMW3165 module:

  • TP80 / TP81: SWD, required for flashing and recovery
  • TP103 / TP104: debug UART, optional

Verify the pin direction and voltage before powering the target. The core workflow does not require the debug UART.

Step 0: back up the original firmware

Do this before flashing anything. Rewair does not distribute the stock firmware. Without a dump from your own device, you cannot restore it to stock. The stock system needs both F411 internal flash and the external SPI flash.

Download and extract a bundle from the Releases page, but do not flash it yet. Use its SPI-flash loader for the backup:

STUB_IMAGE=/path/to/rewair-sflash-loader.bin \
  tools/recovery/backup_stock_emw3165.zsh ../dumps/my-element-stock

The command creates one backup directory containing both flash images and prints their SHA-256 checksums. Keep that directory somewhere safe.

Install a precompiled release

Version tags publish complete firmware bundles on the Releases page. A bundle contains the STM32 bootloader and application, the external-flash lookup table and BCM43362A2 WLAN firmware, the SRAM SPI-flash loader, SHA-256 checksums, and manifest.json.

The normal installation preserves DCT and saved configuration. The separate rewair-default-dct.bin recovery asset erases saved configuration and includes a build-generated MAC address. Never install one unchanged DCT image on multiple devices.

For a source build and the exact flash commands, continue to Building and Flashing.

First boot

If no Wi-Fi credentials are saved, Rewair starts an open setup network named rewair-setup-<xxxx>, where <xxxx> is derived from the final two bytes of the Wi-Fi MAC address. Join it and open http://192.168.0.1/. The captive portal should normally open automatically.

Select a network and save its credentials. Rewair stores the network and switches from access-point mode to station mode. Once joined, open the device's LAN address to use the same portal.

See Networking and MQTT for fallback behavior and Home Assistant setup.

Recovering a device

If an experimental flash no longer boots, use your Step 0 dump with the scripts in tools/recovery. If you skipped Step 0, Rewair cannot supply the missing stock firmware. Low-level SPI-flash details are covered in SPI Flash and Recovery.

Clone this wiki locally