FarmSense
FlightSensor
The Challenge: The Prototype Plateau
Legacy Issues
- 1. Hybrid C/C++ Codebase: Lack of standardization created race conditions and blocked FOTA implementation.
- 2. Custom "Black Box" Drivers: Custom logging and RTC implementations prevented the use of power-saving sleep modes.
- 3. Non-Deterministic: Sensor reading threads were blocked by cellular upload latency.
Mission Objectives
- 1. Migrate to Nordic Connect SDK (NCS) for long-term support.
- 2. Implement Zephyr RTOS for thread safety and power management.
- 3. Optimize Solar PMIC logic for off-grid longevity.
The Solution: Event-Driven Architecture
Standardization & Long-Term Viability
We migrated the codebase from ad-hoc C++ libraries to native Zephyr subsystems. By adhering to the Zephyr device tree standard, we unlocked the native power of the Nordic Connect SDK (NCS).
This architectural alignment was the prerequisite for implementing a robust Over-The-Air update mechanism, critical for a device deployed in agricultural fields where physical maintenance is cost-prohibitive.
Power Management
Replaced manual LED toggling with a dedicated PowerMgmt module controlling the PMIC states.
Data & Config
Migrated from custom JSON parsers to Zephyr Settings and File System subsystems.
Logging System
Implemented custom logging backend to save offline logs to SD Card and send them when device comes online.
AWS File management
Store large data files directly to AWS S3 buckets, compress them on device for efficiency.
Resilient FOTA Architecture
ORCHESTRATION: AWS IOT JOBS
SECURITY: ECDSA SIGNED IMAGES
For a solar-powered device, "bricking" during an update is a catastrophic failure. We engineered a fail-safe, dual-bank update strategy.
-
01
Cryptographic Verification
The bootloader rejects any image lacking a valid manufacturer signature (ED25519), preventing supply chain attacks.
-
02
Background Download
Updates download to a secondary flash partition while the device continues normal operation. No downtime during transfer.
-
03
Atomic Rollback
MCUboot performs a "test boot" of the new image. If the system crashes or fails to confirm health, it automatically reverts to the previous version.
Working with Hacod significantly accelerated our device development. Our product greatly benefited from the expertise and skills provided by Hacod's engineers. Thanks to our collaboration, we were able to achieve results twice as fast as anticipated. The development work was executed at the highest level, and the outcome far exceeded our expectations.