Work Somnox
Connected Health & Sleep Tech ESP32-S3 · FreeRTOS Embedded firmware EU CRA

CRA-ready security and breathing intelligence that adapts to every sleeper

How c4micro delivered end-to-end device security, a secure factory provisioning tool, and co-developed adaptive breathing algorithms for Somnox, across two products, without slowing the firmware roadmap.

Industry Connected sleep technology
Scope Firmware · Security · Algorithms
Region Rotterdam, Netherlands
Compliance EU CRA (Reg. 2024/2847)
2027 CRA-ready ahead of the EU enforcement deadline
0 Impact to the firmware delivery timeline
2 Product lines on one shared firmware foundation
Live Field-deployed breathing guidance
The challenge

Ship strong security and real breathing intelligence, on the same timeline

Somnox builds connected sleep companions that guide people into rest. The range spans two devices, the full-size Somnox Pro for the bed and the handheld Somnox Go for on the go. Neither problem could be allowed to delay the other:

  • A regulatory deadline. Under the EU Cyber Resilience Act, from 2027 connected devices placed on the European market must implement end-to-end security. Secure boot and a secure update path had to be designed, built, and documented, without pushing back the firmware schedule
  • Security beyond the firmware. End-to-end means the device, the mobile app, the cloud backend, and the manufacturing process all had to hold the same guarantees, with documentation able to satisfy a CRA consultant's review
  • Secure manufacturing at scale. Provisioning cryptographic identity on a factory floor leaves little room for error and is a common target for attackers, Somnox needed a flashing process that was secure, cloud-integrated, and itself CRA-compliant
  • Every sleeper breathes differently. Detecting breathing reliably enough to respond to it, all night, on-device, from motion alone, is a genuinely hard signal problem. And it had to work across two very different products
  • Insight for every sleeper. Somnox wanted users to see their own breathing, which required breathing data to be captured on the device and streamed reliably to the app for visualisation. That pipeline did not exist.
The work

Five domains, one team

As Somnox's embedded engineering partner, c4micro owned the firmware stack end to end and worked closely with Somnox's team and their partners. Each problem maps to a deliberate engineering decision.

  • End-to-end security, delivered on schedule: a complete secure boot and secure firmware-update architecture, engineered in parallel with feature work, with device trust rooted in hardware.
  • Security across the whole chain, direct collaboration with Somnox's app developer, backend developer, and CRA consultant to make the guarantees hold from cloud to phone to device, backed by a maintained threat analysis and traceable mitigations
  • A secure, cloud-integrated factory flasher: a provisioning tool that gives every device its own cryptographic identity, with key material protected throughout the process and central control over every flasher station.
  • Breathing detection from motion alone: algorithm development with Somnox's team to detect a sleeper's breathing from IMU readings, reliable enough to run all night on both products, with data logging infrastructure that streams breathing data to the app so users can see their own breathing visualised.
  • Breathing guidance that meets you, then leads you, the device first synchronises to the user's own breathing rate, then gently slows that rhythm toward the deep, slow rate associated with relaxation and sleep onset. Field-deployed and trusted by users today
ESP32-S3  ·  FreeRTOS  ·  C++23  ·  BLE 5.0 / NimBLE  ·  Secure Boot  ·  Flash encryption  ·  OTA updates  ·  EU CRA  ·  Secure factory provisioning
Architecture

Somnox firmware stack

Built on a custom embedded SDK shared across the Somnox Pro and Somnox Go, EU CRA compliant from the breathing engine at the core to hardware-enforced security at the base.

Architecture overview, Somnox firmware stack  ·  EU CRA compliant  ·  shared across Pro & Go
Firmware architecture diagram showing the Somnox firmware stack, from the hardware and secure boot at the base, through the FreeRTOS kernel and c4micro embedded SDK, up to the breathing detection and guidance algorithms at the top
We needed an embedded partner who could deliver serious security and real-time signal processing under tight constraints, low power, on-device, reliable enough to run all night, and still hit our timeline. They moved fast, worked closely with our whole team, and delivered something we're genuinely proud to ship.
Somnox B.V. Made in Rotterdam, Netherlands
For engineers

Technology stack

Layer Technology
SoCEspressif ESP32-S3, dual-core LX7, hardware-backed security
RTOS & SDKFreeRTOS via ESP-IDF · custom c4micro embedded SDK
LanguageC++23
ConcurrencyActive Object per subsystem, task + typed queue, no shared mutable state
State machinesBoost.SML (header-only, zero-overhead), one per subsystem
Inter-task commsCompile-time-typed publish-subscribe broker
ConnectivityBLE 5.0 (NimBLE) · Protocol Buffers / nanopb · MTU-aware envelope framing
OTA updatesSigned, authenticated updates with automatic rollback
Device securityHardware-enforced secure boot and flash encryption, unique keys per device
AlgorithmsIMU-based breathing detection · entrainment-based guidance · breathing data streaming for in-app visualisation
Factory toolingCloud-integrated secure provisioning tool · CRA-compliant
BuildDocker (espressif/idf), byte-reproducible across all machines and CI
RegulatoryEU Cyber Resilience Act (Reg. 2024/2847) · threat analysis & traceable mitigations
Start your project

Building health tech that needs precise embedded software?

c4micro partners with product teams who need embedded expertise from architecture through factory provisioning, real-time control, wireless updates, and hardware-enforced security.