-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
- 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
- probe-rs and OpenOCD 0.12 or newer
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 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.
Clone this repository and enter it:
git clone https://github.com/naorunaoru/rewair.git
cd rewairDo 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 rewair-sflash-loader.bin from the
latest release, but do
not flash anything yet. Use the loader for the backup:
STUB_IMAGE=/path/to/rewair-sflash-loader.bin \
tools/recovery/backup_stock_emw3165.zsh ../dumps/my-element-stockThe command creates one backup directory containing both flash images and prints their SHA-256 checksums. Keep that directory somewhere safe.
-
From the latest release, download these files into one directory:
rewair-bootloader.binrewair-application.binrewair-sflash.binrewair-sflash-loader.binSHA256SUMS.txt
-
With the CMSIS-DAP probe still connected, install the release using the Step 0 backup directory:
BACKUP_DIR=../dumps/my-element-stock \ scripts/install_release.zsh /path/to/downloaded-release-files
The installer verifies the downloaded checksums, writes the external SPI-flash image, then flashes the bootloader and application. It preserves DCT and saved device configuration.
Do not flash rewair-default-dct.bin during a normal installation. It erases
saved configuration and contains a build-generated MAC address.
For a source build and the exact flash commands, continue to Building and Flashing.
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.
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.