Case studies 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
  • No real data to learn from yet. Improving the algorithm needed real-world sensor data from real sleepers, captured in a form ready for post-processing and analysis. 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. Device trust is rooted in hardware: eFuses burn a unique AES-256 flash-encryption key, HMAC key, and RSA-3072 Secure Boot digests into every unit, then permanently disable all debug interfaces
  • 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, pulls each device's unique key material from the cloud at flash time, uses it only in volatile memory, and wipes it the moment provisioning completes. The cloud can disable any flasher station at any time, cutting off its ability to provision further devices
  • Breathing detection from motion alone, algorithm development with Somnox's team to detect a sleeper's breathing from IMU readings, with field logging infrastructure that streams real-world sensor data back for post-processing and continuous improvement
  • 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  ·  RSA-3072 Secure Boot  ·  AES-256  ·  Dual-slot OTA  ·  EU CRA  ·  Cloud-integrated factory flasher
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 AES/RSA, eFuse OTP
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 updatesHTTPS · RSA-3072 verify · dual-slot rollback · cloud-issued auth token required
Flash encryptionAES-256 XTS, hardware-enforced, per-device key burned via eFuse
Secure BootRSA-3072 Secure Boot V2 · HMAC-encrypted NVS storage · debug interfaces permanently disabled
AlgorithmsIMU-based breathing detection · entrainment-based guidance · field logging for post-processing and continuous improvement
Factory toolingCloud-integrated secure flasher · RAM-only key handling · wiped on completion · remotely deauthorizable · CRA-compliant
BuildDocker (espressif/idf), byte-reproducible across all machines and CI
RegulatoryEU Cyber Resilience Act (Reg. 2024/2847) · threat analysis & traceable mitigations
More work

Other products we've shipped

niostem wearable device
Wearable · Wellness

niostem

End-to-end wearable wellness platform, from electronics to CE certification.

Read case study →
Iteros, Inc
IoT Platform

Iteros, Inc

IoT-to-cloud asset management in real time.

Read case study →
O-Nexus NetManager
Energy · IoT

O-Nexus

Real-time on-device load management for all-electric homes on constrained grid connections.

Read case study →
View all case studies
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.