diff --git a/content/core/firmware-updates/index.mdx b/content/core/firmware-updates/index.mdx index f096f60..7f4835b 100644 --- a/content/core/firmware-updates/index.mdx +++ b/content/core/firmware-updates/index.mdx @@ -14,6 +14,22 @@ sleepypod runs as userspace software on top of the Pod's underlying embedded Lin While sleepypod Core updates itself with `sp-update`, the underlying stock firmware daemons and microcontroller binaries are not updated by sleepypod. Usually you do not need to touch stock firmware. However, there are scenarios where updating the stock subsystems is necessary. +## Stock updates are off + +sleepypod turns off Eight Sleep's automatic firmware updater (`swupdate`) and its connectivity watchdog (`defibrillator`, `eight-kernel`) on every install and update, unless you've chosen to allow firmware updates (below). A stock over-the-air update replaces the whole operating system. Newer Eight Sleep firmware may also remove root access, which would remove sleepypod and leave no way to reinstall it. The watchdog can repeatedly reboot a Pod that can't reach the internet, which is the normal state once internet access is blocked. + +Firmware updates are a deliberate choice, never something that happens in the background. Check or change the setting over [SSH](/core/root-access/): + +```bash +sudo /home/dac/sleepypod-core/scripts/internet-control firmware-updates status # "blocked" by default +sudo /home/dac/sleepypod-core/scripts/internet-control firmware-updates allow # turn the stock updater and watchdog back on +sudo /home/dac/sleepypod-core/scripts/internet-control firmware-updates block # turn it off again +``` + +**allow** also starts the watchdog (`defibrillator`). If internet access is blocked, it reboots the Pod about every five minutes, so allow internet access first, or run **block** once the update finishes. `eight-kernel` stays off either way. + +sleepypod remembers an explicit **allow** and doesn't turn the updater off again on later updates. Before allowing it, read [Return to stock with official OTA](/core/firmware-updates/factory-reset/): root access after an official update is not guaranteed. + ## When an update is needed - **Cross-generation hardware pairings:** For example, pairing a Pod 3 hub with a Pod 4 cover (`pn 20600-0001-I12`, hardware `0812`). Stock Pod 3 firmware only supports older STM32F0/F1 cover microcontrollers (`0x08005000` flash base). The Pod 4 cover uses an STM32G0 microcontroller with bootloader `v2.0.3.0` (`0x08008000` flash base). Older firmware repeatedly sends a jump command to the wrong address, putting the cover into an infinite reboot loop (`BL: Likely wrong Firmware address 8005000`). Updating to STM32G0 cover firmware (`v5.5.9` or `v5.5.22.0`) allows the cover to boot and stream biometrics. @@ -57,3 +73,7 @@ Choose by **hub platform and revision, then cover generation**. A Pod model name - [Roll back subsystem files](/core/firmware-updates/rollback/): restore the saved daemon, configuration, and payload files. - [Synchronize Slot B](/core/firmware-updates/backup-slot/): optional maintenance for the verified eMMC layout only. - [Return to stock with official OTA](/core/firmware-updates/factory-reset/): factory reset limitations and loss of root access. + +--- + +**Source reference:** [Firmware updates switch](https://github.com/sleepypod/core/blob/29afbb74/scripts/internet-control) · [Masked stock services](https://github.com/sleepypod/core/blob/29afbb74/scripts/lib/telemetry-helpers) · [Startup repair](https://github.com/sleepypod/core/blob/29afbb74/scripts/bin/sp-maintenance) diff --git a/content/core/root-access.mdx b/content/core/root-access.mdx index 0367e46..29aed54 100644 --- a/content/core/root-access.mdx +++ b/content/core/root-access.mdx @@ -226,7 +226,7 @@ systemctl disable --now swupdate-progress swupdate swupdate.socket defibrillator systemctl mask swupdate-progress swupdate swupdate.socket defibrillator eight-kernel ``` -Some firmware revisions lack some of these units; distinguish “unit not found” from a failure to stop an installed unit. Keep a record of what was enabled before changing it. This opts out of the vendor's automatic update path. The upstream free-sleep takeover also disables additional runtime services; do not apply its entire service list blindly to a sleepypod installation, which still needs the firmware hardware-control process. +Some firmware revisions lack some of these units; distinguish “unit not found” from a failure to stop an installed unit. Keep a record of what was enabled before changing it. This opts out of the vendor's automatic update path. Do this before the Pod first goes online: once sleepypod is installed, its installer and every later update mask these units too, unless you later allow firmware updates. See [Firmware updates](/core/firmware-updates/#stock-updates-are-off) to opt back in. The upstream free-sleep takeover also disables additional runtime services; do not apply its entire service list blindly to a sleepypod installation, which still needs the firmware hardware-control process. ## 8. Join Wi-Fi and install sleepypod diff --git a/content/core/settings/network.mdx b/content/core/settings/network.mdx index b4496fe..c561a39 100644 --- a/content/core/settings/network.mdx +++ b/content/core/settings/network.mdx @@ -3,6 +3,8 @@ title: 'Network' description: 'Choose whether the Pod can reach the internet or stays on your local network only.' --- +import { Callout } from 'nextra/components' + # Network **Settings → Network** controls whether the Pod can reach the internet. **Local only** blocks internet traffic with firewall rules and keeps local traffic working, so the app, the iOS app, the Dial, HomeKit, MQTT, and backups on your network continue to work. @@ -43,26 +45,42 @@ All other outbound traffic is dropped. Turning internet access off in Settings a ### 2. Blocked Eight Sleep domains -Whether internet access is allowed or not, the Pod treats Eight Sleep's domain names as unreachable. +Whether internet access is allowed or not, the Pod treats Eight Sleep's domain names as if they don't exist. + +On Pods that include `dnsmasq`, a small DNS resolver on the Pod answers every `8slp.net` name, plus Eight Sleep's log endpoint `kinesis.us-east-1.amazonaws.com`, with "no such domain" (`NXDOMAIN`). Lookups for anything else are forwarded to your router as usual. If that resolver stops, the Pod switches straight back to your router's DNS, so a failure never leaves the Pod unable to look up names. Pods without `dnsmasq`, or where the resolver can't start because another service already uses port 53, rely on the firewall alone. `internet-control status` (see [Check the firewall on your Pod](#check-the-firewall-on-your-pod)) shows which layer is active. + +This layer keeps the stock firmware from uploading data while internet access is allowed. + + + Never point Eight Sleep names at `0.0.0.0` or another address in `/etc/hosts`. On Linux, `0.0.0.0` + reaches the Pod itself. Some Pod firmware then connects to its own port, fails, and retries every + few milliseconds, filling the log and memory until the web interface stops responding and the red + light turns on. sleepypod 3.6.0 and 3.6.1 added such entries to `/etc/hosts`, and their DNS layer + answered `0.0.0.0` too; 3.6.2 and later remove both. If your Pod is affected, run `sudo + /home/dac/sleepypod-core/scripts/internet-control hosts-unblock` and `sudo + /home/dac/sleepypod-core/scripts/internet-control dns-unblock`, keep internet access blocked, and + update. `hosts-unblock` only removes sleepypod's own entries: check `grep -n 8slp /etc/hosts` + afterwards and delete any line you added yourself. + -- **Every `8slp.net` name:** on Pods that include `dnsmasq`, a small DNS resolver on the Pod answers every `8slp.net` name, plus Eight Sleep's log endpoint `kinesis.us-east-1.amazonaws.com`, with an unreachable address. Lookups for anything else are forwarded to your router as usual. If that resolver stops, the Pod switches straight back to your router's DNS, so a failure never leaves the Pod unable to look up names. If the resolver can't start, for example because another service already uses port 53, only the known names below are blocked. `internet-control status` (see [Check the firewall on your Pod](#check-the-firewall-on-your-pod)) shows which layer is active. -- **Known names:** on every Pod, `/etc/hosts` lists the exact names the stock firmware is known to use: the sensor upload, device API and firmware update hosts, plus the log endpoint. +### 3. Stock services turned off -This layer is what keeps the stock firmware from uploading data or pulling an Eight Sleep firmware update while internet access is allowed. +Installs and updates turn off the stock services that sleepypod doesn't need: -### 3. Stock telemetry turned off +- Eight Sleep's log shipper (`vector`) and metrics agent (`telegraf`). Without this, `vector` would keep sending the Pod's system logs to Eight Sleep's servers and store up to 256 MB of unsent logs on the Pod's flash storage. +- The stock firmware updater (`swupdate`) and connectivity watchdog (`defibrillator`, `eight-kernel`). A stock update can remove root access and sleepypod, and the watchdog can repeatedly reboot a Pod that can't reach the internet. They stay off unless you allow firmware updates; see [Firmware updates](/core/firmware-updates/#stock-updates-are-off). -Installs and updates turn off Eight Sleep's log shipper (`vector`) and metrics agent (`telegraf`), so they stop retrying. Without this, `vector` would keep sending the Pod's system logs to Eight Sleep's servers and store up to 256 MB of unsent logs on the Pod's flash storage. The sensor firmware that sleepypod relies on stays running. +The sensor firmware that sleepypod relies on stays running. ### Why your DNS server still sees Eight Sleep lookups -If you run a network-wide DNS filter such as AdGuard Home or Pi-hole, you may see the Pod look up `raw-api-upload.8slp.net` or `kinesis.us-east-1.amazonaws.com` many times. This stops once the blocked domains are in place, because the Pod answers those lookups itself. Until then, a lookup is not a connection: +If you run a network-wide DNS filter such as AdGuard Home or Pi-hole, you may see the Pod look up `raw-api-upload.8slp.net` or `kinesis.us-east-1.amazonaws.com` many times. This stops once the Pod's own resolver is blocking those names, because the Pod answers them itself. Until then, a lookup is not a connection: - DNS requests go to a server on your home network, which the firewall allows. -- In local-only mode, the connection that would follow goes to the internet, which the firewall drops. With internet access allowed, the blocked domains above are what stop it. +- In local-only mode, the connection that would follow goes to the internet, which the firewall drops. - The stock service then retries, so the same name appears over and over. -Blocking these names in your DNS filter as well is safe. +You can block these names in your DNS filter as well, but set it to answer `NXDOMAIN` or `REFUSED`, not `0.0.0.0` or "Null IP", for the reason in the warning above. In AdGuard Home this is **Settings → DNS settings → Blocking mode**. ### Check the firewall on your Pod @@ -71,12 +89,13 @@ Connect over [SSH](/core/root-access/) and run: ```bash sudo iptables -S OUTPUT; sudo iptables -S SLEEPYPOD-BLOCK 2>/dev/null # local only: OUTPUT ends in "-j DROP", or jumps to SLEEPYPOD-BLOCK, which does curl -s -m 5 -o /dev/null -w "%{http_code}\n" https://1.1.1.1 || echo blocked # prints "blocked" when local only -grep -c 8slp /etc/hosts # number of blocked Eight Sleep names -systemctl is-enabled vector # "masked" when the log shipper is off +nslookup foo.8slp.net 127.0.0.1 # "NXDOMAIN" when the Pod's resolver blocks Eight Sleep names +grep -c 8slp /etc/hosts # must print 0 +systemctl is-enabled vector swupdate # "masked" for each, unless you allowed firmware updates ``` For a summary of every layer, run `sudo /home/dac/sleepypod-core/scripts/internet-control status`. --- -**Source reference:** [Internet card](https://github.com/sleepypod/core/blob/4cc76838/src/components/status/InternetToggleCard.tsx) · [Internet access API](https://github.com/sleepypod/core/blob/4cc76838/src/server/routers/system.ts) · [Firewall and name blocking](https://github.com/sleepypod/core/blob/991d8e1c/scripts/internet-control) · [Stock telemetry](https://github.com/sleepypod/core/blob/991d8e1c/scripts/lib/telemetry-helpers) · [Firewall status](https://github.com/sleepypod/core/blob/991d8e1c/src/hardware/iptablesCheck.ts) +**Source reference:** [Internet card](https://github.com/sleepypod/core/blob/4cc76838/src/components/status/InternetToggleCard.tsx) · [Internet access API](https://github.com/sleepypod/core/blob/4cc76838/src/server/routers/system.ts) · [Firewall and name blocking](https://github.com/sleepypod/core/blob/29afbb74/scripts/internet-control) · [Stock telemetry](https://github.com/sleepypod/core/blob/29afbb74/scripts/lib/telemetry-helpers) · [Firewall status](https://github.com/sleepypod/core/blob/29afbb74/src/hardware/iptablesCheck.ts)