<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Pratha Maniar</title>
    <description>The latest articles on Forem by Pratha Maniar (@pratha_maniar).</description>
    <link>https://forem.com/pratha_maniar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3609090%2Fb43eac91-794c-444c-b9eb-4d119101f925.png</url>
      <title>Forem: Pratha Maniar</title>
      <link>https://forem.com/pratha_maniar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pratha_maniar"/>
    <language>en</language>
    <item>
      <title>Secure Firmware Updates with a Secure Element: Building Trust Into the Bootloader</title>
      <dc:creator>Pratha Maniar</dc:creator>
      <pubDate>Fri, 22 May 2026 10:33:13 +0000</pubDate>
      <link>https://forem.com/pratha_maniar/secure-firmware-updates-with-a-secure-element-building-trust-into-the-bootloader-pip</link>
      <guid>https://forem.com/pratha_maniar/secure-firmware-updates-with-a-secure-element-building-trust-into-the-bootloader-pip</guid>
      <description>&lt;p&gt;Imagine your embedded device is deployed somewhere in the field - a smart meter, an industrial sensor, a vehicle ECU. You find a critical bug. You push a fix. The device downloads the new firmware over the air and flashes it.&lt;/p&gt;

&lt;p&gt;But here's the uncomfortable question: &lt;strong&gt;how does the device know that firmware actually came from you?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anyone sitting on the same network could send a firmware package. A compromised update server could serve a malicious binary. &lt;/p&gt;

&lt;p&gt;Without a proper trust mechanism, your device is one bad OTA away from running someone else's code.&lt;/p&gt;

&lt;p&gt;This is the problem a &lt;strong&gt;Secure Element&lt;/strong&gt; solves - and this post walks through exactly how it works, from the chip itself to the bootloader verification flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is a Secure Element?
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Secure Element (SE)&lt;/strong&gt; is a small, tamper-resistant chip whose one job is to safely store cryptographic keys and run crypto operations - without ever exposing those keys to the outside world.&lt;/p&gt;

&lt;p&gt;Think of it as a &lt;strong&gt;locked safe soldered onto your board&lt;/strong&gt;. Even if an attacker gets full control of your main CPU, dumps your flash, or probes your bus lines, the keys inside the SE remain out of reach.&lt;/p&gt;

&lt;p&gt;It protects against:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Physical attacks (chip probing, decapping, glitch injection)&lt;/li&gt;
&lt;li&gt;Software attacks (privilege escalation, memory dumps)&lt;/li&gt;
&lt;li&gt;Side-channel attacks (power analysis, timing attacks)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Common SE chips used in embedded systems: &lt;strong&gt;ATECC608A, SE050, TPM 2.0.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What Can a Secure Element Do?
&lt;/h3&gt;

&lt;p&gt;A secure element is not just a key storage box - it is a self-contained cryptographic engine. Here is what it can do:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Key generation and storage&lt;/strong&gt; - private keys are created and stored inside the chip and never leave it, not even during factory programming&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Digital signatures (ECDSA - Elliptic Curve Digital Signature Algorithm / Ed25519)&lt;/strong&gt; - signs or verifies data using stored keys; the core operation behind firmware verification&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Key agreement (ECDH - Elliptic Curve Diffie-Hellman)&lt;/strong&gt; - two parties derive a shared encryption key from exchanged public keys, without the secret ever crossing the wire&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Symmetric encryption (AES - Advanced Encryption Standard)&lt;/strong&gt; - encrypts and decrypts data directly on-chip; used to protect firmware package contents in transit&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Hashing (SHA-256 - Secure Hash Algorithm)&lt;/strong&gt; - computes a fixed 32-byte fingerprint of any data; one byte changed equals a completely different hash&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. True random number generation (TRNG)&lt;/strong&gt; - hardware entropy source for generating nonces, session keys, and signature randomness&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Monotonic counter&lt;/strong&gt; - a number that only goes up, never down, even across power cycles; blocks firmware downgrade attacks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Certificate storage&lt;/strong&gt; - stores X.509 certificates to prove device identity during TLS(Transport Layer Security) or OTA authentication&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Firmware Updates Need Signature Verification?
&lt;/h3&gt;

&lt;p&gt;When a device receives an OTA update, it has no way of knowing by default whether that firmware is genuine or has been tampered with.&lt;/p&gt;

&lt;p&gt;An attacker could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Intercept the OTA transfer and swap in malicious firmware&lt;/li&gt;
&lt;li&gt;Replay an older, vulnerable firmware version&lt;/li&gt;
&lt;li&gt;Extract a key from plain flash memory, sign a fake binary, and serve it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Signature verification closes this.&lt;/strong&gt; The firmware is cryptographically signed by the manufacturer before it ever leaves the build system. The bootloader verifies that signature on the device before touching a single flash sector. If verification fails, nothing gets flashed.&lt;/p&gt;

&lt;p&gt;The Secure Element is what makes this guarantee solid - the verification key lives inside hardware-protected storage, not in flash memory where it can be read or replaced.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Verification Flow - Step by Step
&lt;/h3&gt;

&lt;h4&gt;
  
  
  On the Manufacturer Side
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Firmware binary is compiled, and a version header is attached (version number, hardware revision, and magic bytes).&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;SHA-256 hash&lt;/strong&gt; of the entire firmware is computed - a fixed 32-byte fingerprint of the binary.&lt;/li&gt;
&lt;li&gt;That hash is signed using an &lt;strong&gt;ECDSA private key&lt;/strong&gt; stored in a Hardware Security Module (HSM - Hardware Security Module) on the build server. The result is a signature.&lt;/li&gt;
&lt;li&gt;Package is uploaded to the OTA server. The final package ships as:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ firmware binary + version header + ECDSA signature }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  On the Device Side - Inside the Bootloader
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Firmware package arrives and is written to a staging area in flash.
   (Primary firmware slot is untouched at this point.)

2. Bootloader reads the firmware header:
   - Magic number   → is this a valid package format?
   - Hardware rev   → is this firmware built for this exact hardware?
   - Version number → is this newer than what is currently running?

3. Bootloader computes SHA-256 over the full firmware binary.
   → 32-byte hash of exactly what was received.

4. Bootloader hands the hash + the signature to the Secure Element:
   SE.verify(hash, signature, public_key)

5. Secure Element runs ECDSA verification internally:
   - Uses the public key it has stored inside it
   - Mathematically checks whether the signature was produced
     by the matching private key over this exact hash
   - Returns PASS or FAIL - nothing else leaves the SE

6a. PASS:
    → Erase the primary firmware slot
    → Copy firmware from staging to primary slot
    → Increment the SE monotonic counter (locks out older versions)
    → Reboot and jump to new firmware entry point

6b. FAIL:
    → Erase the staging area
    → Boot the existing firmware as a safe fallback
    → Log the failure for reporting on next server connection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The key insight:&lt;/strong&gt; the private key that signed the firmware on the build server never exists on the device. Only the public key is on the device - locked inside the SE. A public key can verify signatures but cannot create them. So even if an attacker fully dumps the device's flash, they cannot forge firmware that passes verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anti-Rollback: Why a Valid Signature Is Not Enough
&lt;/h3&gt;

&lt;p&gt;Here is a subtle attack worth understanding. Firmware v1.2 had a vulnerability - you patched it in v1.3. But v1.2 was real firmware, signed by your real private key. Its signature is completely valid.&lt;/p&gt;

&lt;p&gt;An attacker replays the old v1.2 package. Signature check passes. Device flashes vulnerable firmware. You are back to square one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix is the SE monotonic counter&lt;/strong&gt; - a number stored inside the SE that only ever increments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SE stores: minimum_allowed_version = 1.3

Bootloader receives firmware v1.2:
  1.2 &amp;lt; 1.3  →  REJECTED, even though signature is valid.

After successfully flashing v1.4:
  SE increments counter → minimum_allowed_version = 1.4
  This cannot be undone by software.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because the counter is inside the SE, no software attack - not even a full OS compromise - can reset it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Firmware security is not just about encryption or passwords. It is about &lt;strong&gt;establishing a chain of trust&lt;/strong&gt; - from the moment code leaves your build system to the moment a device executes it.&lt;/p&gt;

&lt;p&gt;The Secure Element is the hardware anchor of that chain. The private key stays with you. The public key stays locked in silicon on the device. The bootloader does the verification. And the monotonic counter makes sure there is no going back.&lt;/p&gt;

</description>
      <category>embedded</category>
      <category>security</category>
      <category>firmware</category>
      <category>signature</category>
    </item>
    <item>
      <title>How Does a Fingerprint Turn Into a Secure Digital Identity?</title>
      <dc:creator>Pratha Maniar</dc:creator>
      <pubDate>Fri, 19 Dec 2025 06:58:47 +0000</pubDate>
      <link>https://forem.com/pratha_maniar/how-does-a-fingerprint-turn-into-a-secure-digital-identity-3p3i</link>
      <guid>https://forem.com/pratha_maniar/how-does-a-fingerprint-turn-into-a-secure-digital-identity-3p3i</guid>
      <description>&lt;h3&gt;
  
  
  Fingerprint-Based Security: From Capture to Secure Matching
&lt;/h3&gt;

&lt;p&gt;In a world where passwords are forgotten, stolen, or guessed, biometrics provides a far more reliable form of security, an identity based on who you are. Among all biometric technologies, fingerprint recognition remains the most widely deployed due to its accuracy, speed, and ease of use.&lt;/p&gt;

&lt;p&gt;But what really happens when a finger touches a sensor?&lt;br&gt;
How does a physical pattern on human skin turn into a secure digital identity?&lt;/p&gt;

&lt;p&gt;Let’s explore the complete journey, from fingerprint formation to secure matching.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. What Is a Biometric System?
&lt;/h3&gt;

&lt;p&gt;A biometric system identifies or verifies an individual using unique biological traits. Fingerprints are especially effective because they are unique, permanent, and easy to capture.&lt;/p&gt;

&lt;p&gt;Biometric systems operate in two main phases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enrollment&lt;/strong&gt; – registering a user’s biometric data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authentication&lt;/strong&gt; – verifying identity using live input.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Ridges and Valleys: The Foundation of Fingerprints
&lt;/h3&gt;

&lt;p&gt;A fingerprint is made up of alternating raised lines (ridges) and depressions (valleys) on the surface of the skin.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ridges are the elevated portions that make contact with a surface.&lt;/li&gt;
&lt;li&gt;Valleys are the spaces between ridges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These ridge-valley patterns form unique shapes such as loops, whorls, and arches, which are determined before birth and remain stable throughout life.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. How a Fingerprint Image Is Generated
&lt;/h3&gt;

&lt;p&gt;When a finger is placed on a fingerprint sensor, ridges touch the surface while valleys remain slightly away.&lt;/p&gt;

&lt;p&gt;Depending on the sensor type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Capacitive sensors&lt;/strong&gt; detect electrical differences between ridges and valleys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optical sensors&lt;/strong&gt; detect reflected light from ridge contact points.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ultrasonic sensors&lt;/strong&gt; map depth variations using sound waves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This interaction creates a contrast-rich image, where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dark areas usually represent ridges.&lt;/li&gt;
&lt;li&gt;Light areas represent valleys.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This raw image is the digital representation of the fingerprint’s physical structure.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Pre-Processing: Enhancing Ridges and Valleys
&lt;/h3&gt;

&lt;p&gt;The raw fingerprint image may contain noise due to finger pressure, moisture, or skin condition. To improve clarity, the system performs preprocessing, which includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contrast normalization.&lt;/li&gt;
&lt;li&gt;Noise reduction.&lt;/li&gt;
&lt;li&gt;Ridge enhancement.&lt;/li&gt;
&lt;li&gt;Binarization (ridges vs valleys).&lt;/li&gt;
&lt;li&gt;Thinning (reducing ridges to single-pixel width).
These steps sharpen the ridge-valley structure, making feature extraction more reliable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Feature Extraction: Identifying Unique Points
&lt;/h3&gt;

&lt;p&gt;Rather than storing the entire fingerprint image, the system extracts distinct features, mainly minutiae points.&lt;/p&gt;

&lt;p&gt;Minutiae occur where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A ridge ends.&lt;/li&gt;
&lt;li&gt;A ridge split into two (bifurcation).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each minutia is defined by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Its location.&lt;/li&gt;
&lt;li&gt;Its orientation.&lt;/li&gt;
&lt;li&gt;Its type.
A fingerprint typically contains dozens of usable minutiae, which together form a unique digital signature.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Enrollment: Creating a Secure Fingerprint Template
&lt;/h3&gt;

&lt;p&gt;During enrollment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Minutiae are extracted from each scan.&lt;/li&gt;
&lt;li&gt;A stable reference template is generated.&lt;/li&gt;
&lt;li&gt;The template is encrypted and stored securely.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Secure Storage: Protecting Biometric Identity
&lt;/h3&gt;

&lt;p&gt;Because biometric data cannot be changed like a password, security is critical. Modern systems use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Encrypted template storage.&lt;/li&gt;
&lt;li&gt;Secure elements or trusted execution environments.&lt;/li&gt;
&lt;li&gt;Hardware-based cryptographic protection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ensures fingerprints cannot be reconstructed even if storage is compromised.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Authentication: Matching Ridges and Patterns
&lt;/h3&gt;

&lt;p&gt;During authentication:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A live fingerprint is captured.&lt;/li&gt;
&lt;li&gt;Its features are extracted.&lt;/li&gt;
&lt;li&gt;The live template is compared with the stored template.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Matching algorithms align ridge patterns, compare minutiae relationships, and compute a similarity score. Access is granted only if the score crosses a secure threshold.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Accuracy and Anti-Spoofing Measures
&lt;/h3&gt;

&lt;p&gt;To prevent fake fingerprints, systems use liveness detection, checking factors like skin conductivity, ridge deformation, and depth/texture variations to ensure the fingerprint comes from a real, live finger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Fingerprint biometrics use unique ridge and valley patterns to create a secure digital identity. From image capture to minutiae extraction and encrypted matching, every step ensures accuracy, privacy, and security.&lt;/p&gt;

&lt;p&gt;What seems like a simple touch is actually a powerful combination of biology, signal processing, cryptography, and embedded engineering, making fingerprints one of the most trusted security mechanisms in modern systems.&lt;/p&gt;

</description>
      <category>security</category>
      <category>biometric</category>
      <category>dataprocessing</category>
      <category>fingerprint</category>
    </item>
    <item>
      <title>A Deep Dive Into ESP-CSI: Channel State Information on ESP32 Chips</title>
      <dc:creator>Pratha Maniar</dc:creator>
      <pubDate>Wed, 19 Nov 2025 12:21:23 +0000</pubDate>
      <link>https://forem.com/pratha_maniar/a-deep-dive-into-esp-csi-channel-state-information-on-esp32-chips-5el1</link>
      <guid>https://forem.com/pratha_maniar/a-deep-dive-into-esp-csi-channel-state-information-on-esp32-chips-5el1</guid>
      <description>&lt;p&gt;Most people know Wi-Fi only as a way to connect phones, laptops, and IoT devices to the internet. But Wi-Fi can do much more.&lt;/p&gt;

&lt;p&gt;Espressif’s ESP-CSI (Channel State Information) technology allows ESP32-series chips to “sense” what is happening in the environment using only Wi-Fi signals-no cameras, no radar, no extra sensors.&lt;/p&gt;

&lt;p&gt;Every Wi-Fi signal changes as it passes through a room.&lt;br&gt;
People, walls, furniture, movement-everything affects the signal slightly.&lt;br&gt;
ESP-CSI captures these tiny changes in the Wi-Fi channel and turns them into meaningful data.&lt;/p&gt;

&lt;p&gt;This makes it possible to detect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Human presence&lt;/li&gt;
&lt;li&gt;Motion&lt;/li&gt;
&lt;li&gt;Gestures&lt;/li&gt;
&lt;li&gt;Indoor positioning&lt;/li&gt;
&lt;li&gt;Environmental changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And all of this works using only an ESP chip and Wi-Fi.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Is ESP-CSI Better Than RSSI?
&lt;/h3&gt;

&lt;p&gt;Normally, Wi-Fi devices only report RSSI (Received Signal Strength Indicator), which is a single number representing signal strength.&lt;br&gt;
However, CSI provides much more detailed information, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How each frequency of the Wi-Fi signal was changed.&lt;/li&gt;
&lt;li&gt;How much it was absorbed or reflected.&lt;/li&gt;
&lt;li&gt;How much noise is in the environment.&lt;/li&gt;
&lt;li&gt;How the signal phase rotated.&lt;/li&gt;
&lt;li&gt;How the signal was delayed.&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Aspect&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;RSSI&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;CSI&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;What it shows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Overall signal strength (one value)&lt;/td&gt;
&lt;td&gt;Detailed channel info (amplitude + phase per subcarrier)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Detail Level&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;Very high&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Sensitivity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Detects big changes only&lt;/td&gt;
&lt;td&gt;Detects tiny movements (even breathing)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Basic connection quality, coarse location&lt;/td&gt;
&lt;td&gt;Motion sensing, presence, gesture, indoor positioning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Interference&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Easily affected&lt;/td&gt;
&lt;td&gt;More stable if environment doesn’t change&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Accuracy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Low&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  How Does ESP-CSI Work?
&lt;/h3&gt;

&lt;p&gt;Wi-Fi uses OFDM, which splits one Wi-Fi channel into many smaller frequencies called subcarriers. Each Wi-Fi packet carries amplitude and phase information for every subcarrier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When these subcarriers travel through the environment, they get affected by:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People absorbing energy.&lt;/li&gt;
&lt;li&gt;Moving objects shifting the wave pattern.&lt;/li&gt;
&lt;li&gt;Walls reflecting the signal.&lt;/li&gt;
&lt;li&gt;Furniture and air slightly bending the waves.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ESP chip measures two things for each subcarrier:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amplitude-how strong the signal became.&lt;/li&gt;
&lt;li&gt;Phase-how much the wave rotated or was delayed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Together, this forms the CSI (Channel State Information) array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When someone moves:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amplitude values fluctuate.&lt;/li&gt;
&lt;li&gt;Phase values shift in characteristic patterns.&lt;/li&gt;
&lt;li&gt;Even small movements cause detectable changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tiny variations act as “clues” about what happened in the environment. The ESP device captures this at the PHY layer, then exposes it to the user through CSI callback events in Espressif’s API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features of ESP-CSI
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Detailed Channel Insights&lt;/strong&gt;&lt;br&gt;
CSI provides amplitude and phase information for every Wi-Fi subcarrier, giving much more detail than a single RSSI value. This allows precise sensing of environmental changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. No Extra Hardware Required&lt;/strong&gt;&lt;br&gt;
Works on standard ESP32-series chips (ESP32, S2, C3, C6, etc.) using built-in Wi-Fi no special sensors or NICs needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. High Sensitivity&lt;/strong&gt;&lt;br&gt;
Can detect both large movements and very small changes, such as breathing or slight object shifts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Real-Time Processing&lt;/strong&gt;&lt;br&gt;
ESP chips can analyze CSI data locally and instantly, enabling fast responses without needing external servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Flexible Operating Modes&lt;/strong&gt;&lt;br&gt;
Supports multiple ways to collect CSI, including sniffer mode, router-based CSI, and device-to-device communication for advanced setups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Stable and Robust&lt;/strong&gt;&lt;br&gt;
CSI amplitude data stays reliable even with typical indoor interference like chargers or other electronic devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Easy Software Integration&lt;/strong&gt;&lt;br&gt;
Fully supported in ESP-IDF and compatible with Espressif cloud tools, with open-source utilities to process and analyze CSI data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where Is ESP-CSI Used?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Human activity detection:&lt;/strong&gt; Detect presence, movement, gestures, or even subtle actions like breathing-useful for security, elder care, and smart homes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Indoor positioning:&lt;/strong&gt; Provide accurate indoor location tracking for people or devices in buildings like malls, airports, and hospitals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Environmental monitoring:&lt;/strong&gt; Sense small changes in the environment through Wi-Fi signal variations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intrusion detection:&lt;/strong&gt; Act as a motion sensor to detect unauthorized movement without cameras.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Asset tracking:&lt;/strong&gt; Track the real-time location of important items in places like warehouses or hospitals.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Smart home automation:&lt;/strong&gt; Enable location-based actions, such as auto-adjusting lights, AC, or appliances.&lt;/p&gt;

&lt;h3&gt;
  
  
  Chip Performance Ranking
&lt;/h3&gt;

&lt;p&gt;Espressif categorizes the CSI capability of its chips approximately in the following order.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;ESP32-C5 ＞ ESP32-C6 ＞ ESP32-C3 ≈ ESP32-S3 ＞ ESP32.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Meaning:
&lt;/h4&gt;

&lt;p&gt;Newer chips, like C5 &amp;amp; C6, → better CSI quality.&lt;br&gt;
C3 &amp;amp; S3 → good general performance.&lt;br&gt;
Original ESP32 → lowest but still works.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Can ESP-CSI Be Implemented?
&lt;/h3&gt;

&lt;p&gt;Espressif provides three ways to obtain CSI data.&lt;/p&gt;

&lt;h4&gt;
  
  
  Method 1: Getting CSI from a Router (get_router_csi)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setup:&lt;/strong&gt; One ESP device + a router.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process:&lt;/strong&gt;
ESP sends ping packets to the router.
The router replies with packets containing CSI information.
ESP receives those packets and extracts CSI (amplitude, phase, etc.).
This is the simplest method-ideal for beginners.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Method 2: Exchanging CSI Between Two ESP Devices (get_device_csi)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setup:&lt;/strong&gt; Two ESP chips + router acting as a relay.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process:&lt;/strong&gt;
Both ESP devices send ping packets to the router.
The router forwards packets to the correct device.
When Device B receives a ping from Device A, it replies with CSI.
Device A then extracts CSI information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Method 3: Getting CSI Using a Dedicated Packet Sender (get_broadcast_csi)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Setup:&lt;/strong&gt; A device that sends broadcast packets + multiple ESP receivers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process:&lt;/strong&gt;
The transmitter sends broadcast packets on different Wi-Fi channels.
All ESP devices (in monitor mode) receive these packets.
Each ESP extracts CSI data independently.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Want to dive deeper?&lt;/strong&gt; &lt;br&gt;
Check out Espressif’s official CSI documentation here:&lt;br&gt;
&lt;a href="https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/solution-introduction/esp-csi/esp-csi-solution.html" rel="noopener noreferrer"&gt;https://docs.espressif.com/projects/esp-techpedia/en/latest/esp-friends/solution-introduction/esp-csi/esp-csi-solution.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>beginners</category>
      <category>wifisensing</category>
      <category>iot</category>
    </item>
  </channel>
</rss>
