ALPSTUGA vs. Me: A Thread Odyssey

I Built a Whole Thread Network Just to See If I Could Reflash an IKEA Sensor

Or: how "let's put Zigbee on this thing" turned into a custom Linux kernel, a soldering-free radio dongle flash, and a fully self-hosted Matter OTA server running inside Windows. 

It started with a want. I have an IKEA ALPSTUGA air quality sensor, and I wanted it to speak Zigbee so I could fold it into my own setup instead of IKEA's Matter/Thread world.

The plan had three escalating stages, each one a "well, if that doesn't work…" away from the last:

  1. Is there a hidden Zigbee toggle? Some IKEA devices ship with a secret Zigbee fallback. Maybe I'd get lucky.
  2. If not, can I rewrite the firmware myself? The chip can run Zigbee even if the stock image doesn't.
  3. And can I actually deliver that firmware over OTA with my own self-signed package? That's the one that decides whether this project is easy or a nightmare.

To even test stage 3, I needed to control the whole update pipeline — which meant I had no Matter network, no Thread network, and a Windows PC and stubbornness. Let's go.


Stage 1: Is there a hidden Zigbee mode? (Spoiler: no)

First I checked the easy path. Some IKEA gear has a hidden Zigbee mode you can trigger with button combos or Touchlink. So I went digging — teardown, PCB, and a firmware analysis.

  • The main chip is a Silicon Labs EFR32MG24 — hardware that absolutely can run Zigbee. So the radio was never the blocker.
  • But the stock firmware is pure Matter + OpenThread. Combing the binary, I found OpenThread, CHIP, and Thread strings all over, and zero trace of a Zigbee stack (EmberZNet, EZSP, Touchlink… all missing).
  • No Zigbee certification, no button combo worked for the community, nothing.

Verdict: no hidden Zigbee. Not a mathematical proof it can't exist, but the probability is very low. On to stage 2.


Stage 2: Can I rewrite the firmware myself?

If IKEA won't give me Zigbee, maybe I can. The MG24 hardware is capable; I just need to get my own image onto it. Poking further:

  • IKEA's official firmware is a Matter OTA wrapping a Silicon Labs GBL image — ECDSA-signed but not encrypted, and explicitly tagged as a Thread application. Signed but decodable, which is promising.
  • I extracted the real application image, confirmed it targets a 256 KB-RAM MG24 variant, and even reverse-engineered the Sensirion SEN63C sensor driver enough to find IKEA's temperature compensation: a tidy −0.99°C offset. Handy to know if I ever write my own firmware.

So the firmware is analyzable and, in principle, replaceable. But "signed" raises the real question — and that's stage 3.


Stage 3: Can I OTA it with my own self-signed package?

This is the decisive test. If I can push my own image via OTA, reflashing to Zigbee becomes plausible without ever touching SWD. If the device enforces IKEA's signature, that door is a lot harder to open. Either way, I first needed to control the OTA pipeline myself — my own Thread network, my own border router, my own OTA server. That's the whole rig I had to build before I could even try. So I built it.


Building the rig, part 1: turn a random dongle into a Thread radio



My "nRF52840 Bluetooth USB Dongle" turned out to be an EBYTE E104-BT5040U — an nRF52840 board compatible with Nordic's official dongle. When I plugged it in, Linux saw it sitting in Nordic's Open DFU Bootloader mode: exactly the launchpad you want, because you can flash firmware over USB with no programmer and no soldering.

I built OpenThread's RCP (Radio Co-Processor) firmware from source, for the USB-bootloader memory layout:

./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB

After checking the image starts at 0x1000 (so it wouldn't clobber the bootloader), I packaged and DFU-flashed it. The dongle rebooted and re-enumerated with a new identity:

idProduct=cafe
Product: nRF528xx OpenThread Device

The cafe product ID is a genuinely delightful touch. The dongle was now a Thread radio.


Building the rig, part 2: the Windows/WSL trilogy of pain

My whole toolchain lives in WSL2 (Ubuntu on Windows). USB devices don't automatically appear there, so everything rides on usbipd to forward the dongle into Linux. That part worked. The rest did not go quietly.

Villain 1: the OTBR firewall

Setting up the OpenThread Border Router failed because WSL's kernel lacks the pkttype netfilter module. Fix: skip the border-router firewall (FIREWALL=0) — not something this experiment needs.

Villain 2: Bluetooth

Commissioning a Matter device needs Bluetooth for the initial handshake. My old WSL kernel (5.15) had no Bluetooth stack at all. Updating WSL to a 6.18 kernel added the drivers… and promptly bricked WSL startup with a "Catastrophic failure." A restart recovered it, without losing anything.

Villain 3: the firmware that existed but didn't

The Realtek Bluetooth adapter needed rtl8852au_fw.bin. The file was right there in /lib/firmware… and the kernel still couldn't load it, because WSL's kernel can't always reach the distro's firmware files. Technically present, functionally invisible.

The fix was gloriously heavy-handed: compile a custom WSL kernel with the Bluetooth firmware baked directly into the kernel image via CONFIG_EXTRA_FIRMWARE. One make -j$(nproc) later I had a bzImage, pointed .wslconfig at it, rebooted, and finally saw:

Bluetooth: hci0: RTL: fw version 0xdfb76d7a

A real MAC address. A real controller. Bluetooth, at last. (Bonus villain: the custom kernel was missing CONFIG_TUN, which broke the border router until I loaded the tun module. There's always one more villain.)


Building the rig, part 3: commission the sensor

With Thread up, a border router running, and Bluetooth alive, I commissioned ALPSTUGA into my Matter fabric. One snag: device attestation failed because I don't have IKEA's certificate chain, so I used --bypass-attestation-verifier true — fine for a home lab, not for production. Then, as a sanity check, I read the firmware version:

SoftwareVersionString: 1.0.15

Running 1.0.15, with a matching official 1.0.26 image on hand — a perfect, no-downgrade setup to test the OTA path end to end.


The moment of truth: a self-hosted OTA

Now the actual experiment. I stood up my own Matter OTA Provider from the connectedhomeip SDK (a saga of its own: Linux-only submodules, Python 3.11, and a missing libevent-dev), and — to first prove the pipeline works before touching anything modified — loaded IKEA's official, unmodified 1.0.26 image and pointed my sensor at it.

First attempt got denied — the provider's access-control list didn't permit the sensor to fetch. One ACL entry later, the sensor sent its QueryImage, the block transfer kicked off, and I watched ~500 KB crawl across at a stately ~5 KB/s. Then:

OTA Provider received ApplyUpdateRequest
New Version: 16777242
Transfer completed, got AckEOF

The device rebooted, rejoined Thread, and reported back:

SoftwareVersionString: 1.0.26

A complete, self-hosted firmware update, delivered by a server running inside Windows, through a dongle I flashed myself, over a Thread network I built from scratch — using the genuine signed IKEA image, so zero brick risk.

And crucially, this proves the pipeline. Which sets up the real question I was chasing all along.


Where this leaves the Zigbee dream

  • No hidden Zigbee mode. Ruled out early.
  • The firmware is analyzable and replaceable in principle — I even know how to talk to the sensor and what IKEA's compensation values are.
  • I fully control the OTA pipeline. Official images flow through it perfectly.
  • The one unknown that decides everything: does ALPSTUGA enforce the GBL signature? Signed-but-not-encrypted means I can read and modify the image — but if the bootloader rejects anything not signed by IKEA, my self-signed Zigbee firmware won't boot via OTA, and I'd be back to SWD.

I could keep going: hand the device a self-signed / tampered OTA and watch which layer says no — the Matter container check, the GBL signature check, or the bootloader itself. But let's be honest about where that road leads. If the signature is enforced, the only way in is SWD, which means cracking the case open on every single sensor. That's fine for one unit on a bench. It's not fine for the three or four I'd actually want around the house.

And that's when the math flipped. Instead of converting ALPSTUGA to Zigbee, I can just bring Matter into my homelab. I already have a Thread radio, a border router, and a working commissioning setup, so the hard part is basically done. A proper Matter-over-Thread dongle running alongside my Zigbee coordinator gets me the sensor as-is, with IKEA's firmware updates intact, and zero screwdrivers involved.

So I guess I'm getting a Matter dongle to sit next to my Zigbee one. Converting every sensor just isn't worth the hassle, and honestly, I'm curious to see how Matter holds up in daily use now that I've seen how it works under the hood.

Was building an entire Thread network, a custom kernel, and a Matter OTA server just to reach that conclusion overkill? Completely. But I learned more about Thread, Matter, and WSL's kernel quirks than any tutorial would have taught me, and the rig is already built. Not a bad consolation prize.

Next up: living with Matter alongside Zigbee. Let's see if it earns its spot in the homelab.

留言