Flash hms-mm
Puts mule v1.0.2 and miner v1.0.3 onto their ESP32-C3 boards straight from this page, then sends them your WiFi and SD card details over the same cable. Nothing to install and nothing to build. The two boards version independently, so those numbers can differ.
hms-mm is two boards, not one. The mule joins your home WiFi and serves the files; the miner talks to the ezShare card and the O2Ring. They run different firmware, so flash each one separately below. If you only have one board in front of you, flash it and come back for the other.
1. Which board is plugged in?
Plug in one board at a time, over its native USB port. That is the port the settings step in section 3 talks to, so it is the one to use for both halves of this page.
2. Flash it
This browser cannot talk to serial devices. Open this page in Chrome or Edge on a desktop or laptop. Safari, Firefox and every mobile browser lack the Web Serial API.
This page has to be served over HTTPS to reach a serial port.
Your browser will ask which serial port to use. Pick the one that appears when you plug the board in. Flashing takes about a minute; leave the cable alone until it says it is done. Then swap the cable to the other board, change the choice above, and flash again.
Choose Erase device if the board is new or has run other firmware. Leave it unticked to keep an existing mule's saved WiFi and ezShare settings, which live in a separate flash area and survive a reflash.
3. Send it your settings
With the mule plugged in and flashed, fill this in. It goes down the USB cable into the mule's storage, and the mule passes the SD card credentials on to the miner over their shared link at the next boot. You do not have to join any setup network.
The mule restarts, joins your network, and serves the card's files at
http://cpapdash.local/. Nothing you type here leaves your
machine: it goes over the USB cable and nowhere else.
4. Point hms-cpap at it
On the machine running hms-cpap,
set the mule as the data source in ~/.hms-cpap/config.json. The
mule speaks the ezShare HTTP protocol, so no other change is needed:
"source": "ezshare",
"ezshare_url": "http://cpapdash.local"
If something goes wrong
No port appears when I plug the board in
Usually the cable. Plenty of USB-C cables carry power only, and a board that lights up can still have no data connection. Try a different cable first, and make sure you are in the board's native USB port rather than a separate serial bridge.
The settings step says it cannot find a mule
It sent a hello down the cable and nothing answered. Either the board on the other end is the miner, which does not take settings, or the mule was flashed with mule firmware older than 1.0.1, which has no USB provisioning listener. Reflash the mule from step 2 and try again.
If it is definitely the mule on definitely the current firmware, unplug and replug the board, then press the button again. Chrome hangs on to a port handle across the reset that follows flashing.
I would rather use the setup network
Still there, unchanged. A mule with no stored WiFi comes up as an open
network called MM-Setup-XXXX, where the last four characters
come from its serial. Join it and a setup page opens, or visit
http://192.168.4.1/. It asks for exactly the same four things
this page does.
Flashing fails partway through
Close anything else holding the port (Arduino IDE, a serial monitor, a previous tab of this page) and try again. A failed flash cannot brick the board; the ROM bootloader is in silicon and holding BOOT while tapping RESET always gets you back to download mode.
I would rather build it myself
Everything this page does is in the repository. See Build and flash for the ESP-IDF route.