<?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>DEV Community: ZedIoT</title>
    <description>The latest articles on DEV Community by ZedIoT (@zediot).</description>
    <link>https://dev.to/zediot</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3399208%2Fd2ba7c47-d4b2-4057-969d-cee59480b9eb.png</url>
      <title>DEV Community: ZedIoT</title>
      <link>https://dev.to/zediot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zediot"/>
    <language>en</language>
    <item>
      <title>LTE-M vs NB-IoT vs Cat-1bis: A Global Deployment Decision, Not a Specs Comparison</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 03 Dec 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/lte-m-vs-nb-iot-vs-cat-1bis-a-global-deployment-decision-not-a-specs-comparison-1b57</link>
      <guid>https://dev.to/zediot/lte-m-vs-nb-iot-vs-cat-1bis-a-global-deployment-decision-not-a-specs-comparison-1b57</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Information current as of late 2025 / early 2026. Operator policies, certification status, and network availability change frequently — verify against current GSMA and operator sources before committing a design.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;LTE-M and NB-IoT are 3GPP cellular LPWA technologies designed for IoT devices that need low power, wide-area coverage, and relatively small data payloads. GSMA treats LTE-M and NB-IoT as part of the Mobile IoT ecosystem and maintains deployment resources that help teams check commercial network availability.&lt;/p&gt;

&lt;p&gt;Cat-1bis is closer to a simplified LTE Cat 1 option: it uses one receive antenna to reduce hardware complexity while keeping higher data rates and broader LTE-network reach than LPWA.&lt;/p&gt;

&lt;p&gt;That means the choice is not between three interchangeable technologies. It is a choice between three engineering priorities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;th&gt;Better fit&lt;/th&gt;
&lt;th&gt;Main advantage&lt;/th&gt;
&lt;th&gt;Main tradeoff&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;NB-IoT&lt;/td&gt;
&lt;td&gt;Water meters, gas meters, fixed sensors, infrequent telemetry&lt;/td&gt;
&lt;td&gt;Deep coverage, low power, low cost for small payloads&lt;/td&gt;
&lt;td&gt;Limited mobility and data rate; FOTA and frequent interaction are expensive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LTE-M&lt;/td&gt;
&lt;td&gt;Asset tracking, mobile devices, industrial sensing, alarms&lt;/td&gt;
&lt;td&gt;Mobility support, moderate data, PSM / eDRX support&lt;/td&gt;
&lt;td&gt;Coverage is not consistent across all countries and operators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cat-1bis&lt;/td&gt;
&lt;td&gt;POS, basic telematics, light video or voice, cross-region devices&lt;/td&gt;
&lt;td&gt;Higher data rate, broad LTE ecosystem, single-antenna cost and size benefit&lt;/td&gt;
&lt;td&gt;Deep coverage is weaker than LPWA; low-power behavior depends on network support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The real question is not which standard is newer. It is whether the device can stay operational under the actual country, operator, RF environment, and lifecycle constraints of the rollout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evaluate six constraints, not just the network name
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Coverage: maps only answer the first layer
&lt;/h3&gt;

&lt;p&gt;Before choosing a module, check the GSMA Mobile IoT Deployment Map, operator IoT coverage statements, and the regional certification table from the module vendor. A coverage map can tell you whether LTE-M or NB-IoT is commercially deployed, but it does not prove that your device will work inside a basement, metal cabinet, cold room, vehicle route, or cross-border logistics path.&lt;/p&gt;

&lt;p&gt;If the device is installed underground, behind heavy infrastructure, or inside a deep indoor utility space, NB-IoT coverage may be valuable. If the device moves, LTE-M or Cat-1bis handover, cell reselection, registration behavior, and location performance become more important. For global asset tracking, roaming availability and registration power can matter more than deep coverage at one fixed point.&lt;/p&gt;

&lt;h3&gt;
  
  
  Power: lowest power is not one module number
&lt;/h3&gt;

&lt;p&gt;PSM and eDRX can reduce cellular standby power, but they must be supported by the module, firmware, SIM configuration, and operator network. NB-IoT and LTE-M are commonly used for multi-year battery devices. New Cat-1bis platforms also support low-power modes, but not every Cat-1 network enables them in a way that matches your device plan.&lt;/p&gt;

&lt;p&gt;Use business-cycle power, not sleep current, as the decision metric. One reporting cycle includes wake-up, network search, attach or resume, uplink, possible downlink, release, and sleep. If a device keeps searching or re-registering because coverage or roaming is unstable, the theoretical sleep current will not save the battery budget.&lt;/p&gt;

&lt;p&gt;This is the same failure pattern that makes a "ten-year" battery spreadsheet come out at five in the lab. The rows that were never written — network search time during a marginal coverage window, retry storms after a failed attach, the tail of the uplink — are where the budget actually goes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data volume and FOTA: hundreds of bytes and hundreds of KB are different products
&lt;/h3&gt;

&lt;p&gt;NB-IoT is strong for infrequent small packets. It is not a comfortable path for firmware, model configuration, diagnostic logs, or cached event uploads. LTE-M gives more margin for moderate data. Cat-1bis is usually safer when the device needs higher throughput, lower latency, or faster FOTA windows.&lt;/p&gt;

&lt;p&gt;If the device only sends temperature, voltage, door state, or a meter reading, low data rate is acceptable. If the device sends location history, alarm context, log fragments, configuration packages, or delta firmware, LTE-M or Cat-1bis will usually reduce lifecycle friction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mobility: fixed devices and moving assets are different systems
&lt;/h3&gt;

&lt;p&gt;NB-IoT is more natural for static or low-mobility devices. LTE-M is a better fit for mobile use cases such as logistics, people safety, portable medical devices, or moving industrial assets. Cat-1bis also inherits LTE mobility and handover behavior, making it more suitable where continuous connectivity, lower latency, or vehicle movement matters.&lt;/p&gt;

&lt;p&gt;If a device wakes once a day in one location, mobility is not the priority. If it crosses cities, operators, or countries, network reselection, roaming agreements, SIM strategy, location behavior, and search power become primary constraints.&lt;/p&gt;

&lt;h3&gt;
  
  
  Certification and supply chain: buying a module is not the same as shipping at scale
&lt;/h3&gt;

&lt;p&gt;For overseas deployment, check three lists: supported frequency bands, operator certification for the specific module, and SIM/eSIM service support for each target country. Cat-1bis benefits from the LTE ecosystem and a fast-growing module supply chain. Even so, some regions may still apply operator certification limits, VoLTE restrictions, or use-case constraints.&lt;/p&gt;

&lt;p&gt;For devices expected to run for years, supply chain is not just unit price. You need replacement modules, firmware maintenance, certification updates, antenna design margin, eSIM remote provisioning, and a plan for network sunset or spectrum refarming.&lt;/p&gt;

&lt;h3&gt;
  
  
  Global rollout: choose connectivity together with lifecycle management
&lt;/h3&gt;

&lt;p&gt;For a multi-country rollout, the radio access technology must be selected together with SIM/eSIM, remote provisioning, operator switching, and device lifecycle management. GSMA SGP.32 is an important direction for IoT eSIM remote provisioning, especially for large unattended fleets. But a standard being available does not mean every country, operator, module, and eSIM platform combination is commercially ready for your product.&lt;/p&gt;

&lt;p&gt;The real architecture question is: how does the device activate, switch profiles, recover from bad configuration, come back after long offline periods, and prove that a regional network combination was validated before mass production?&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical selection flow
&lt;/h2&gt;

&lt;p&gt;The order matters more than the criteria themselves:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define the device operating conditions&lt;/strong&gt; — installation environment, mobility, payload size, reporting cadence, FOTA frequency, service life.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify country and operator coverage&lt;/strong&gt; — not a global map, but the specific cities and installations you will ship to.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify module-level certification&lt;/strong&gt; — for the exact module SKU, bands, VoLTE behavior, PSM/eDRX support, and any Cat-1bis restrictions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run a field pilot&lt;/strong&gt; — RSSI, RSRP, RSRQ, SINR, registration time, attach failure rate, measured business-cycle power.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Then lock module and SIM/eSIM strategy.&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This flow deliberately places country coverage and operator certification before BOM lock. If target markets do not have reliable LTE-M coverage, LTE-M's theoretical advantages do not help. If NB-IoT coverage is strong but the device moves or needs frequent FOTA, lifecycle cost will rise. If Cat-1bis is affordable but certification is restricted in the target region, production timing can still fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Typical choices by scenario
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;First technology to evaluate&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;th&gt;Must validate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Underground water or gas meter&lt;/td&gt;
&lt;td&gt;NB-IoT&lt;/td&gt;
&lt;td&gt;Small payload, low frequency, deep coverage, fixed installation&lt;/td&gt;
&lt;td&gt;Deep indoor coverage, reporting interval, service cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-city asset tracker&lt;/td&gt;
&lt;td&gt;LTE-M or Cat-1bis&lt;/td&gt;
&lt;td&gt;Mobility, location, roaming, more reliable state updates&lt;/td&gt;
&lt;td&gt;Route coverage, registration time, SIM strategy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cold-chain controller for export markets&lt;/td&gt;
&lt;td&gt;LTE-M&lt;/td&gt;
&lt;td&gt;Balance of low power, alarm latency, periodic reporting, moderate data&lt;/td&gt;
&lt;td&gt;Cold-room RF, alarm latency, FOTA window&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;POS or vending machine&lt;/td&gt;
&lt;td&gt;Cat-1bis&lt;/td&gt;
&lt;td&gt;Lower latency, transaction confirmation, higher data rate, LTE coverage&lt;/td&gt;
&lt;td&gt;Operator certification, payment reliability, antenna placement&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fixed environmental monitor&lt;/td&gt;
&lt;td&gt;NB-IoT or LTE-M&lt;/td&gt;
&lt;td&gt;Depends on reporting frequency, coverage, FOTA needs&lt;/td&gt;
&lt;td&gt;Local coverage, firmware package size, power model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lightweight edge AI terminal&lt;/td&gt;
&lt;td&gt;Cat-1bis&lt;/td&gt;
&lt;td&gt;Logs, events, configuration, model parameters need more throughput&lt;/td&gt;
&lt;td&gt;Monthly traffic, weak coverage, FOTA strategy&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This table is not a substitute for field testing. It helps teams remove obviously poor options and focus validation budget on the combinations most likely to survive production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  "NB-IoT is lowest power, so every battery device should use it"
&lt;/h3&gt;

&lt;p&gt;That is only true when the device is static, sends small infrequent payloads, has stable coverage, and can use the network's low-power features. Moving devices, frequently reporting devices, and devices that need FOTA may spend more energy searching, retrying, staying online, or waiting for upgrades.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Cat-1bis uses LTE, so it is always the safest option"
&lt;/h3&gt;

&lt;p&gt;Cat-1bis has real strengths in LTE reach and data rate, but its single receive chain can reduce receive sensitivity compared with traditional Cat 1, and deep-coverage scenarios may still favor LPWA. Operator certification and feature restrictions also vary by region.&lt;/p&gt;

&lt;h3&gt;
  
  
  "LTE-M is just the middle ground between NB-IoT and Cat-1bis"
&lt;/h3&gt;

&lt;p&gt;LTE-M is not merely a compromise. It is a better fit when mobility, moderate data, and low-power operation need to coexist. For asset tracking, alarms, medical wearables, and sensors that need OTA, LTE-M may be the more natural choice. But if LTE-M is not deployed or certified in the target market, it cannot be forced into the product.&lt;/p&gt;

&lt;h3&gt;
  
  
  "Global bands mean global deployment"
&lt;/h3&gt;

&lt;p&gt;A module datasheet can prove that a device might work. It cannot prove that the fleet can be operated. Global execution also depends on operator networks, certification, roaming, SIM/eSIM profiles, antenna design, power behavior, and support workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimum validation checklist before production
&lt;/h2&gt;

&lt;p&gt;Before locking the cellular technology and module, complete at least these checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Target-country and target-city LTE-M / NB-IoT / LTE coverage review.&lt;/li&gt;
&lt;li&gt;Operator certification for the exact module, bands, VoLTE behavior, PSM / eDRX, and Cat-1bis restrictions.&lt;/li&gt;
&lt;li&gt;Real installation testing for RSSI, RSRP, RSRQ, SINR, registration time, and attach failure rate.&lt;/li&gt;
&lt;li&gt;Full-device power testing across the business reporting cycle, not only module sleep current.&lt;/li&gt;
&lt;li&gt;FOTA or configuration-package download time, failure recovery, and data cost.&lt;/li&gt;
&lt;li&gt;SIM/eSIM profile switching, offline recovery, and remote suspend / resume flows.&lt;/li&gt;
&lt;li&gt;Cross-border or multi-operator testing for network search, roaming, and re-registration power.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these checks are missing, do not let BOM price become the final decision. The cost of truck rolls, replacements, support cases, and customer downtime after connectivity failure is usually much higher than the module price difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Choosing between LTE-M, NB-IoT, and Cat-1bis is a tradeoff across coverage, power, mobility, data rate, FOTA, certification, and global operations. NB-IoT is strongest for static, small-payload, deep-coverage devices. LTE-M is strongest when mobility and low power need to coexist. Cat-1bis is strongest when higher throughput, broad LTE availability, and multi-region execution matter more than the absolute lowest power.&lt;/p&gt;

&lt;p&gt;For global IoT rollouts, the safest sequence is: define the device operating conditions, verify network and certification by country and operator, run a small field pilot, and only then lock the module and SIM/eSIM strategy. Do not buy the cheapest module first and let the entire product lifecycle absorb the cost of a wrong connectivity decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GSMA Mobile IoT Deployment Map&lt;/li&gt;
&lt;li&gt;GSMA eSIM Consumer and IoT Specifications&lt;/li&gt;
&lt;li&gt;u-blox LTE-M Technology Overview&lt;/li&gt;
&lt;li&gt;u-blox Narrowband IoT Overview&lt;/li&gt;
&lt;li&gt;u-blox LTE Cat 1 and Cat 1bis Overview&lt;/li&gt;
&lt;li&gt;Qualcomm: Understanding the Benefits of LTE Cat 1bis Technology&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>iot</category>
      <category>lte</category>
      <category>architecture</category>
      <category>linux</category>
    </item>
    <item>
      <title>RK3566 as a Lightweight AIoT Gateway: Real Workloads, Real Ceilings</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 01 Dec 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/rk3566-as-a-lightweight-aiot-gateway-real-workloads-real-ceilings-5739</link>
      <guid>https://dev.to/zediot/rk3566-as-a-lightweight-aiot-gateway-real-workloads-real-ceilings-5739</guid>
      <description>&lt;p&gt;An RK3566 box may boot Linux, connect a few devices, and run an inference demo without being ready to serve as a production edge node. The real question is not whether each function can run in isolation. It is whether collection, inference, rules, storage, and uplink can run together during a business peak while the critical path still meets its deadline.&lt;/p&gt;

&lt;p&gt;The node must also degrade predictably when a process or peripheral fails, recover without a technician standing beside it, and retain enough evidence to explain the event.&lt;/p&gt;

&lt;p&gt;RK3566 is often a sensible cost-and-capability starting point for rules, protocol aggregation, low-frequency event recognition, and voice-command assistance. That conclusion holds only when the team defines the deadline, resource ceiling, and failure consequence for each task, then tests the target image, peripherals, and network for sustained periods.&lt;/p&gt;

&lt;p&gt;If the project requires continuous multi-stream video inference, several large models, heavy local analytics, or a latency spike can stop a production line, neither "1 TOPS" nor a smooth five-minute demo is sufficient selection evidence.&lt;/p&gt;

&lt;p&gt;Rockchip's official RK3566 material lists a quad-core Cortex-A55 CPU, Mali-G52 GPU, 1 TOPS NPU, media engines, and high-speed interfaces. Those identify available building blocks. They do not prove a target model's frame rate, the stability of a particular peripheral combination, or 24/7 thermal behavior. The boundaries below are an acceptance method, not an untested product-performance promise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Business deadlines and headroom define a lightweight workload
&lt;/h2&gt;

&lt;p&gt;A rules engine sounds lighter than computer vision. Yet a rules process that receives thousands of property changes per second, writes each change to a database, and executes a script for every event can saturate CPU, storage I/O, and locks before an event-triggered image classifier does. A model may be relatively large but run only after a door sensor requests a single-frame inspection. Classifying tasks as "rules," "vision," or "voice" hides the scheduling pattern that determines whether the system remains stable.&lt;/p&gt;

&lt;p&gt;A more useful definition is operational. A lightweight edge workload has a known arrival rate and completion deadline, leaves headroom during normal operation, survives short bursts without delaying the critical path, allows noncritical functions to be throttled, and returns to a healthy state after the burst. "Lightweight" describes the envelope of the complete workload rather than the name of an algorithm or protocol. If one of those conditions cannot be maintained, the workload should be split or moved to a more capable platform.&lt;/p&gt;

&lt;p&gt;Consider an energy gateway for a chain store. Meters and refrigeration controllers may be summarized every few seconds or minutes. Alarm evaluation might need to finish within seconds, while report synchronization can wait. That workload tolerates batching, local buffering, and staggered uploads, so the system can preserve predictable headroom.&lt;/p&gt;

&lt;p&gt;If the same box must also decode several video streams, run continuous detection, and drive a local dashboard, network traffic, memory bandwidth, and heat become shared constraints. Continuing to call the result a lightweight gateway would misrepresent both the purchasing specification and the delivery responsibility.&lt;/p&gt;

&lt;p&gt;The project should therefore define business deadlines before comparing processor specifications. A safety-related interlock that must respond in 100 milliseconds cannot share the same scheduling assumptions as a cloud synchronization task that can wait 30 seconds, even if the payload size is identical. The first path needs explicit priority, execution budgets, and failure protection. The second can yield. Average CPU utilization alone cannot prove this separation; the acceptance record needs critical-path P95/P99 latency, queue growth, expiration, and drop counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four resource chains form the gateway capacity architecture
&lt;/h2&gt;

&lt;p&gt;RK3566 exposes CPU, GPU/NPU, memory, storage, and multiple I/O options, but they are not independent capacity boxes. Camera capture consumes memory bandwidth. Image preparation uses CPU or GPU. NPU inference still requires data movement and post-processing. Logging and a local database contend for storage. Estimating visual capacity from NPU TOPS alone ignores the earlier bottlenecks in the end-to-end chain.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Chain&lt;/th&gt;
&lt;th&gt;What it holds&lt;/th&gt;
&lt;th&gt;What it contends against&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Business control&lt;/td&gt;
&lt;td&gt;Protocol parsing, rules, state machines, local actions&lt;/td&gt;
&lt;td&gt;Image decode, log compression, software updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inference&lt;/td&gt;
&lt;td&gt;Capture, decode, preprocess, NPU, post-process, confirm&lt;/td&gt;
&lt;td&gt;Memory bandwidth, CPU preprocessing, every other chain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory and storage&lt;/td&gt;
&lt;td&gt;OS, containers, caches, queues, frame buffers, temp files&lt;/td&gt;
&lt;td&gt;Frame bursts, log surges, media retention, update downloads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Device and network I/O&lt;/td&gt;
&lt;td&gt;UART, USB, Ethernet, Wi-Fi, optional ZigBee&lt;/td&gt;
&lt;td&gt;Driver versions, USB power budget, radio interference, offline buffering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The first chain is business control. Protocol parsing, rules, state machines, and local actions are mainly CPU-bound and require predictable latency. They may not keep all cores busy, but image decoding, log compression, or a software update must not starve them. A sound design assigns a priority and execution budget to critical control work, moves bulk synchronization and report generation into deferrable queues, and sheds noncritical load when queue depth crosses a stop line.&lt;/p&gt;

&lt;p&gt;The second chain is inference. Rockchip's 1 TOPS figure identifies an advertised NPU class; it does not convert directly into a frame-rate promise for a target model. Model architecture, quantization, input size, operator support, preprocessing, post-processing, and runtime versions all change the result.&lt;/p&gt;

&lt;p&gt;RK3566 may have ample room for low-frequency, event-triggered classification or detection. Continuous video requires separate measurements for capture, decode, preprocessing, inference, post-processing, and business confirmation. Reporting only kernel inference time hides much of the latency users experience.&lt;/p&gt;

&lt;p&gt;The third chain is memory and storage. Memory holds more than the model: the operating system, containers, caches, message queues, frame buffers, and temporary files compete for it. A short average may look safe while a frame burst or log surge triggers reclaim, swapping, or an out-of-memory kill. Storage capacity is not enough either. Database writes, media retention, and update downloads contend for I/O and affect media life. Acceptance should observe available memory, write latency, and storage growth in steady state, at peak, and during recovery.&lt;/p&gt;

&lt;p&gt;The fourth chain is device and network I/O. A listed UART, USB, Ethernet, Wi-Fi, or ZigBee path does not prove that the target peripheral set is compatible. Driver versions, USB power, serial electrical layers, radio interference, cabling, and offline buffering all affect delivery.&lt;/p&gt;

&lt;p&gt;These chains must appear on the same capacity map. If protocol backlog makes inference input stale, or media retention prevents control logs from being written, every component-level benchmark may pass while the system fails. Capability proof is not a collection of successful module demonstrations. It shows which task keeps priority, which task yields, and which condition stops the workload when modules contend.&lt;/p&gt;

&lt;p&gt;A workload occupies a deployable region only while the business deadline and resource levels remain valid together. Crossing a stop line must invoke an agreed throttle, degradation, or split; allowing backlog to grow until the node stops responding is not a capacity policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where rules, event recognition, and voice assistance fit
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Protocol aggregation deployment starts with priority
&lt;/h3&gt;

&lt;p&gt;Rules and protocol aggregation are among the easiest workloads to make predictable on an RK3566 gateway. Typical duties include protocol conversion, property normalization, local threshold evaluation, offline buffering, and batched uplink. They have a natural priority order: collection and safety-related actions first, cloud synchronization and history replay later. Once drivers and protocol adapters are qualified, throughput, queue depth, processing latency, and reconnect recovery can quantify capacity instead of relying on perception.&lt;/p&gt;

&lt;h3&gt;
  
  
  Event triggers change how vision is implemented
&lt;/h3&gt;

&lt;p&gt;Low-frequency event vision can also fit. A door contact, motion sensor, or business transaction can trigger image capture; the box processes one frame or a short sequence and uploads a structured result. Changing "watch continuously" into "work on an event" reduces sustained decode, memory, and NPU pressure. If missing an event carries a significant cost, however, the system must retain the source event, model version, and confidence. Saving only the final label makes a false result difficult to investigate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Voice and local UI share the same capacity budget
&lt;/h3&gt;

&lt;p&gt;Voice assistance can serve as a command entry, keyword detector, or occasional transcription path. It should not be marketed by default as an unlimited, multi-channel real-time speech server. Microphone arrays, echo cancellation, noise reduction, VAD, ASR, and intent handling are separate stages. A delay or failure in any stage changes the experience. A quiet-room demonstration does not cover field noise, far-field capture, connectivity loss, or the resource pattern of a long conversation.&lt;/p&gt;

&lt;p&gt;A lightweight local interface may coexist with these tasks, but browser engines, chart queries, and video previews belong in the same budget. An idle maintenance page may consume little; loading a large history window can create CPU and memory spikes. If the interface is only a service entry point, reduce refresh rates and cap query windows. If it is a continuously visible business display, test it as part of the formal workload rather than treating it as a free accessory.&lt;/p&gt;

&lt;p&gt;What these cases share is not a simple algorithm. They support prioritization. Critical paths have explicit deadlines, secondary paths can buffer, presentation and synchronization can degrade, and failures have compensation paths. If every function receives highest priority or all features must run at peak rate simultaneously, architecture cannot establish that RK3566 is enough. Only a complete stress test or a platform upgrade can resolve the question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sustained load exposes three errors hidden by a demo
&lt;/h2&gt;

&lt;p&gt;The first error is assuming that low average utilization means spare capacity. A demo often runs for minutes, before caches grow, logs rotate, connection retries accumulate, or thermal behavior stabilizes. After hours or days, fragmentation, queue growth, temporary files, retry storms, and thermal throttling may emerge. Averages erase those peaks, while business failures occur precisely during them.&lt;/p&gt;

&lt;p&gt;The second error is treating a running model as a completed inference pipeline. NPU execution proves that conversion and operators are broadly compatible. The product still must capture audio or video, convert formats, preprocess inputs, post-process outputs, debounce results, and commit a business action. If the input is already stale or the database blocks confirmation, good NPU latency does not produce a timely business decision.&lt;/p&gt;

&lt;p&gt;The third error is calling a system recoverable because a power cycle works. Manual reboot covers the simplest recovery path. Field failures are more selective: a single process stalls, a USB device disappears, a network link flaps, storage fills, a model file is corrupted, or an update is interrupted. The node must distinguish process restart, feature degradation, and full reboot, then reconcile any data gap. Blind automatic reboot can hide a recurring fault instead of resolving it.&lt;/p&gt;

&lt;p&gt;A sustained test should not be a peak benchmark only. Reproduce the arrival pattern: run normal traffic, add a burst, then combine it with an offline interval, log growth, or peripheral reconnect. Observe whether the critical path keeps its deadline. After pressure clears, verify that queues shrink, memory returns, missing uploads are replayed, and alerts explain what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Acceptance depends on levels, yielding order, and recovery evidence
&lt;/h2&gt;

&lt;p&gt;Freeze the input before testing. Record the system image, kernel and drivers, model and runtime, process or container versions, device list, network conditions, event rates, and ambient temperature. Without those conditions, a changed result cannot be explained and a lab result cannot be reproduced at a customer site.&lt;/p&gt;

&lt;p&gt;Define green, yellow, and red resource levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Green&lt;/strong&gt; — normal business runs for the required duration with meaningful headroom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Yellow&lt;/strong&gt; — a bounded burst where media retention, dashboard refresh, or cloud replay must be throttled.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Red&lt;/strong&gt; — a critical deadline is broken, a queue grows continuously, or memory and temperature approach a stop line; the node must reject new noncritical work or enter a safe mode.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact percentages are not universal and should be selected from the target workload and failure consequence.&lt;/p&gt;

&lt;p&gt;Every level needs an action. When CPU or memory enters yellow, specify what pauses first. After connectivity returns, decide whether real-time messages or historical replay has priority. When the NPU queue grows, choose among reducing sampling, dropping expired inputs, or switching to a smaller model. When storage approaches the ceiling, define which media may be removed and which audit trail must remain. If these choices are not made before launch, pressure will cause the system to sacrifice business functions accidentally.&lt;/p&gt;

&lt;p&gt;The recovery loop answers four questions: Was the fault detected? Did degradation activate within the allowed time? Did critical business continue? Did the system reconcile data and return to green afterward? A successful reboot is not a substitute. The acceptance record should correlate fault injection time, alert time, action time, recovery time, and data gap in one event trace. That evidence distinguishes automatic recovery from a test operator rescuing the node manually.&lt;/p&gt;

&lt;h3&gt;
  
  
  Observability must explain a recovery, not only display averages
&lt;/h3&gt;

&lt;p&gt;CPU, memory, and temperature curves show that resources changed, but they do not prove whether business was harmed. Logs and metrics also need to identify the task, input batch, queue, degradation action, and recovery result. Otherwise, a dashboard may report "healthy" because a process restarted while business data is still missing. For a fleet, reconstructing one remote event trace is usually more useful than retaining many context-free averages.&lt;/p&gt;

&lt;p&gt;For a cost-sensitive RK3566 node, headroom is more valuable than the highest short-lived score. Saving one hardware tier can be a false economy if it creates frequent site visits, blocks updates, or requires retuning whenever traffic grows. Conversely, a lower-power platform can become a reliable deployment unit when its yellow-level yielding order is explicit, its critical path stays stable, and its recovery loop is repeatable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Projects that should stop adding work to RK3566
&lt;/h2&gt;

&lt;p&gt;The first stop line is the inability to isolate critical and noncritical work. If a report query, model update, or media upload causes device-control latency to miss its deadline, reducing log volume or tuning a thread can only mask the architectural conflict. Split compute-intensive work into another node or select a platform with more resources and suitable interfaces.&lt;/p&gt;

&lt;p&gt;The second stop line is continuous multi-stream high-resolution video or several large models. Bottlenecks may occur concurrently in decode, memory bandwidth, NPU, post-processing, and cooling. Reducing one input size may not restore a sustainable margin. If the business also requires high frame rates, low latency, and continuous operation, evaluate RK3588, Jetson, x86 GPU, or a dedicated accelerator and include their power, cost, and software-maintenance tradeoffs.&lt;/p&gt;

&lt;p&gt;The third stop line is a field interface or reliability requirement outside the tested board-level product. Isolation, CAN, dual Ethernet, cellular connectivity, wide temperature, dust, vibration, or certification cannot be inferred from the SoC peripheral list. If many USB adapters and external power supplies are needed to assemble the required interfaces, added failure points may erase the box's cost advantage.&lt;/p&gt;

&lt;p&gt;The fourth stop line is incomplete operational ownership. When device count grows, the team must see versions, resource levels, queues, peripheral state, and recent faults remotely, and it needs safe update and rollback. A faster CPU does not fix missing operations. It may encourage more features on the same node and increase the blast radius. Complete device management, logging, alerting, and release governance before deciding that hardware is the limiting factor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final judgment
&lt;/h2&gt;

&lt;p&gt;An RK3566 AIoT gateway is justified when the target workload has a defensible operating envelope: critical deadlines are explicit, CPU, NPU, memory, storage, and I/O retain headroom, noncritical functions have a yielding order, and faults recover automatically with reviewable evidence.&lt;/p&gt;

&lt;p&gt;Rules aggregation, event-triggered recognition, voice assistance, and a controlled local interface can all deliver useful edge intelligence inside that envelope.&lt;/p&gt;

&lt;p&gt;Without frozen test inputs, sustained-load records, and degradation and recovery stop lines, a successful demo proves only that the project deserves a sample test. It does not prove that the design is ready for fleet deployment. Place an RK3566 box in the target chain and test against business deadlines and failure consequences. Adopt it when it stays inside the envelope; split the workload or upgrade when it does not. That judgment is more conservative than comparing TOPS, and much closer to delivery reality.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rockchip RK3566 product page&lt;/li&gt;
&lt;li&gt;Rockchip RK3566 Brief Datasheet&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>iot</category>
      <category>linux</category>
      <category>performance</category>
      <category>architecture</category>
    </item>
    <item>
      <title>ESP32-P4 vs ESP32-S3 for HMI and Vision: Where the Extra Die Actually Pays Off</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/esp32-p4-vs-esp32-s3-for-hmi-and-vision-where-the-extra-die-actually-pays-off-20jg</link>
      <guid>https://dev.to/zediot/esp32-p4-vs-esp32-s3-for-hmi-and-vision-where-the-extra-die-actually-pays-off-20jg</guid>
      <description>&lt;p&gt;Suppose a connected touch controller now needs a MIPI-DSI display and a MIPI-CSI camera. Staying with ESP32-S3 may fail before CPU speed matters: the required physical interfaces are missing. Reverse the situation — a small SPI display, a DVP camera taking occasional pictures, and Wi-Fi upload — and an ESP32-P4 could make the system more complicated because its wireless connection needs another device.&lt;/p&gt;

&lt;p&gt;The right choice starts with the product's connections, not a clock-speed comparison. Fix the display, camera, network, and image output requirements before selecting the MCU. Published specifications can establish whether an interface exists and whether wireless needs a companion. They cannot establish your UI frame rate, recognition latency, whole-device power draw, or bill of materials. Demo numbers from different development boards are not a fair benchmark.&lt;/p&gt;

&lt;h2&gt;
  
  
  The display and camera connectors may settle the question first
&lt;/h2&gt;

&lt;p&gt;If the product already specifies a MIPI-DSI panel or MIPI-CSI sensor, check the relevant controllers and pin assignments in the ESP32-P4 datasheet. P4 also lists an ISP, PPA, JPEG codec, and H.264 encoder. These blocks can form an image path from sensor input to display or encoded output, subject to the actual sensor modes, panel interface, and board design. Their presence alone says nothing about the frame rate you can sustain with your memory layout, drivers, and concurrent tasks.&lt;/p&gt;

&lt;p&gt;The ESP32-S3 datasheet instead lists LCD_CAM and integrated wireless. If the product uses an SPI or parallel LCD and a DVP camera, S3 deserves an early prototype; lacking P4's MIPI blocks does not disqualify it from every HMI or vision application. An easy mistake is choosing a MIPI panel and expecting firmware to connect it to an MCU without the physical controller. A bridge chip changes the power, PCB, software, and cost equation, so it is a different system proposal — not a driver-only fix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Panel size is a poor shortcut
&lt;/h3&gt;

&lt;p&gt;A panel's pressure on the MCU depends on its interface, pixel format, number of frame buffers, and refresh behavior. Two nominally seven-inch displays may have different connectors and timing. Even at the same 800 × 480 resolution, a mostly static status screen and a live camera preview impose different bandwidth and buffering demands. Ask the panel supplier for interface and timing details, pixel format, touch interface, and initialization information before making a resource budget.&lt;/p&gt;

&lt;p&gt;For a few status pages, touch menus, and network control, start with the target S3 module and target panel. If MIPI-DSI and a live preview or complex composition are fixed requirements, P4's peripheral set fits the problem more directly. That is not a promise of smooth animation. Frame-buffer placement and refresh strategy still need target-panel measurements; total PSRAM capacity is not the whole display budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  A snapshot camera and a continuous preview are different products
&lt;/h2&gt;

&lt;p&gt;Capturing an occasional frame, compressing it as JPEG, and uploading it is not the same workload as previewing continuously, detecting an object, and drawing the result locally. The first case needs a sensor-format check, capture-time memory peak, and network retry behavior. The second also needs buffer ownership, image conversion, display synchronization, and queue-delay control. A feature list that simply says "camera" hides these differences.&lt;/p&gt;

&lt;p&gt;Espressif's video-component selection guide separates choices by sensor output, camera interface, and encoding requirements. It distinguishes P4's MIPI, ISP, and hardware H.264 path from S3-compatible camera paths such as DVP. A MIPI sensor or a requirement for on-device H.264 encoding makes P4 the platform to validate first. If the actual sensor and output format fit an S3 path, P4's broader specification is not a reason to skip the S3 prototype.&lt;/p&gt;

&lt;p&gt;Capturing a frame is also not the same as delivering timely video. Per-frame storage grows with pixel count. Multiple buffers, format conversion, and display copies can push real memory use well above the size of one raw frame. When the network slows, queued frames may grow stale even while the display appears to refresh. Measure capture-to-visible-output delay, dropped frames, and queue depth rather than relying on an instantaneous driver FPS printout.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edge vision needs a model-level test, not a CPU-frequency guess
&lt;/h3&gt;

&lt;p&gt;P4's image peripherals may remove friction from some input and processing steps, but model deployment also depends on the runtime, operators, quantization format, working memory, and preprocessing. S3 can run image tasks that fit its resources. A higher P4 CPU clock is not evidence that the same model will deliver a particular end-to-end result in two finished products.&lt;/p&gt;

&lt;p&gt;If the product requirement is "show a warning within 300 ms of a person appearing," measure the path from a usable frame through conversion, inference, post-processing, and screen update. Keep tail latency and error examples, not just the average inference time. Without target-board records, the defensible conclusion is about different interfaces and peripherals — not that one board runs a given model a certain percentage faster.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wireless turns the P4 option into a system design
&lt;/h2&gt;

&lt;p&gt;S3 integrates 2.4 GHz Wi-Fi and Bluetooth LE. If provisioning, cloud control, and wireless telemetry are core requirements while the panel and camera fit S3's interfaces, a single-module design can avoid one inter-chip protocol and a second firmware lifecycle. This is an architectural advantage, not proof of a lower BOM: module SKU, peripheral count, antenna placement, and certification scope still affect the final design.&lt;/p&gt;

&lt;p&gt;P4 does not integrate Wi-Fi or Bluetooth. The official ESP32-P4 Function EV Board uses an ESP32-C6-MINI-1 module for wireless communication. That development board is an architectural example, not a production-circuit qualification. A custom product still has to choose the inter-chip interface, update both firmwares, recover from resets and link failures, store network credentials appropriately, and decide what the wireless side does when the P4 restarts.&lt;/p&gt;

&lt;p&gt;The split can be worthwhile in a multimedia terminal: P4 handles camera, display, and image work while another device handles networking. For a simple menu and telemetry product, the extra chip can instead complicate debugging, updates, and field support. Do not compare a bare P4 chip price with an S3 module price. Include the wireless module, routing and power, antenna design, production test, and long-term dual-firmware maintenance in the same estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put three requirement sets through the same decision process
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Fixed product requirement&lt;/th&gt;
&lt;th&gt;Platform to prototype first&lt;/th&gt;
&lt;th&gt;What the prototype must still establish&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Compact control panel, SPI or parallel LCD, integrated wireless, occasional DVP capture with YUV/RGB/JPEG output, no local ISP requirement&lt;/td&gt;
&lt;td&gt;Target ESP32-S3 module&lt;/td&gt;
&lt;td&gt;Panel and sensor drivers, shared-memory peak, UI response while connected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fixed MIPI-DSI panel and MIPI-CSI camera with continuous preview, processing, or on-device encoding&lt;/td&gt;
&lt;td&gt;ESP32-P4 plus a separate wireless design&lt;/td&gt;
&lt;td&gt;Board-level sensor/panel compatibility, buffers, end-to-end latency, dual-chip update behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Interfaces can still change and the product requirement is unsettled&lt;/td&gt;
&lt;td&gt;Minimal prototypes on both platforms&lt;/td&gt;
&lt;td&gt;Compare the same business path rather than default development-board accessories&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is a prototype order, not a purchasing verdict. For the third row, write a one-page testable requirement first: display resolution and refresh target, camera mode, whether local encoding is needed, vision output action, network concurrency, and active/standby power limits. Without those inputs, "which MCU is stronger?" invites an answer based on irrelevant specifications.&lt;/p&gt;

&lt;p&gt;The first screening step is narrow: interfaces and local video-processing needs can rule out a platform before a speed comparison. If both can meet the requirements, the full system still needs matched-workload tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the preliminary choice on the same workload
&lt;/h3&gt;

&lt;p&gt;Record chip revision, module or board SKU, flash and PSRAM configuration, panel and sensor part numbers, and firmware/component versions for each prototype. Then run the same product action and measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Boot-to-interaction time&lt;/li&gt;
&lt;li&gt;Display and touch response&lt;/li&gt;
&lt;li&gt;Capture-to-display or capture-to-event tail latency&lt;/li&gt;
&lt;li&gt;Peak memory and largest available block&lt;/li&gt;
&lt;li&gt;Behavior under network congestion&lt;/li&gt;
&lt;li&gt;Active and standby power&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a model is involved, retain its file, quantization configuration, and error examples. Leave unmeasured cells blank rather than filling them with marketing figures from a development-board demo.&lt;/p&gt;

&lt;p&gt;Compare costs on equal boundaries. Count the S3 target module and its peripherals; count P4, external wireless, required storage and power, PCB implications, and production steps. On the software side, assign ongoing responsibility for panel, camera, wireless, model, and OTA maintenance. The result may not prove which option is "always cheaper," but it will separate observed differences from estimates.&lt;/p&gt;

&lt;p&gt;There is a useful stop rule: if a required physical interface already excludes one platform, stop comparing CPU clocks. If both platforms can connect the product's I/O, prototype the same business path before pricing wireless integration and maintenance. The right P4-versus-S3 choice follows the product's inputs, outputs, and division of work — not the larger number in a part name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources and limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Espressif: ESP32-P4 Series Datasheet&lt;/li&gt;
&lt;li&gt;Espressif: ESP32-S3 Series Datasheet&lt;/li&gt;
&lt;li&gt;Espressif: ESP32-P4 Function EV Board User Guide&lt;/li&gt;
&lt;li&gt;Espressif: ESP Video Components Technology Selection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These sources establish public interface specifications and the architecture of an official development board. They do not supply matched target-board measurements for FPS, power, cost, or production stability; those conclusions remain open until prototypes supply them.&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>iot</category>
      <category>performance</category>
      <category>computervision</category>
    </item>
    <item>
      <title>Benchmarking Edge LLMs: TTFT, TPOT, Memory, and Power — Which One You Should Actually Optimize</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 24 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/benchmarking-edge-llms-ttft-tpot-memory-and-power-which-one-you-should-actually-optimize-3f96</link>
      <guid>https://dev.to/zediot/benchmarking-edge-llms-ttft-tpot-memory-and-power-which-one-you-should-actually-optimize-3f96</guid>
      <description>&lt;p&gt;A single "tokens per second" number can look healthy while the product feels sluggish. The four metrics that matter measure different parts of the path, and optimizing the wrong one buys you nothing a user can feel.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate the wait from the stream
&lt;/h2&gt;

&lt;h3&gt;
  
  
  First-token latency has a measurement boundary
&lt;/h3&gt;

&lt;p&gt;After someone submits a query, the application may queue the request, retrieve material, assemble the prompt, tokenize it, process the input, and only then produce a first token. In this article, client TTFT is the interval from the client sending the request to the client receiving its first non-empty content token. If the product has a display, record when the first character has actually rendered as a separate first-visible metric. Receiving a token and showing it are not the same event.&lt;/p&gt;

&lt;p&gt;A timestamp inside the model covers only part of this path. It does not by itself include retrieval, queuing, transport, or rendering. Label every TTFT with the location of its start and end timestamps. Otherwise one team may report model prefill time while another reports the user's wait, and both spreadsheets will use the same column name.&lt;/p&gt;

&lt;p&gt;TPOT, or time per output token, describes the intervals after the first token. A long response can have an acceptable first-token time yet stall repeatedly; a fast decoding engine can still leave the user waiting at the start. Keep TTFT, subsequent-token pace, and complete-request latency separate. Preserve individual requests, not just their average.&lt;/p&gt;

&lt;h3&gt;
  
  
  What matters depends on the job
&lt;/h3&gt;

&lt;p&gt;For a short device-status answer, first-token wait and the rate of failed short requests may dominate. For an assistant that walks a technician through a repair, later-token pacing and the quality of a long answer matter as well. Record the actual task, intended output length, and acceptable wait before choosing thresholds. A TTFT target copied from another product cannot account for your retrieval step, interface, or input length.&lt;/p&gt;

&lt;p&gt;If two configurations have similar decoding throughput, the one that reloads the model for every request can still feel much slower. Conversely, a prompt-cache hit may make a benchmark look excellent while ordinary uncached requests perform poorly. Test both situations and identify which one the product will actually encounter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Freeze a workload that another engineer can repeat
&lt;/h2&gt;

&lt;p&gt;Record the exact model artifact and hash, quantization format, runtime build, accelerator backend, operating-system image, driver, power mode, and enclosure. A model-family label such as "7B" is not enough. Context length, KV-cache format, offload split, batching, and sampling configuration can all change the memory and timing result. If any of these change, start a new run ID rather than blending its samples into the old average.&lt;/p&gt;

&lt;p&gt;Use the same versioned prompt set on every candidate. Include the product's ordinary short interaction, a longer troubleshooting question, and an input near its permitted upper range. "Short" and "long" should be defined by your own request distribution, not a universal 512- or 4096-token rule. Store actual input and output token counts; a response that stops after ten tokens should not be compared with a 300-token answer using total latency alone.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;Record it as&lt;/th&gt;
&lt;th&gt;Error if omitted&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model and software&lt;/td&gt;
&lt;td&gt;Artifact hash, quantization, runtime/backend versions&lt;/td&gt;
&lt;td&gt;A software or quality change looks like a hardware win&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request shape&lt;/td&gt;
&lt;td&gt;Prompt-set version, input/output tokens, context limit, cache state&lt;/td&gt;
&lt;td&gt;A short-prompt result is applied to long-document use&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Load&lt;/td&gt;
&lt;td&gt;Sessions, target concurrency, display or acquisition tasks&lt;/td&gt;
&lt;td&gt;Resource contention disappears from the test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment&lt;/td&gt;
&lt;td&gt;Supply, enclosure, ambient temperature, cooling, power mode&lt;/td&gt;
&lt;td&gt;An open board stands in for the packaged device&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The smallest useful test matrix has several distinct jobs. Run every group repeatedly with the same model and prompt-set version; count successful and failed requests together. Substitute a real background task for the example display task if the product has no display. Do not invent a workload simply to fill a row.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Group&lt;/th&gt;
&lt;th&gt;Start and request&lt;/th&gt;
&lt;th&gt;Parallel condition&lt;/th&gt;
&lt;th&gt;Question it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A: first use&lt;/td&gt;
&lt;td&gt;Cold start, short input, one session&lt;/td&gt;
&lt;td&gt;Normal resident services&lt;/td&gt;
&lt;td&gt;Is loading part of the first user's wait?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;B: common use&lt;/td&gt;
&lt;td&gt;Warm model, short input, one session&lt;/td&gt;
&lt;td&gt;Same as A&lt;/td&gt;
&lt;td&gt;What are normal TTFT and TPOT distributions?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C: upper input&lt;/td&gt;
&lt;td&gt;Warm model, business-length long input&lt;/td&gt;
&lt;td&gt;Same as A&lt;/td&gt;
&lt;td&gt;Do prefill and memory degrade with context?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;D: shared device&lt;/td&gt;
&lt;td&gt;Mixed short/long prompts at target concurrency&lt;/td&gt;
&lt;td&gt;Real display, capture, or network work&lt;/td&gt;
&lt;td&gt;Does queuing or tail latency rise?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;E: sustained use&lt;/td&gt;
&lt;td&gt;Repeat B–D inside the target enclosure&lt;/td&gt;
&lt;td&gt;Target power and ambient conditions&lt;/td&gt;
&lt;td&gt;Does the result drift after thermal stabilization?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is a protocol to fill in, not a claim that five rows automatically qualify a device. The team must set actual lengths, repetitions, duration, and pass criteria before the run. Lowering the target after observing failures would turn an acceptance test into a demonstration.&lt;/p&gt;

&lt;p&gt;Begin with the system at a documented idle state. Confirm that a background download or build is not consuming resources. Run a short request first to verify that client and server events can be correlated; then increase input length and concurrency. Retain the prompt length and system events for failed requests. Finally restart the model process so the cold-start path is not accidentally mixed with warm requests. If a result looks unusual, reproduce it under the original conditions before changing one variable at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the tool for the layer being measured
&lt;/h2&gt;

&lt;h3&gt;
  
  
  llama-bench can isolate engine behavior
&lt;/h3&gt;

&lt;p&gt;The official llama.cpp &lt;code&gt;llama-bench&lt;/code&gt; distinguishes prompt processing, text generation, and a combined run. It supports repeated measurements and machine-readable output. This makes it useful for checking whether a change affects input processing or decoding on the same device. Its documentation also says that its timings exclude tokenization and sampling. Calling its prompt-processing time "user TTFT," or its generation throughput "application throughput," would claim more than the tool measures. Keep the command, output, executable build, model hash, system state, and per-run results.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# isolate prefill vs decode, with repeats for variance&lt;/span&gt;
llama-bench &lt;span class="nt"&gt;-m&lt;/span&gt; model-Q4_K_M.gguf &lt;span class="nt"&gt;-p&lt;/span&gt; 512 &lt;span class="nt"&gt;-n&lt;/span&gt; 128 &lt;span class="nt"&gt;-r&lt;/span&gt; 5 &lt;span class="nt"&gt;-o&lt;/span&gt; json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not crown a winner when a configuration's apparent advantage is smaller than the variation between repeated runs. Check frequency, background activity, and thermal state, then repeat. Engine tests help locate a slow phase; they do not tell you whether a document retriever, transport path, or user interface is responsible for the visible delay.&lt;/p&gt;

&lt;h3&gt;
  
  
  The server and the real client answer different questions
&lt;/h3&gt;

&lt;p&gt;If the product exposes &lt;code&gt;llama-server&lt;/code&gt;, measure the same prompt set at the server layer. Its official speed-bench is primarily designed for speculative-decoding comparisons. It can also save configuration, completed and failed samples, request latency, and server prompt/predicted-token rates as JSON. That is useful evidence about the server setup, but it is not a universal edge-device benchmark or a substitute for the application client.&lt;/p&gt;

&lt;p&gt;At the outside edge, instrument the real client with timestamps from one monotonic clock: request sent, first non-empty content token received, and last content token received. Record the first rendered character separately if there is a UI. Keep errors and cancellations. An entirely local UI should be measured along its local path; adding an HTTP server only to fit a benchmark would change the system under test. Engine, server, and client numbers are complementary diagnostic views, not interchangeable values that can be placed in one unlabeled TTFT column.&lt;/p&gt;

&lt;h2&gt;
  
  
  Look at memory and energy on the whole product
&lt;/h2&gt;

&lt;p&gt;The model file is not the peak memory footprint. Weights sit alongside a KV cache, runtime workspace, operating system, other resident services, and possibly additional sessions. Record process RSS, system-available memory, swap or OOM events, and the memory used by actual display or capture work. With memory-mapped or shared pages, one process's RSS is not the exclusive whole-device cost; use a consistent collection method and cross-check against system memory and failures.&lt;/p&gt;

&lt;p&gt;A short run proves that a configuration can start, not that it can serve all day. Design a sustained period around the real product duty cycle. Thirty minutes is a reasonable starting observation window, but it is neither a measured result nor a universal pass threshold. In the target enclosure, supply, ambient temperature, and concurrent workload, record frequency, temperature, TTFT, TPOT, memory, and failures throughout. A board that performs well for five minutes but slows as it heats up should not be sold on its cold-run tokens/s number.&lt;/p&gt;

&lt;p&gt;State where power was measured. Chip TDP, an adapter's rated wattage, and measured whole-system wall power are different quantities. A battery product needs its own power-chain boundary and sampling rate; a comparison between devices needs the same workload and measurement point. The same discipline prevents an internal report from pairing idle watts with full-load tokens/s.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep an acceptance record, not a highlight number
&lt;/h2&gt;

&lt;p&gt;Save raw request-level events and a grouped summary. Each group needs total requests, successes, timeouts, errors, cancellations, TTFT and later-token distributions, complete latency, peak memory, and the thermal state at the beginning and end. A percentile without a sample count is hard to interpret; a p95 computed from a handful of requests is not a stable service claim. Keep the outliers so another engineer can determine whether a long wait came from a queue, a cold model load, or faulty instrumentation.&lt;/p&gt;

&lt;p&gt;The following blank record is a starting point. &lt;code&gt;request_sent_ms&lt;/code&gt;, &lt;code&gt;first_content_ms&lt;/code&gt;, and &lt;code&gt;last_content_ms&lt;/code&gt; must use one client monotonic clock. Client TTFT is the second minus the first; complete latency is the third minus the first. If TPOT is reported as the mean interval between content tokens, divide the time from first to last content token by the number of subsequent token intervals. With fewer than two tokens, report it as unavailable, not zero. If transport coalesces several tokens into one event, client event spacing is not model per-token timing; name the reported metric accordingly.&lt;/p&gt;

&lt;p&gt;The sustained run also needs a time-series file linked by &lt;code&gt;run_id&lt;/code&gt;. Each row should carry a sample time, whole-system watts, temperature, and frequency. Define the measurement point, sampling interval, and steady-state rule before the run; do not select the most favorable window afterward. If an external power meter and the client do not share a monotonic clock, capture synchronization markers and the offset before aligning requests with power and thermal samples.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;run_id&lt;/span&gt;:                &lt;span class="c"&gt;# links to model hash, quantization, runtime, enclosure, power, prompts
&lt;/span&gt;&lt;span class="n"&gt;test_start_utc&lt;/span&gt;:
&lt;span class="n"&gt;telemetry_path&lt;/span&gt;:        &lt;span class="c"&gt;# rows: elapsed_ms, system_power_w, temperature_c, frequency_mhz
&lt;/span&gt;&lt;span class="n"&gt;telemetry_sample_interval_ms&lt;/span&gt;:
&lt;span class="n"&gt;telemetry_clock_alignment&lt;/span&gt;:   &lt;span class="c"&gt;# sync markers/offset to the client monotonic clock
&lt;/span&gt;&lt;span class="n"&gt;system_power_source&lt;/span&gt;:   &lt;span class="c"&gt;# wall / battery / board counter, with actual measurement point
&lt;/span&gt;&lt;span class="n"&gt;steady_window_start_elapsed_ms&lt;/span&gt;:
&lt;span class="n"&gt;steady_window_end_elapsed_ms&lt;/span&gt;:
&lt;span class="n"&gt;steady_window_rule&lt;/span&gt;:

&lt;span class="n"&gt;request_id&lt;/span&gt;:
&lt;span class="n"&gt;group&lt;/span&gt;:                 &lt;span class="c"&gt;# A/B/C/D/E
&lt;/span&gt;&lt;span class="n"&gt;input_tokens&lt;/span&gt;:
&lt;span class="n"&gt;output_tokens&lt;/span&gt;:
&lt;span class="n"&gt;request_sent_ms&lt;/span&gt;:
&lt;span class="n"&gt;first_content_ms&lt;/span&gt;:
&lt;span class="n"&gt;first_visible_ms&lt;/span&gt;:      &lt;span class="c"&gt;# blank without a rendered UI
&lt;/span&gt;&lt;span class="n"&gt;last_content_ms&lt;/span&gt;:
&lt;span class="n"&gt;status&lt;/span&gt;:                &lt;span class="c"&gt;# success / timeout / error / cancelled
&lt;/span&gt;&lt;span class="n"&gt;error_code&lt;/span&gt;:
&lt;span class="n"&gt;peak_process_rss_bytes&lt;/span&gt;:
&lt;span class="n"&gt;system_available_min_bytes&lt;/span&gt;:
&lt;span class="n"&gt;temperature_start_c&lt;/span&gt;:
&lt;span class="n"&gt;temperature_end_c&lt;/span&gt;:
&lt;span class="n"&gt;raw_log_path&lt;/span&gt;:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The failure-rate denominator is every request actually sent. Track user-initiated cancellation separately from system failure instead of silently dropping it. Report sample counts and distributions by A–E group; never average cold and warm starts together. If you change quantization, evaluate answer quality with the same business prompts as well. A faster model that drops safety-critical repair steps is not a better product simply because it fits the memory budget.&lt;/p&gt;

&lt;p&gt;Pass criteria come from the product task. How long may a technician wait at the machine? How many failed requests are acceptable while image capture also runs? Who signs off on enclosure temperature and whole-system power? Agree on these before seeing the device's results. When only engine throughput has been measured, report "engine measured; product experience unverified," not "device accepted."&lt;/p&gt;

&lt;p&gt;Failure patterns suggest the next investigation, not an automatic diagnosis. High TTFT with steady later tokens points toward cold loading, retrieval, queuing, long prompts, or prefill. Fast first token followed by slowing output calls for checks of memory contention, growing context, and thermal throttling. Problems confined to concurrent requests call for examination of queueing, session caches, and batching. An OOM event calls for a weights/KV-cache/resident-service inventory before changing quantization, context, or hardware. Re-run the original request set after each single-variable change.&lt;/p&gt;

&lt;h2&gt;
  
  
  When these results should not drive a purchase
&lt;/h2&gt;

&lt;p&gt;Without the target device, enclosure, and chosen model, this protocol prepares an acceptance test; it cannot rank boards. An exposed development board's cold result does not predict sustained thermals inside a sealed case. If model or quantization is still in flux, establish runtime support and answer quality first. Equal tokens/s from two configurations may accompany unequal answer quality.&lt;/p&gt;

&lt;p&gt;For a retrieval-assisted device, keep a pure-model run and a complete RAG-path run. The first isolates inference; the second includes document search, authorization filtering, and prompt assembly. Do not use pure-model TTFT as a promise about the user's full workflow. Weak networking, camera concurrency, battery aging, or other site-specific factors need separate delivery validation; a laboratory baseline is not field evidence.&lt;/p&gt;

&lt;p&gt;If you have only public specifications today, shortlist devices first, then fill this protocol for each candidate. A device-specific conclusion requires raw records from the chosen model under the product's load. This article supplies a method, not measured rankings for any device.&lt;/p&gt;

</description>
      <category>edgecomputing</category>
      <category>ai</category>
      <category>llm</category>
      <category>performance</category>
    </item>
    <item>
      <title>ESP32 as a Modbus RTU Bridge: Register Maps, Timing, and Home Assistant Integration</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 19 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/esp32-as-a-modbus-rtu-bridge-register-maps-timing-and-home-assistant-integration-3o52</link>
      <guid>https://dev.to/zediot/esp32-as-a-modbus-rtu-bridge-register-maps-timing-and-home-assistant-integration-3o52</guid>
      <description>&lt;p&gt;Many first-time ESP32 Modbus RTU projects start with a deceptively simple assumption: add a MAX485, write some YAML, read a few registers, and the bridge is done. Real deployments usually fail somewhere else.&lt;/p&gt;

&lt;p&gt;The hard part is rarely whether the protocol can be parsed. The hard part is whether the full bridge path can stay stable under field conditions.&lt;/p&gt;

&lt;p&gt;A production-ready ESP32 Modbus-RTU bridge depends much more on RS485 electrical design, UART ownership, polling cadence, and failure handling than on protocol syntax alone. If the project is treated only as a YAML mapping exercise, it will usually break later on bus contention, CRC faults, offline devices, polling overload, or uncontrolled write behavior from the Home Assistant side.&lt;/p&gt;

&lt;p&gt;Throughout this article, a Modbus-RTU bridge means an ESP32 that talks to PLCs, meters, drives, or other field devices over RS485 and then exposes normalized states, measurements, and a small number of controllable entities to Home Assistant through ESPHome. It is an edge bridge node, not a PLC replacement and not a deterministic industrial controller.&lt;/p&gt;

&lt;p&gt;If the goal is to bring industrial status, alarms, and low-frequency control into Home Assistant, ESP32 + ESPHome is a strong low-cost integration path. If the goal is high-frequency closed-loop control, hard real-time actuation, or heavily loaded multi-slave polling at industrial scale, it should not become the primary control path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why many Modbus bridges "work" in demos but not in the field
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The first mistake is to treat it as only a protocol problem
&lt;/h3&gt;

&lt;p&gt;On paper, Modbus-RTU looks straightforward: slave address, function code, register address, and CRC. In real deployments, failures usually begin somewhere else:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Half-duplex RS485 direction switching is not stable.&lt;/li&gt;
&lt;li&gt;Termination, biasing, grounding, or isolation is wrong.&lt;/li&gt;
&lt;li&gt;UART logs and Modbus traffic compete for the same serial path.&lt;/li&gt;
&lt;li&gt;Multiple polling jobs overload the bus.&lt;/li&gt;
&lt;li&gt;An offline slave blocks too much of the polling schedule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is why a bench demo often "reads values correctly" while the field installation starts timing out, dropping frames, or reporting unstable data.&lt;/p&gt;

&lt;h3&gt;
  
  
  The second mistake is to treat Home Assistant as an industrial master
&lt;/h3&gt;

&lt;p&gt;Home Assistant is excellent for visualization, automation, and system integration. It is not an industrial master platform in the control-systems sense. The correct architecture is usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Field equipment keeps critical control logic locally.&lt;/li&gt;
&lt;li&gt;The ESP32 bridge node exposes status, metrics, and a small number of low-risk writes.&lt;/li&gt;
&lt;li&gt;Home Assistant handles dashboards, alarms, and non-critical orchestration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once high-frequency control, safety logic, or timing-critical sequences are pushed into this path, the boundary is already wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a more stable ESP32 Modbus-RTU bridge architecture looks like
&lt;/h2&gt;

&lt;p&gt;Each layer has a different role:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Responsibility&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PLC / field devices&lt;/td&gt;
&lt;td&gt;Keep the real industrial semantics and control behavior&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RS485 transceiver&lt;/td&gt;
&lt;td&gt;Handle half-duplex direction, electrical stability, noise tolerance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ESP32 + ESPHome&lt;/td&gt;
&lt;td&gt;Poll, decode, scale, normalize, expose entities upward&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Home Assistant&lt;/td&gt;
&lt;td&gt;Visualize, automate, handle limited low-risk actions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If the architecture does not clearly separate "industrial control stays local" from "selected states are bridged upward," the bridge node will eventually be misused as a controller, and every timing and reliability issue will become more expensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four parts most worth getting right early
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Stabilize the RS485 layer before adding features
&lt;/h3&gt;

&lt;p&gt;Many unstable bridges fail because teams assume all RS485 wiring is interchangeable. In real sites, stability is shaped first by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Correct termination&lt;/strong&gt; — a 120 Ω resistor at each physical end of the bus, and only at the ends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proper biasing&lt;/strong&gt; — fail-safe bias so an idle bus does not float into a false start bit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolation&lt;/strong&gt; — whether the transceiver is galvanically isolated from the local ground.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounding and power-noise behavior&lt;/strong&gt; — ground loops between buildings or cabinets are a common source of intermittent CRC errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cable length and layout relative to baud rate&lt;/strong&gt; — the longer the run and the higher the baud, the less tolerance you have.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the node is going into panels, equipment rooms, pump systems, or electrically noisy spaces, isolation and bus quality often matter more than another round of YAML refinement. Standard off-the-shelf ESP32 dev boards typically lack opto-isolation and correct RS485 biasing; those are hardware changes, not software ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Define UART ownership from day one
&lt;/h3&gt;

&lt;p&gt;ESPHome's Modbus setup assumes you understand serial ownership clearly. On ESP32, the most stable pattern is usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dedicate one UART to Modbus.&lt;/li&gt;
&lt;li&gt;Use a &lt;code&gt;flow_control_pin&lt;/code&gt; for RS485 direction control.&lt;/li&gt;
&lt;li&gt;Keep serial logs off the same bus.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If boot logs, debug logs, and Modbus traffic are allowed to fight over the same path, the instability is structural, not incidental.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;uart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;modbus_uart&lt;/span&gt;
  &lt;span class="na"&gt;tx_pin&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GPIO17&lt;/span&gt;
  &lt;span class="na"&gt;rx_pin&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GPIO16&lt;/span&gt;
  &lt;span class="na"&gt;baud_rate&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9600&lt;/span&gt;
  &lt;span class="na"&gt;stop_bits&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;parity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NONE&lt;/span&gt;

&lt;span class="na"&gt;modbus&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;modbus_bus&lt;/span&gt;
  &lt;span class="na"&gt;uart_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;modbus_uart&lt;/span&gt;
  &lt;span class="na"&gt;flow_control_pin&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GPIO4&lt;/span&gt;   &lt;span class="c1"&gt;# DE/RE on the RS485 transceiver&lt;/span&gt;

&lt;span class="na"&gt;modbus_controller&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;meter&lt;/span&gt;
    &lt;span class="na"&gt;address&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0x01&lt;/span&gt;
    &lt;span class="na"&gt;modbus_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;modbus_bus&lt;/span&gt;
    &lt;span class="na"&gt;update_interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;30s&lt;/span&gt;
    &lt;span class="na"&gt;command_throttle&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;100ms&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Design polling cadence for the bus, not for entity count
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;modbus_controller&lt;/code&gt; is very useful, but bridge stability depends less on how many entities you define and more on how the bus gets scheduled. The settings that matter most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;command_throttle&lt;/code&gt; — the minimum gap between requests; this is what keeps the bus from being saturated.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;send_wait_time&lt;/code&gt; — how long to wait after a send before expecting a reply.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;offline_skip_updates&lt;/code&gt; — how many failed cycles before a device is skipped, so a dead slave does not dominate the schedule.&lt;/li&gt;
&lt;li&gt;Merging adjacent registers into one read instead of issuing one request per entity.&lt;/li&gt;
&lt;li&gt;Assigning update frequency by importance instead of by default.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the bridge has many registers and several slaves, setting everything to frequent updates will overload the bus quickly. The node may still look online, but the data arriving in Home Assistant will become stale and inconsistent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Normalize the data before exposing it upstream
&lt;/h3&gt;

&lt;p&gt;Another common mistake is to expose every raw register exactly as it appears on the field device. That leaks industrial complexity upward without giving Home Assistant a cleaner integration model.&lt;/p&gt;

&lt;p&gt;A better bridge usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performs scale conversion at the edge — a 32-bit value split across two holding registers, or a signed integer scaled by 0.1, becomes a plain float.&lt;/li&gt;
&lt;li&gt;Handles register packing and endianness — word order varies by vendor, and getting it wrong produces plausible but wrong numbers rather than an obvious error.&lt;/li&gt;
&lt;li&gt;Exposes only the states and actions that actually matter.&lt;/li&gt;
&lt;li&gt;Wraps risky write operations behind safer templates or manual confirmation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is what turns the ESP32 into a real edge-normalization layer instead of a raw pass-through box.&lt;/p&gt;

&lt;h2&gt;
  
  
  The difference between a working demo and a durable bridge
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Demo-style bridge&lt;/th&gt;
&lt;th&gt;Durable bridge&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;UART setup&lt;/td&gt;
&lt;td&gt;Whatever works temporarily&lt;/td&gt;
&lt;td&gt;Dedicated UART with clear direction control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RS485 layer&lt;/td&gt;
&lt;td&gt;Assumes the module is enough&lt;/td&gt;
&lt;td&gt;Treats isolation, bias, termination, wiring as first-class&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Polling&lt;/td&gt;
&lt;td&gt;Each entity reads independently&lt;/td&gt;
&lt;td&gt;Bus cadence designed around devices and register blocks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failure handling&lt;/td&gt;
&lt;td&gt;Timeout equals error log&lt;/td&gt;
&lt;td&gt;Offline devices, retry backoff, recovery are expected&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HA exposure&lt;/td&gt;
&lt;td&gt;Raw registers surfaced directly&lt;/td&gt;
&lt;td&gt;Data normalized before entity exposure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Write behavior&lt;/td&gt;
&lt;td&gt;Everything writable if possible&lt;/td&gt;
&lt;td&gt;Only limited low-risk actions exposed&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A demo bridge optimizes for "can I read the register?" A durable bridge optimizes for "can this bus stay stable, and can upstream data remain trustworthy?" Those are different goals, and the architecture must choose the second one intentionally.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation guidance that usually pays back
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For most sites, ESP32 is a better fit than ESP8266
&lt;/h3&gt;

&lt;p&gt;The reason is practical rather than ideological:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More UART flexibility.&lt;/li&gt;
&lt;li&gt;Better runtime headroom for Wi-Fi plus API plus Modbus polling.&lt;/li&gt;
&lt;li&gt;More room for local bridge logic, displays, or node health reporting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the bridge node needs a little more than "one bus and one uplink," ESP32 usually leaves healthier margins.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keep write operations narrower than read operations
&lt;/h3&gt;

&lt;p&gt;Home Assistant makes it easy to think "if I can read it, I should expose write control too." In industrial bridging, that is usually the wrong default.&lt;/p&gt;

&lt;p&gt;Better guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Avoid high-frequency write paths through Home Assistant.&lt;/li&gt;
&lt;li&gt;Do not expose critical tuning values as unrestricted writes.&lt;/li&gt;
&lt;li&gt;Restrict the bridge to low-frequency, low-risk, operator-visible actions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Otherwise the bridge shifts from integration node to control-risk entry point.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design offline and error behavior before the site rollout
&lt;/h3&gt;

&lt;p&gt;Useful policies usually include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One offline slave should not stall the whole bus longer than necessary.&lt;/li&gt;
&lt;li&gt;Repeated failures should back off rather than retry at full rate.&lt;/li&gt;
&lt;li&gt;CRC faults and out-of-range values should be filtered or retried, and counted.&lt;/li&gt;
&lt;li&gt;The ESP32 should report its own health, not only slave values.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That makes it much easier to separate four different problems that look identical from the dashboard:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Field-device failure — one slave stops responding while others continue.&lt;/li&gt;
&lt;li&gt;Bus-level failure — everything fails at once, usually wiring, termination, or a dead transceiver.&lt;/li&gt;
&lt;li&gt;ESP32 node overload — responses arrive but arrive late, often with rising loop time or dropped Wi-Fi.&lt;/li&gt;
&lt;li&gt;Upstream Home Assistant lag — the bridge is fine, the dashboard is stale.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  When ESP32 + ESPHome is the wrong Modbus bridge choice
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High-frequency closed-loop control&lt;/strong&gt;: if the action must complete deterministically and fast, Home Assistant and Wi-Fi should not be on the critical path.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too many slaves or too much data with aggressive refresh requirements&lt;/strong&gt;: a dedicated industrial gateway may be the better tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Harsh electrical environments without proper isolation&lt;/strong&gt;: software cannot fix a weak physical layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large amounts of vendor-specific logic or complex write transactions&lt;/strong&gt;: YAML alone may not be enough, and deeper custom firmware may be required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the real goal is to turn Home Assistant into the primary PLC master, or to push high-risk industrial control through this node, the system boundary is already wrong. An ESP32 bridge is usually best as an edge ingress and normalization layer for status plus low-frequency control, not as the main control layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using ESP32 to bridge Modbus-RTU into ESPHome and Home Assistant is a very practical integration path, but the path succeeds only when it is treated as a full edge system rather than a protocol snippet.&lt;/p&gt;

&lt;p&gt;If the goal is only to read a few registers, a demo comes together quickly. If the goal is a bridge that can run at a site over time, then RS485 electrical design, UART boundaries, polling cadence, failure handling, and Home Assistant role separation all need to be designed together. The strongest bridge is not the one that exposes everything. It is the one that exposes only what the system can safely sustain.&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>esphome</category>
      <category>homeassistant</category>
      <category>iot</category>
    </item>
    <item>
      <title>Edge LLM Hardware Selection: Memory Bandwidth Beats TOPS Every Time</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 17 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/edge-llm-hardware-selection-memory-bandwidth-beats-tops-every-time-1g6a</link>
      <guid>https://dev.to/zediot/edge-llm-hardware-selection-memory-bandwidth-beats-tops-every-time-1g6a</guid>
      <description>&lt;p&gt;"Run a 7B model" is still too vague for procurement. An engineering lead needs the expected input length, output length, concurrent requests, any retrieval or speech service, and what must still work without network access.&lt;/p&gt;

&lt;p&gt;Two devices may both load the weight file, yet face very different memory demand when one must retain a long conversation or serve multiple users. If those conditions are decided after purchase, testing may only reveal that the chosen hardware cannot meet the product requirement.&lt;/p&gt;

&lt;p&gt;Consider a control panel that accepts brief commands and a service assistant that reads several pages of a repair manual. Both can be called local-LLM products. The second also needs room for retrieved passages, conversation history, indexing, and application services. If the device displays video or processes audio at the same time, model startup alone says even less about the complete product.&lt;/p&gt;

&lt;p&gt;If the job is manual-based question answering, include retrieval and document updates on the workload card. A model-only memory budget does not replace those system conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define the job before choosing a processor
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Make a workload card that another engineer can rerun
&lt;/h3&gt;

&lt;p&gt;Record the exact model and quantized artifact, runtime version, maximum input and output tokens, concurrency limit, background services, required offline actions, acceptable waiting time, and enclosure constraints. Avoid filling this card with guessed tokens-per-second numbers. A change to the model, quantization, context, or number of parallel sessions invalidates a direct comparison with an earlier run.&lt;/p&gt;

&lt;p&gt;The card should also name the failure path. Will the UI ask for a shorter document, queue the request, switch to a smaller model, or fall back to a network service where permitted? Hardware that "just fits" without a defined fallback is fragile when manuals grow or more users arrive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Budget runtime memory, not only model storage
&lt;/h2&gt;

&lt;p&gt;A model fitting on eMMC proves storage capacity, not inference capacity. During inference the runtime maps or loads weights in a supported form; attention uses a KV cache whose demand depends on the request and configuration. Computation buffers, input processing, the OS, and the application also consume memory.&lt;/p&gt;

&lt;p&gt;A practical first-pass budget has five parts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resident weights&lt;/strong&gt; — the loaded form of the artifact, not the file size on disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;KV cache&lt;/strong&gt; — grows with context length and session count, not with model size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime workspace&lt;/strong&gt; — compute and graph buffers the runtime allocates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OS and application reserve&lt;/strong&gt; — what is left after the real image and services start.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incremental memory for concurrency or other device tasks&lt;/strong&gt; — display, camera, audio, retrieval.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If a proposal reports only the model-file size, the RAM decision is not ready.&lt;/p&gt;

&lt;p&gt;The official Hugging Face KV-cache documentation notes that the cache can consume substantial memory for long contexts. Cache offloading and quantization trade memory against latency; they are not free capacity. The llama.cpp server reference exposes separate settings for context, parallel slots, cache types, cache offloading, and model-layer placement. Changing those settings changes where memory is used. The same GGUF file therefore does not imply the same runtime peak on every configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quantization solves one part of the budget
&lt;/h3&gt;

&lt;p&gt;Reducing weight precision usually lowers weight storage. It does not automatically shrink the KV cache, runtime buffers, and OS footprint by the same proportion. A particular quantization format must also be supported by the chosen runtime and accelerator. A 4-bit artifact that loads but fails the product's answer-quality checks, or moves a bottleneck into CPU-memory transfers, is not a successful hardware decision.&lt;/p&gt;

&lt;p&gt;Do not treat "8 GB" as a universal safe threshold. Boards with that nominal capacity may reserve different amounts for the OS, display stack, GPU, NPU, and always-on services. Start the target image with all resident services, record available memory, and then run cold starts, the longest input, repeated requests, and maximum planned concurrency. Measure both process and system peaks. Leave room for logging, updates, recovery, and later model versions; determine that margin from the actual device and risk tolerance rather than copying another board's number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the backend before discussing TOPS
&lt;/h2&gt;

&lt;p&gt;TOPS is a capability figure for a category of operations, not end-to-end token latency for a named model. Operators, quantization, driver, kernel, and runtime must form an executable combination. Rockchip's RKLLM project, for example, publishes supported platforms and model families. It also describes a PC-side Toolkit conversion step followed by a board-side Runtime, C API, and NPU driver. "RK3588 supported" is enough to put a board on the evaluation list; it does not mean arbitrary weights can be copied onto it and served unchanged.&lt;/p&gt;

&lt;p&gt;A general-purpose runtime and a vendor NPU path solve different maintenance problems. One may make a common model format deployable across more devices. The other may require converted artifacts and a frozen toolkit, driver, and system-image combination. If a team cannot maintain that conversion and image lifecycle, a large advertised accelerator figure may turn every model upgrade into a compatibility project. When the product genuinely requires a particular NPU, take the actual target model through conversion, board startup, and critical operator checks before committing to volume purchase.&lt;/p&gt;

&lt;p&gt;PyTorch's ExecuTorch LLM guidance likewise treats export, deployment, and target backend as concrete steps. Framework support for on-device LLMs is not a blanket performance guarantee across SoCs. Ask for the precise model, runtime, driver, and OS-image versions that form the proposed deployment. Ask who will revalidate that set after an update. Those answers matter more to delivery than a bare TOPS comparison.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sustained operation is a different test from model startup
&lt;/h2&gt;

&lt;p&gt;Even after the model fits and the backend starts, whole-device behavior remains unproven. Generation repeatedly accesses weights and cache. Larger models, longer contexts, and more sessions can increase pressure on memory channels and data movement. The CPU, GPU, or NPU may also share resources with display, camera, and network work. A single idle-board demo cannot establish response time under the actual business load.&lt;/p&gt;

&lt;p&gt;Test short commands separately from long-manual questions, and single sessions separately from the planned concurrency ceiling. Capture time to first token, intervals between later tokens, process and system memory peaks, clock frequency, temperature, and whole-device power. Continue until thermal behavior has stabilized, then examine throttling and latency drift. For a continuously operating device, a one-minute cold-start demonstration validates a functional path, not sustained service.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why bandwidth, not TOPS, sets the ceiling
&lt;/h3&gt;

&lt;p&gt;Autoregressive decoding has a specific shape: for every generated token, the model reads essentially all of its weights and the whole KV cache once, and performs a comparatively small amount of arithmetic per byte read. This makes decode memory-bandwidth-bound, not compute-bound. Prefill is the opposite — it processes many tokens in parallel and is far more compute-intensive.&lt;/p&gt;

&lt;p&gt;That asymmetry explains most of the misleading hardware comparisons:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Phase&lt;/th&gt;
&lt;th&gt;What limits it&lt;/th&gt;
&lt;th&gt;What an accelerator helps with&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Prefill (prompt processing)&lt;/td&gt;
&lt;td&gt;Compute throughput&lt;/td&gt;
&lt;td&gt;Large — this is where TOPS actually transfers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Decode (token generation)&lt;/td&gt;
&lt;td&gt;Memory bandwidth and cache traffic&lt;/td&gt;
&lt;td&gt;Limited — the arithmetic units wait on data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long context&lt;/td&gt;
&lt;td&gt;KV cache size and read volume per token&lt;/td&gt;
&lt;td&gt;Almost none — this is capacity and traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A device with an impressive TOPS figure and a narrow, shared memory bus will prefill quickly and then generate tokens slowly. Since user-perceived speed tracks the decode phase for long outputs, the TOPS number can look excellent while the product feels sluggish.&lt;/p&gt;

&lt;p&gt;Advertised memory bandwidth can eliminate an obviously unsuitable candidate, but it cannot be converted directly into tokens per second. If the target board exposes memory-controller counters, keep the model, context, and concurrency fixed and record memory traffic both alone and alongside display, camera, or other product tasks; compare those readings with time to first token and later token intervals. Without usable counters, repeat a fixed workload before and after adding those concurrent tasks and compare latency and clocks, but do not present the difference as a precise bandwidth-utilization figure. If capacity and backend compatibility pass yet latency drifts substantially under concurrent work, investigate memory-path and scheduling contention before blaming NPU compute capacity.&lt;/p&gt;

&lt;p&gt;Enclosure and power design can reverse an early impression. An open development board on a desk may cool adequately while the same electronics in a fanless cabinet, near a wall, or next to another heat source may not retain the same clocks. If the final product also renders a display, captures speech, or operates as a gateway, keep those tasks active during testing. Only then do the measured memory, bandwidth, and thermal demands resemble the shipped device.&lt;/p&gt;

&lt;p&gt;The sequence below is a set of validation gates. If capacity fails, debating accelerator TOPS is premature. If the target model does not work on the backend, advertised compute cannot rescue that incompatibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Eliminate deployment routes in a useful order
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;First gate&lt;/th&gt;
&lt;th&gt;Cost that remains after it passes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;CPU-focused Linux board&lt;/td&gt;
&lt;td&gt;Does the quantized artifact run with reserve at the target context?&lt;/td&gt;
&lt;td&gt;A smaller model, shorter context, or longer wait may be necessary; measure it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge board with GPU&lt;/td&gt;
&lt;td&gt;Can weights, cache, and other applications coexist in its real memory layout?&lt;/td&gt;
&lt;td&gt;Power, cooling, driver, and GPU allocation require whole-device validation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vendor NPU board&lt;/td&gt;
&lt;td&gt;Can the target model be converted and run with matching operators, quantization, driver, and image versions?&lt;/td&gt;
&lt;td&gt;Conversion and version maintenance remain part of the product.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cloud or hybrid route&lt;/td&gt;
&lt;td&gt;Do offline, privacy, cost, and latency requirements permit a network path?&lt;/td&gt;
&lt;td&gt;Network dependence, data governance, and continuing service cost must be owned.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The table is not a speed ranking. If the weight and runtime peak do not fit, shrink the model or change hardware first. If the dedicated backend does not support the model, more TOPS do not fix the mismatch. If sustained response is unacceptable, compare cooling, quantization, accelerator backend, and hybrid deployment under the same test conditions. Change one important variable at a time so an apparent improvement has an identifiable cause.&lt;/p&gt;

&lt;h3&gt;
  
  
  When a local LLM is the wrong requirement
&lt;/h3&gt;

&lt;p&gt;A device that only maps fixed commands or retrieves a few structured states may be simpler to maintain with rules, a smaller classifier, or a permitted cloud service. Frequent model upgrades are also a poor fit for a board with little memory and driver headroom. If connectivity is acceptable, the data can be handled within applicable requirements, and local sustained performance misses the target, include hybrid and cloud architectures in the same review rather than excluding them with a slogan.&lt;/p&gt;

&lt;p&gt;When offline operation is essential, not every task must use one large model. Limit the device-side guarantee to the intents, retrieval, or short answers that must work without a network. Provide a clear failure message or a permitted cloud fallback for harder requests. This reduces the workload the product promises to sustain; it does not disguise a weak hardware estimate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep evidence that survives the purchasing meeting
&lt;/h2&gt;

&lt;p&gt;A credible selection record does not require a glossy TOPS chart. It must let another engineer rerun the decision: model and quantized artifact versions, runtime and driver versions, system image, context and concurrency settings, resident services, power and enclosure conditions, test inputs, peak memory, and sustained thermal-response records. A missing measurement should say "not tested," not be filled with a vendor support matrix.&lt;/p&gt;

&lt;p&gt;The public documentation supports a screening order: place the actual workload first, then verify memory, backend, and sustained whole-device constraints. A final purchase decision still needs the same workload on the target board in the target enclosure. Until then, retaining two testable candidates is safer than declaring that a particular NPU or RAM figure is "enough."&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hugging Face Transformers: KV-cache strategies&lt;/li&gt;
&lt;li&gt;llama.cpp server options&lt;/li&gt;
&lt;li&gt;Rockchip RKLLM software stack and supported platforms&lt;/li&gt;
&lt;li&gt;PyTorch ExecuTorch LLM deployment&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>performance</category>
    </item>
    <item>
      <title>What Edge AI Models Can ESP32-P4 Actually Run? From ESP-DL Support to Real-Time Vision Validation</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 12 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/what-edge-ai-models-can-esp32-p4-actually-run-from-esp-dl-support-to-real-time-vision-validation-4id3</link>
      <guid>https://dev.to/zediot/what-edge-ai-models-can-esp32-p4-actually-run-from-esp-dl-support-to-real-time-vision-validation-4id3</guid>
      <description>&lt;p&gt;An ESP-DL model listing may say "ESP32-P4 supported," but that does not answer the question a camera product has to answer: will a result arrive while it is still useful?&lt;/p&gt;

&lt;p&gt;Chip support, successful loading, sufficient memory, fast individual inference, and acceptable response time with the camera, display, and network all running are separate checks. Passing the first one does not certify the others.&lt;/p&gt;

&lt;p&gt;Start with a specific job, such as detecting a person near an entrance or reading a fixed instrument display. Get a minimal model path working, then measure the complete path on the intended board, sensor, resolution, and concurrent workload. This article uses Espressif's public documentation to explain that process. It does not claim measured FPS, power consumption, temperature, recognition accuracy, or production reliability for any untested device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the job before choosing a model
&lt;/h2&gt;

&lt;p&gt;The current ESP-DL Model Zoo lists object detection, face and pedestrian detection, face recognition, classification, pose estimation, OCR, and other tasks with chip support markers. Those entries do not have interchangeable inputs or outputs. A detector returns candidate locations; a classifier returns categories; an OCR pipeline has to turn image regions into usable text. Asking only how many models the chip "can run" skips the interface your application actually needs.&lt;/p&gt;

&lt;p&gt;Consider an entrance device. Face detection answers whether a face appears in a frame. Identity recognition adds feature extraction and matching, plus enrollment, thresholds, and a response to false matches. If the product only needs to wake a display when someone approaches, adding identity recognition creates privacy and error-handling work without improving that task. Define the action to be taken on a result before selecting a model with more features than the application requires.&lt;/p&gt;

&lt;p&gt;OCR has a similar split. Reading digits at a known location on a panel is different from reading arbitrary labels at varying angles and under glare. The first task can narrow the crop and expected character set. The second needs to deal with localization, perspective, blur, and potentially multiple languages. An OCR entry marked for P4 in the official list is a credible integration starting point. It is not evidence that a particular camera, lens, and mounting angle will read your labels accurately. That conclusion needs actual images and a record of omissions, substitutions, and rejected reads.&lt;/p&gt;

&lt;p&gt;The list also includes non-vision tasks. Their presence does not provide performance evidence for a vision pipeline. For a camera product, lock down the image source, the desired output event, and the maximum acceptable delay first. Only then does a model shortlist become meaningful.&lt;/p&gt;

&lt;h3&gt;
  
  
  What "supported" can — and cannot — mean
&lt;/h3&gt;

&lt;p&gt;The first level is repository-level chip support: a model or example is marked for ESP32-P4. Record the model version, dependency versions, target chip, and file source. This prevents a later library update from silently changing what was actually assessed. It does not certify an arbitrary board configuration or an arbitrary input stream.&lt;/p&gt;

&lt;p&gt;The next level is runtime compatibility. ESP-DL's &lt;code&gt;.espdl&lt;/code&gt; model and TensorFlow Lite Micro's &lt;code&gt;.tflite&lt;/code&gt; model are different artifacts. The ESP-VISION P4 guide describes separate execution paths and task-specific APIs. Copying a model that worked elsewhere to an SD card does not make it loadable by ESP-DL. Check the conversion toolchain, target chip, operator support, tensor dimensions, types, and input/output conventions rather than relying on the filename extension alone.&lt;/p&gt;

&lt;p&gt;The ESP-DL &lt;code&gt;dl::Model::test()&lt;/code&gt;, &lt;code&gt;profile_memory()&lt;/code&gt;, and &lt;code&gt;profile_module()&lt;/code&gt; functions are C++ model APIs. ESP-VISION's espdl and tflite examples show a separate Python application path. Both address related validation questions, but their calls cannot simply be mixed into one program. Choose the runtime that the product firmware actually uses, and instrument that runtime's own interfaces.&lt;/p&gt;

&lt;p&gt;The third level is application fitness. A successful &lt;code&gt;test()&lt;/code&gt; compares a model's result against test values exported with the model. It does not include exposure changes, color conversion mistakes, motion blur, business thresholds, or display lag from a real camera. Calling that result "validated entrance recognition" would claim much more than the test covers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide where the model lives before finalizing updates
&lt;/h2&gt;

&lt;p&gt;ESP-DL documents three broad loading routes: embed an &lt;code&gt;.espdl&lt;/code&gt; file in application rodata, store it in a dedicated Flash partition, or load it from an SD card. Embedding is straightforward but ties the model to an application reflash and can enlarge the application partition. A dedicated partition allows a different model-update flow but requires partition sizing and compatibility planning. SD storage makes file replacement convenient, while adding mounting, file integrity, and read-speed conditions. These are release and maintenance trade-offs, not an inherent ranking of accuracy or speed.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Convenient when&lt;/th&gt;
&lt;th&gt;What it costs you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Embedded in app rodata&lt;/td&gt;
&lt;td&gt;Model never changes independently of firmware&lt;/td&gt;
&lt;td&gt;Any model change means reflashing the app; app partition grows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dedicated Flash partition&lt;/td&gt;
&lt;td&gt;Model updated separately from firmware&lt;/td&gt;
&lt;td&gt;Partition sizing, compatibility checks, version negotiation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SD card&lt;/td&gt;
&lt;td&gt;Frequent model swaps, large artifacts&lt;/td&gt;
&lt;td&gt;Mount, integrity verification, read-speed and card-quality worst cases&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If a deployed device must update its model without updating the main application, design that boundary before the firmware image and partition map are frozen. Decide how the device rejects a corrupted model, how it returns to the previous compatible version, and how the firmware checks model/API compatibility. The public API establishes that several loading options exist. It does not establish that any of them has passed your product's power-loss or update testing.&lt;/p&gt;

&lt;p&gt;Keeping parameters in Flash or copying them into faster memory is another explicit trade-off. The ESP-DL documentation describes &lt;code&gt;param_copy=false&lt;/code&gt; as a way to reduce RAM copies, with a possible inference-speed penalty. A model that starts only after disabling the copy has not automatically met a response-time requirement. Compare both configurations with the same input, clock, and concurrent tasks before accepting the memory saving.&lt;/p&gt;

&lt;h3&gt;
  
  
  File size is not the application's memory requirement
&lt;/h3&gt;

&lt;p&gt;A common sizing mistake is to subtract a model file's size from total PSRAM and call the remainder "free for the camera." The file does not account for intermediate tensors, parameter copies, input and output buffers, captured frames, transforms, display buffers, or other tasks. Some allocations may also need a particular memory type or contiguous region. Plenty of total PSRAM does not guarantee that the next allocation a driver needs will succeed. If the product also runs a GUI, framebuffer allocations compete directly with the model workspace.&lt;/p&gt;

&lt;p&gt;ESP-DL's &lt;code&gt;profile_memory()&lt;/code&gt; reports model structures, copied parameters, variables, and other overhead across internal RAM, PSRAM, and Flash. Use it as a model-level measurement, not as the entire application's peak. Log free and peak memory before and after camera initialization, model loading, display initialization, and network activity. A failure observed after display startup is much easier to explain when the memory change at each boundary is known. The combined &lt;code&gt;profile()&lt;/code&gt; call can also show where model-layer time is spent.&lt;/p&gt;

&lt;p&gt;A simple lower bound helps expose hidden buffers. A 640×480 RGB565 frame with no extra stride contains 614,400 pixel bytes; two complete buffers contain 1,228,800 bytes, about 1.17 MiB. That calculation excludes alignment, driver-private allocations, a resized model input, and display-side copies. It says nothing about which memory region the buffers occupy. Its purpose is to flag that frames can consume memory on the same scale as a compact model's workspace — not to predict your board's measured peak.&lt;/p&gt;

&lt;p&gt;The model input also deserves an explicit assumption. A tightly packed 224×224×3 tensor at one byte per element needs at least 150,528 bytes. A different camera format may require a transform buffer before inference. Layout, alignment, preprocessing, and runtime allocation policy can all raise the observed number. Write the assumptions beside the estimate; "AI needs roughly 2 MB" is not a reproducible memory plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  An inference benchmark is not a response-time benchmark
&lt;/h2&gt;

&lt;p&gt;A camera result travels through capture, format conversion, resize or crop, inference, post-processing, business rules, and finally display or event delivery. &lt;code&gt;profile_module()&lt;/code&gt; reports latency inside the model's layers. It does not include that entire path. Reporting only its total cannot explain why a bounding box still trails a moving part on a screen.&lt;/p&gt;

&lt;p&gt;The input may need a color conversion and resize before reaching the model. A detection result may then need thresholding, box decoding, and non-maximum suppression. Camera and display ownership can add copies or queueing. None of these stages is automatically dominant, but none is safely assumed to be free. Put timestamps around each stage in the same clock domain and record end-to-end percentiles, not only model time.&lt;/p&gt;

&lt;p&gt;"Real time" has to come from the job. A meter reader that samples once per second cares about correct readings, worst-case response, and retry behavior. A device that controls access may care far more about tail latency and false activation. A live video overlay also needs input rate, processed rate, queued frames, and age of the output image. Mean inference time alone can look healthy while the frame queue grows and the displayed decision becomes stale.&lt;/p&gt;

&lt;h3&gt;
  
  
  Separate model bring-up from a real camera workload
&lt;/h3&gt;

&lt;p&gt;First, use a fixed input to check that the model loads, tensors match, and the model produces the expected result. ESP-DL's &lt;code&gt;test()&lt;/code&gt; works when test inputs and outputs were included during model export. A shipping model may omit those values to save space, so the absence of built-in test values is not itself evidence of a broken model. This stage isolates conversion and runtime errors.&lt;/p&gt;

&lt;p&gt;Second, connect the intended camera. Record sensor, lens, resolution, pixel format, exposure range, crop, and channel ordering. Preserve failed frames for analysis. If the model behaves on public example images but misses objects under actual glare, motion, or viewing angle, shaving a few milliseconds from inference will not solve the product problem. Accuracy and timing must be accepted independently.&lt;/p&gt;

&lt;p&gt;Third, enable the display, network, logs, and continuous capture. On the same model and board settings, compare isolated and concurrent operation. Record memory peaks, end-to-end latency percentiles, dropped frames, temperature, and recovery from faults. The duration of a meaningful sustained test follows the product's duty cycle. A short demonstration is not a reliability test, and public documentation cannot supply your device's pass criterion.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quantization changes both fit and failure modes
&lt;/h2&gt;

&lt;p&gt;The ESP-DL quantization guide describes &lt;code&gt;.espdl&lt;/code&gt; as a quantized deployment format with 8-bit, 16-bit, and mixed-precision options exported through ESP-PPQ. A smaller quantized artifact does not by itself prove unchanged application accuracy. Small objects, low-contrast digits, and motion-blurred frames may be exactly the inputs that reveal a changed error distribution.&lt;/p&gt;

&lt;p&gt;Hold the task, preprocessing, and evaluation set constant while comparing quantization choices. Check that each model exports and loads, that board-level correctness checks pass where test data is available, and that the relevant categories or characters still meet the application error budget. Then compare memory and timing.&lt;/p&gt;

&lt;p&gt;If a smaller variant loses recall for a safety-relevant target, an attractive average accuracy figure will not rescue the decision. If a higher-precision variant exhausts working memory, changing a recognition threshold is not a memory fix.&lt;/p&gt;

&lt;p&gt;There may also be a &lt;code&gt;.tflite&lt;/code&gt; route for the task. ESP-VISION treats TensorFlow Lite Micro and ESP-DL as distinct runtimes. The TFLite model needs the enabled operators and correct quantized input/output handling. Verify equivalent input and output semantics before comparing their file sizes, working memory, and elapsed times. Otherwise the experiment compares two different models or preprocessing paths rather than two runtime options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Carry the sample into product firmware one boundary at a time
&lt;/h2&gt;

&lt;p&gt;An example often places capture, model invocation, and drawing in one demonstration loop. Product firmware may also own touch input, communications, logging, updates, and power management. Before copying the loop, decide which task owns each camera buffer, where a frame becomes a model tensor, and which component consumes the result. Unclear ownership can appear to work on the first frame and then fail when a reused buffer is overwritten or an allocation remains live.&lt;/p&gt;

&lt;p&gt;Convert the camera image according to the model's actual tensor contract. Check width, height, channel order, data type, normalization, crop policy, and the coordinate mapping back to the original image. ESP-VISION exposes preprocessing parameters and tensor metadata queries that can help with this check. If boxes are consistently shifted although an object is found, inspect crop and resize coordinates before deciding that the model itself is inaccurate.&lt;/p&gt;

&lt;p&gt;Keep the result interface separate from the business event interface. A detection box is transient frame state; an alarm may travel over a network and be persisted. Sending an event for every frame containing the same object binds network traffic and user notifications to inference frequency. A sensible design is to pass a timestamped candidate with confidence and source-frame identity to business logic, then apply deduplication and retry policy there.&lt;/p&gt;

&lt;p&gt;Preserve checkpoints as integration becomes more complex: readable file, model load, fixed-input output, real-camera input, display overlay, business event, network concurrency, and sustained operation. Add one variable at a time. When the next checkpoint fails, the previous one remains a useful baseline. Enabling a new camera, model, display, and wireless stack all at once may feel faster but makes a memory fault difficult to attribute.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write an acceptance record that can explain a failure
&lt;/h2&gt;

&lt;p&gt;The useful deliverable is not a sentence saying "P4 supports YOLO." It is a record tied to board and PSRAM/Flash configuration, firmware and model versions, storage location, camera conditions, pixel transformations, threshold settings, concurrent tasks, clock rate, and failed samples. Keep model-only latency separate from application response time; keep mean values separate from high-percentile delays. This makes a later regression attributable rather than anecdotal.&lt;/p&gt;

&lt;p&gt;The gates below add one new class of uncertainty at a time. They are a validation sequence, not results of testing performed for this article.&lt;/p&gt;

&lt;p&gt;If the model will not load, verify conversion target, file version, storage path, partition, and filesystem before replacing the board. If it fails only after extended operation, inspect memory peaks, fragmentation, ownership, and restart behavior. If boxes lag behind the scene, time capture, preprocessing, inference, post-processing, and display separately, and check whether frames queue up. Treating all three symptoms as "P4 is too slow" wastes debugging time because they point to different parts of the system.&lt;/p&gt;

&lt;p&gt;An approval decision can therefore be conditional:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The model has a compatible conversion or official component route.&lt;/li&gt;
&lt;li&gt;The target board retains enough usable memory with all required functions active.&lt;/li&gt;
&lt;li&gt;Real inputs meet the error budget.&lt;/li&gt;
&lt;li&gt;Tail latency and sustained operation satisfy the application's deadline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Passing an earlier condition cannot stand in for a later one. Mark an unmeasured condition "pending," not with an invented FPS estimate.&lt;/p&gt;

&lt;p&gt;If the requirement is an open-ended large language model, long context, several high-resolution video streams, or a fixed frame-rate promise before any target-board testing, the Model Zoo's P4 support marker is not a sufficient basis for a product commitment. Narrow the task, consider a different compute platform, or budget a board-level benchmark first. Compact and well-defined vision tasks are a reasonable area to investigate on P4. Suitability for a particular product still rests on the actual model, memory map, camera path, and measured results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Espressif ESP-DL Model Zoo&lt;/li&gt;
&lt;li&gt;ESP-DL model loading, correctness testing, and profiling&lt;/li&gt;
&lt;li&gt;ESP-DL quantization and export&lt;/li&gt;
&lt;li&gt;ESP-VISION: introducing a model on ESP32-P4&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>esp32</category>
      <category>machinelearning</category>
      <category>computervision</category>
      <category>tinyml</category>
    </item>
    <item>
      <title>Can an 8 GB Edge Device Run a 2 GB Model? Budget Memory at Peak Concurrency</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 10 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/can-an-8-gb-edge-device-run-a-2-gb-model-budget-memory-at-peak-concurrency-4e92</link>
      <guid>https://dev.to/zediot/can-an-8-gb-edge-device-run-a-2-gb-model-budget-memory-at-peak-concurrency-4e92</guid>
      <description>&lt;p&gt;Eight gigabytes of RAM minus a 2 GB model file is not 6 GB of usable inference memory. Calculate the KV cache, then test the longest request and peak concurrency.&lt;/p&gt;

&lt;p&gt;That subtraction cannot approve a device. The file is a storage artifact; inference also keeps weight pages resident, allocates KV cache and compute buffers, and competes with the operating system and any retrieval, audio, or display service. One successful short chat says little about two overlapping long ones.&lt;/p&gt;

&lt;p&gt;You can obtain two useful numbers before touching a board: the exact bytes of a fixed model artifact, and a theoretical KV calculation from its architecture. Runtime workspace, system use, allocation policy, and recovery after a peak remain measurements for the target device. The 2 GB file and 8 GB device here are a hypothetical purchasing question, not a tested board result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "8 minus 2" mixes incompatible accounts
&lt;/h2&gt;

&lt;p&gt;"This model needs 4 GB" could refer to storage, resident weights, a process peak, GPU memory, or the entire device. Ask which one. The useful question is who occupies physical memory under the same model, configuration, and workload — not whether two numbers on different datasheets can be subtracted.&lt;/p&gt;

&lt;p&gt;The layers below are conceptual, not proportional to measured capacity. Unallocated headroom is not another use of RAM. If the runtime allocates KV for a second session, that demand consumes some of the same headroom; nothing here establishes a fixed multiplier or a device result.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Account&lt;/th&gt;
&lt;th&gt;What can establish it&lt;/th&gt;
&lt;th&gt;What it does not establish&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Weights and model metadata&lt;/td&gt;
&lt;td&gt;Exact artifact version, format, file bytes, loader output&lt;/td&gt;
&lt;td&gt;The process or device peak during inference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KV cache&lt;/td&gt;
&lt;td&gt;Layer count, KV heads, head dimensions, allocated tokens, K/V types&lt;/td&gt;
&lt;td&gt;Actual allocator overhead or a runtime's reservation policy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute and graph buffers&lt;/td&gt;
&lt;td&gt;Runtime memory breakdown or a target-device measurement&lt;/td&gt;
&lt;td&gt;A universal multiplier of model parameters&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Operating system and companion tasks&lt;/td&gt;
&lt;td&gt;Available memory after the real image and services start&lt;/td&gt;
&lt;td&gt;The full advertised RAM as exclusive model capacity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Concurrent requests and headroom&lt;/td&gt;
&lt;td&gt;Overlapping request lengths, error records, the system peak&lt;/td&gt;
&lt;td&gt;A guarantee that every cache is shared — or that every byte is duplicated&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are diagnostic accounts, not necessarily additive measurements. A final capacity figure needs a consistent runtime configuration and observation window. If the only known value is the GGUF or other model-file size, you have screened storage, not signed off RAM.&lt;/p&gt;

&lt;h3&gt;
  
  
  A four-bit weight calculation is only a floor
&lt;/h3&gt;

&lt;p&gt;Suppose a hypothetical model has three billion parameters and every parameter occupies exactly four bits. Its bare arithmetic weight floor is 3,000,000,000 × 4 ÷ 8 = 1,500,000,000 bytes, about 1.40 GiB. At eight bits the floor is about 2.79 GiB; at sixteen bits it is about 5.59 GiB. The calculation deliberately distinguishes decimal GB from binary GiB.&lt;/p&gt;

&lt;p&gt;Real artifacts are not packed uniformly at that theoretical floor. Quantization blocks may carry scales or zero-points; some tensors may stay at higher precision; headers, alignment, embeddings, and output layers also consume space. Use the bytes of an artifact with a fixed hash, then inspect what the chosen runtime actually loads. "Q4" and "INT4" are not interchangeable byte-count promises across formats and backends.&lt;/p&gt;

&lt;p&gt;More importantly, weight quantization does not shrink the operating system, the compute graph, or the KV cache by the same factor. The llama.cpp server reference exposes model-loading mode, context size, device offload, and K/V cache types as separate controls. If two measurements differ in several of those settings, the file format alone cannot explain the difference.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory mapping does not make RAM free
&lt;/h3&gt;

&lt;p&gt;A runtime may map a model file rather than copying it into one obvious heap allocation. Pages accessed during inference can still become resident and may be shared between processes. A process's RSS can include shared pages, so RSS is not automatically the device's exclusive model cost. Linux documents RSS and proportional-set-size accounting in &lt;code&gt;smaps_rollup&lt;/code&gt;. PSS helps describe shared mappings, but neither RSS nor PSS alone answers whether a separate GPU has enough memory or whether a device allocator can satisfy a large request.&lt;/p&gt;

&lt;p&gt;For a target-device test, keep both process and system observations: available memory, any container limit, swap or OOM events, and device-memory figures where applicable. Record when each figure was captured. A healthy idle reading and an inference peak are different facts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the 512 MiB KV estimate comes from
&lt;/h2&gt;

&lt;p&gt;During autoregressive generation, the model reuses previously calculated keys and values instead of rebuilding them for every new token. The cache exists across attention layers and grows or is reserved according to the runtime's cache strategy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KV bytes ≈ 2 × attention layers
         × KV heads × dimensions per head
         × allocated tokens per session
         × bytes per K/V element
         × simultaneous independent sessions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The leading two represents keys and values. Use the number of key-value heads, not the number of query heads printed elsewhere in a configuration. Grouped-query and multi-query attention may use fewer KV heads than query heads. If keys and values use different data types, calculate their terms separately and add them. A sliding-window layer, a hybrid architecture, or shared state across layers needs a model-specific calculation instead of this uniform expression.&lt;/p&gt;

&lt;h3&gt;
  
  
  A calculation, not a board measurement
&lt;/h3&gt;

&lt;p&gt;Assume 32 standard attention layers, eight KV heads, 128 dimensions per head, and two bytes per K or V element. If a runtime allocates 4,096 tokens for one session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 × 32 × 8 × 128 × 4,096 × 2 = 536,870,912 bytes ≈ 512 MiB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two independently allocated sessions at that same limit would have a 1,024 MiB theoretical KV baseline. Doubling the per-session allocation to 8,192 tokens doubles that term if the other assumptions remain fixed.&lt;/p&gt;

&lt;p&gt;The 512 MiB figure is not a measurement of a commercial model or board. "4,096 tokens" here is an assumed allocation, not a number of visible characters. System instructions, retrieved passages, user input, and reserved output all count toward a request's token budget. Some runtimes reserve the entire configured context; others grow or reuse cache space, allocate blocks, or carry batching overhead. A 100-token chat cannot establish the peak for a 4,096-token configuration, let alone two overlapping long chats.&lt;/p&gt;

&lt;p&gt;Two sessions do not always mean "multiply by two." Under the same hypothetical architecture, one session allocated 4,096 tokens and another allocated 2,048 tokens would have a 512 MiB plus 256 MiB, or 768 MiB, theoretical KV baseline if their caches are independently allocated at those lengths. A runtime reserving two full 4,096-token slots would not obey that 768 MiB figure. Record each slot's effective allocation and the runtime's reported allocation; "two users online" is not a memory measurement. Sharing the model's weights does not imply that two different conversation histories share their KV.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cache quantization and offloading move the trade-off
&lt;/h3&gt;

&lt;p&gt;Lower-precision K/V may reduce the nominal cache-data term, but scales, residual storage, conversion buffers, and latency can change the real saving. Offloading cache from a GPU to the CPU changes where memory is consumed and adds transfer work; it does not create free device capacity. The llama.cpp server options let an operator choose K and V cache types separately.&lt;/p&gt;

&lt;p&gt;When comparing two runs, record the weight artifact, K and V types, context allocation, session count, offload setting, and runtime version together. A result labeled only "4-bit" is ambiguous: it might describe weights while the cache stays at sixteen bits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn 4,096 tokens into an actual request
&lt;/h2&gt;

&lt;p&gt;Allocated tokens are not visible characters. Suppose the longest business input takes 3,000 tokens, the answer allowance is 800, and instructions and templates consume another 200. That is already 4,000. A 4,096-token context leaves little room for a longer retrieved passage or tokenizer variation; an extra 150 tokens can cause truncation before an out-of-memory failure. Raising the context to 8,192 may avoid truncation but can make some runtimes reserve more KV memory.&lt;/p&gt;

&lt;p&gt;That is why a 100-token demo cannot approve an 8 GB product. Separate a short request, the longest allowed single request, and requests that genuinely overlap. If the product searches local manuals or drives a display, leave those services enabled during the concurrent run. Multiplying a single-request peak by a thread count is not a concurrency test: weights may be shared, KV allocation may be reserved or reused, and a runtime may silently queue work.&lt;/p&gt;

&lt;p&gt;Likewise, "two users online" does not mean two full contexts are active. Define a concurrency workload that another engineer can reproduce — for example, two longest inputs overlapping during prompt processing. If a product intentionally serializes long requests to save memory, document the wait time and timeout behavior as part of acceptance. A memory reduction that breaks response-time requirements is not a free win.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the unmeasured cells blank
&lt;/h2&gt;

&lt;p&gt;Fix the product workload before treating any estimate as a requirement: longest actual input, output-token allowance, concurrent users, companion retrieval or audio services, and acceptable failures and latency. Then fix the model artifact hash, tokenizer, architecture configuration, runtime and backend versions, context limit, and K/V type. Without those inputs, a range of candidates is reasonable; "8 GB is enough" is not.&lt;/p&gt;

&lt;p&gt;A working budget should show four stages side by side: static estimate, loaded idle device, longest single request, and maximum intended concurrency. The static stage can contain measured artifact bytes and a calculated KV baseline. Mark compute workspace and system use "to measure" rather than inventing a safety percentage. Observe the loaded stage with all normal services running.&lt;/p&gt;

&lt;p&gt;Copy this blank worksheet for each candidate configuration. Enter values, units, and capture times, and attach the model-file hash, runtime version, and raw logs. Leave cells blank until measured; a static calculation must not masquerade as a device observation. Record both the device peak and MemAvailable in the final row so process RSS is not mistaken for the whole-system answer.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observation (MiB; rows are not additive)&lt;/th&gt;
&lt;th&gt;Static estimate&lt;/th&gt;
&lt;th&gt;Loaded idle&lt;/th&gt;
&lt;th&gt;Longest request&lt;/th&gt;
&lt;th&gt;Intended concurrency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model artifact&lt;/td&gt;
&lt;td&gt;File bytes converted to MiB: ____&lt;/td&gt;
&lt;td&gt;Same artifact hash: ____&lt;/td&gt;
&lt;td&gt;Same&lt;/td&gt;
&lt;td&gt;Same&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model-file mappings, if separately identifiable&lt;/td&gt;
&lt;td&gt;Not inferred from file size&lt;/td&gt;
&lt;td&gt;Mapping RSS/PSS: ____&lt;/td&gt;
&lt;td&gt;Mapping RSS/PSS: ____&lt;/td&gt;
&lt;td&gt;Mapping RSS/PSS: ____&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KV cache&lt;/td&gt;
&lt;td&gt;Architecture formula: ____&lt;/td&gt;
&lt;td&gt;Allocated: ____&lt;/td&gt;
&lt;td&gt;Allocated: ____&lt;/td&gt;
&lt;td&gt;Allocated: ____&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compute, graph, batch buffers, if reported&lt;/td&gt;
&lt;td&gt;To measure&lt;/td&gt;
&lt;td&gt;____&lt;/td&gt;
&lt;td&gt;____&lt;/td&gt;
&lt;td&gt;____&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Inference process total RSS/PSS&lt;/td&gt;
&lt;td&gt;Not the sum of rows above&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;System and companion services; container/device limits&lt;/td&gt;
&lt;td&gt;To measure&lt;/td&gt;
&lt;td&gt;State and limit: ____&lt;/td&gt;
&lt;td&gt;____&lt;/td&gt;
&lt;td&gt;____&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Device peak / simultaneous MemAvailable&lt;/td&gt;
&lt;td&gt;Not inferred from file size&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;td&gt;____ / ____&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The process-total RSS/PSS can already contain mappings, KV, and buffers attributed to that process. The detailed rows explain a peak; they are not separate charges to add together. File bytes and RSS/PSS use different accounting boundaries too. Keep effective input/output tokens, allocated context, truly overlapping sessions, container limits, swap/OOM, and failed requests on the same record. Capture a timestamp for each number so MemAvailable and the reported peak refer to the same moment.&lt;/p&gt;

&lt;p&gt;The measurement sequence is short enough to repeat. Boot the target image with its normal services and record idle MemAvailable. Load the artifact identified by a hash and preserve the runtime's effective weight, context, KV, and workspace settings. Run the longest single request, then genuinely overlapping requests, then observe recovery over several rounds.&lt;/p&gt;

&lt;p&gt;Useful Linux fields include &lt;code&gt;/proc/meminfo&lt;/code&gt; MemAvailable and the inference process's &lt;code&gt;smaps_rollup&lt;/code&gt; RSS/PSS; record container current usage and limits if containerized, and device-memory counters when the runtime provides them. If the runtime omits a field, write "not reported," not a number borrowed from the model file.&lt;/p&gt;

&lt;p&gt;Suppose all you have today is an 8 GB device specification, a 2 GB model artifact, and the hypothetical 512 MiB KV calculation above. The static column can hold artifact bytes and a formula. The next three columns must remain blank. That record says storage has a candidate and cache has a theoretical starting point. It does not say roughly 5.5 GB remains: resident pages, buffers, services, container limits, and actual allocation policy have not been measured on one accounting basis.&lt;/p&gt;

&lt;p&gt;Once the first target-device log arrives, an unexplained difference between theoretical KV, runtime-reported allocation, and the system peak is worth investigating. It may reflect a longer reserved context, batching buffers, another process, or a different memory device. Do not "fix" the worksheet by tuning a multiplier until numbers match. A missing or surprising field tells you which log to collect next.&lt;/p&gt;

&lt;p&gt;Two comparable rows fix the same device, operating-system image, runtime version, and request set while changing one candidate configuration. Comparing a 3B and a 7B model requires reading each model's own layer and KV-head counts; the first model's cache-per-token constant does not transfer. Comparing two weight formats requires checking that the tokenizer, context, and K/V precision did not change in the background. There are no paired device runs behind this article, so it supplies a test design, not a ranking of models for 8 GB hardware.&lt;/p&gt;

&lt;h2&gt;
  
  
  Locate the failure before buying more memory
&lt;/h2&gt;

&lt;p&gt;"The model won't run" can mean that input was rejected before inference, that loading or generation ran out of memory, or that only two overlapping requests fail. Start from an observable failure stage rather than assuming every failure calls for more RAM.&lt;/p&gt;

&lt;p&gt;Preserve the last successful action before a failure. If loading completed but the first request failed, inspect input processing and its allocation. If short requests work but a long one is truncated, inspect the tokenizer and output allowance; more RAM may not address a context-policy error. If only concurrency causes OOM, inspect overlapping time ranges, per-session KV, and container or device limits. If the first round succeeds and later rounds deteriorate, inspect cache release and queued work. Change one variable and rerun the original load; otherwise a new success does not show what fixed the original problem.&lt;/p&gt;

&lt;p&gt;Interpret counters against the memory topology. On unified-memory hardware, process RSS, a GPU API counter, and system availability may describe some of the same physical pages, so adding them can double-count. With discrete VRAM, system RAM can remain available after device memory is exhausted. A container can also hit its own limit while the host still reports headroom. One OOM line without the request shape and effective runtime settings does not prove that the product needs "at least 16 GB."&lt;/p&gt;

&lt;p&gt;Even if quantizing weights or shortening context makes a configuration fit, either change can damage answers, time to first token, or the manual passage the product must retain. After capacity screening, judge the result with a task-relevant answer set and a separate TTFT, TPOT, memory, and power validation pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  When can you call 8 GB enough?
&lt;/h2&gt;

&lt;p&gt;Only for a fixed artifact, effective runtime configuration, and target workload: the longest request and intended concurrency must complete, and the device peak, failures, swap/OOM record, and recovery must meet the product's requirements. File bytes and theoretical KV can screen candidates; they cannot approve capacity.&lt;/p&gt;

&lt;p&gt;If the product must search long manuals while serving a display and multiple users, and reducing context or concurrency would break that requirement, compare a larger-memory device or another deployment approach instead of adding a safety multiplier.&lt;/p&gt;

&lt;p&gt;There are no target-board runs, paired model scales, or paired quantization formats behind this article. The three-billion-parameter, 512 MiB KV, and 2 GB/8 GB figures are worked examples, not performance results for any specific device. A useful purchasing conclusion today may be: "The theoretical account is complete; the whole-device concurrency peak still needs measurement." That is more informative than an unqualified "it runs."&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Hugging Face Transformers: how caching works&lt;/li&gt;
&lt;li&gt;Hugging Face Transformers: cache strategies&lt;/li&gt;
&lt;li&gt;llama.cpp server options&lt;/li&gt;
&lt;li&gt;Linux kernel documentation: /proc and smaps_rollup&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>performance</category>
      <category>edgecomputing</category>
    </item>
    <item>
      <title>Choosing an Edge LLM Runtime: Start with Devices and Model Artifacts</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 05 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/choosing-an-edge-llm-runtime-start-with-devices-and-model-artifacts-19dc</link>
      <guid>https://dev.to/zediot/choosing-an-edge-llm-runtime-start-with-devices-and-model-artifacts-19dc</guid>
      <description>&lt;h1&gt;
  
  
  Choosing an Edge LLM Runtime: Start with Devices and Model Artifacts
&lt;/h1&gt;

&lt;p&gt;Suppose a team wants local question answering on a Linux gateway, then similar capability on an RK3588 device and in a phone app. A tempting plan is to run four runtimes, rank their tokens/s, and standardize on the fastest. That comparison skips an earlier question: &lt;strong&gt;can the team's model become an artifact the target runtime can load?&lt;/strong&gt; It also skips backend support and who will rebuild, package, and release the model when it changes.&lt;/p&gt;

&lt;p&gt;Start with the delivery target:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For a general Linux CPU or supported GPU and a compatible GGUF model, &lt;strong&gt;llama.cpp&lt;/strong&gt; is a sensible first route to check.&lt;/li&gt;
&lt;li&gt;If a supported Rockchip NPU is a product requirement, verify the &lt;strong&gt;RKLLM&lt;/strong&gt; conversion, Runtime, and driver combination.&lt;/li&gt;
&lt;li&gt;A team already maintaining PyTorch models and native mobile apps can evaluate &lt;strong&gt;ExecuTorch&lt;/strong&gt;'s export and backend path.&lt;/li&gt;
&lt;li&gt;A team prepared to compile and distribute target-specific model libraries can evaluate &lt;strong&gt;MLC LLM&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not four interchangeable model players, and none has a universal speed rank independent of hardware, model, and version.&lt;/p&gt;

&lt;p&gt;This guide uses public project documentation to compare &lt;strong&gt;delivery contracts, not benchmark results&lt;/strong&gt;. It makes no claim about decoding speed, time to first token, peak memory, power, or production reliability. Backend lists can change; confirm every route against the version and device you intend to ship.&lt;/p&gt;

&lt;h2&gt;
  
  
  Identify the artifact before comparing speed
&lt;/h2&gt;

&lt;p&gt;The first difference is &lt;strong&gt;what leaves the build machine&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;llama.cpp&lt;/strong&gt; commonly loads a compatible GGUF model and exposes CLI and server entry points. Its official README describes CPU, Metal, CUDA, Vulkan, and other backend paths. That breadth is useful for testing a local model on different general-purpose machines, but a backend name in a README does not prove support for a particular board or that every operation stays on its accelerator.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RKLLM&lt;/strong&gt; has a different chain: Rockchip's PC-side RKLLM-Toolkit converts and quantizes a model, while a board-side Runtime and RKNPU driver run the resulting artifact. Its official repository lists RK3588, RK3576, RK3562, and RV1126B families. The supported model and quantization options still need checking against the selected SDK and firmware. Having a GGUF file and a Linux-based Rockchip board does &lt;strong&gt;not&lt;/strong&gt; mean that file will use the board's NPU through RKLLM.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ExecuTorch&lt;/strong&gt; exports a PyTorch model into a &lt;code&gt;.pte&lt;/code&gt; artifact for its edge Runtime. The LLM path also needs tokenizer and generation components, quantization decisions, and a suitable target backend. A &lt;code&gt;.pte&lt;/code&gt; is not a universal file that will accelerate on every phone. After choosing XNNPACK, Vulkan, Core ML, or a specific NPU route, the team still has to confirm export, operator coverage, and behavior on actual devices. Its attraction to a PyTorch-and-app team is an explicit export and integration path, not a promised speedup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MLC LLM&lt;/strong&gt; puts weight conversion, configuration, and compilation of a target-specific model library into the delivery chain. Its documentation describes explicit compilation and JIT compilation on some Python paths. An iOS or Android product must then decide whether weights ship with the app, download on first use, or update separately, and how those weights stay compatible with the library and app version. Renaming a GGUF or &lt;code&gt;.pte&lt;/code&gt; does not create a usable MLC artifact.&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;Delivery question&lt;/th&gt;
&lt;th&gt;llama.cpp&lt;/th&gt;
&lt;th&gt;RKLLM&lt;/th&gt;
&lt;th&gt;ExecuTorch&lt;/th&gt;
&lt;th&gt;MLC LLM&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Typical artifact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Compatible GGUF&lt;/td&gt;
&lt;td&gt;Converted RKLLM model&lt;/td&gt;
&lt;td&gt;Target-exported &lt;code&gt;.pte&lt;/code&gt; plus generation components&lt;/td&gt;
&lt;td&gt;Converted weights, config, and target model library&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Device boundary to check&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Actual CPU/GPU backend and model support&lt;/td&gt;
&lt;td&gt;Rockchip chip plus Toolkit, Runtime, and driver versions&lt;/td&gt;
&lt;td&gt;App platform, delegate, and operator coverage&lt;/td&gt;
&lt;td&gt;Target compiler backend, runtime library, and packaging path&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Often-missed maintenance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;GGUF and quantization versions, service config&lt;/td&gt;
&lt;td&gt;Model conversion and board software lockstep&lt;/td&gt;
&lt;td&gt;Export regression, app API, backend compatibility&lt;/td&gt;
&lt;td&gt;Per-target compilation, library and weight distribution&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Use the table to &lt;strong&gt;eliminate routes that cannot ship, not to score performance&lt;/strong&gt;. A model-family name does not make four artifacts equivalent: quantization, tokenizer, context settings, and generation code can differ. If procurement asks for one unchanged model file across all devices, test whether that requirement itself is realistic. A product may need several validated artifacts from one model source, each recorded with its own target and build provenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put hardware and update ownership on the same decision sheet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  A Linux gateway prototype is not an NPU deployment
&lt;/h3&gt;

&lt;p&gt;Consider a gateway that answers questions about equipment manuals on site. No NPU has been selected yet. The team knows only that the network may be unavailable, a local API is needed, and the model must work with the retrieval flow. Starting with a supported model and a &lt;strong&gt;llama.cpp service&lt;/strong&gt; can separate functional validation from later resource measurements. Once the hardware is fixed, measure CPU or a supported GPU backend on that target.&lt;/p&gt;

&lt;p&gt;If the eventual product requires a Rockchip NPU, the prototype cannot simply be "moved to the NPU." It needs an &lt;strong&gt;RKLLM conversion path, driver compatibility check, and answer-consistency tests&lt;/strong&gt;. Whether that extra chain pays off is a question for the target board, not an inference from a desktop benchmark.&lt;/p&gt;

&lt;h3&gt;
  
  
  A phone app owns the model release cycle
&lt;/h3&gt;

&lt;p&gt;Now consider a team embedding offline summarization in Android and iOS apps. It already has PyTorch training and evaluation, and wants to release model and app versions together. An &lt;strong&gt;ExecuTorch&lt;/strong&gt; minimum path is worth testing: export one supported model, assign ownership for tokenizer and generation code, and run it on target phones with CPU or a chosen delegate. If the team instead plans to build target GPU model libraries and can maintain the TVM/MLC compilation and packaging infrastructure, &lt;strong&gt;MLC LLM&lt;/strong&gt; is another candidate. Both routes create app-size, first-download, offline-start, weight-update, and rollback questions. A support badge for "Android/iOS" does not settle those choices.&lt;/p&gt;

&lt;p&gt;Even "the same model" can cease to be a comparable test object after different quantization or operator handling. Export can fail; a backend can fall back to CPU; or a model architecture may have to change. Record each candidate as a &lt;strong&gt;chain&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;model source/version → conversion/export version → quantization → target backend → Runtime/driver → tokenizer and generation config&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A ticket that says only "use RKLLM" cannot identify which layer should be rolled back when an update fails.&lt;/p&gt;

&lt;p&gt;For OTA products, &lt;strong&gt;attach that chain to the release record&lt;/strong&gt;. Weights, Runtime, driver, and app interface may not be independently upgradeable. Replay a fixed question set on a small target-device cohort before widening rollout. The point is to make artifact dependencies visible before choosing the runtime.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tokens/s screenshot is not an architecture decision
&lt;/h2&gt;

&lt;p&gt;Before a comparison, define &lt;strong&gt;"same conditions"&lt;/strong&gt;: actual device, power and thermal conditions, model source and weights, acceptable quantization differences, tokenizer, prompt, context length, concurrency, and output limit. Then record cold start, time to first token, sustained generation, peak memory, temperature, power, and answer quality. If conversion changes operators or quantization, describe the difference instead of presenting the numbers as a pure runtime race.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Three cheaper gates come first:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can conversion or export complete reliably, and can the artifact load on the locked Runtime version?&lt;/li&gt;
&lt;li&gt;Is the intended backend really executing the work, without an unacceptable CPU fallback?&lt;/li&gt;
&lt;li&gt;Can the device return to a known-good model, Runtime, and configuration after failure?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A fast demo does not make a production route sound if any of those three checks fails.&lt;/p&gt;

&lt;p&gt;Include user experience in the measurement plan. A field manual assistant needs a timely answer with traceable sources. A mobile app needs a controlled first download and useful offline behavior. An industrial terminal may share memory with camera, UI, and networking tasks. Average decode speed cannot stand in for first response, memory peaks, or long-running thermal stability.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to abandon the first candidate
&lt;/h2&gt;

&lt;p&gt;If a GGUF runs on the Linux prototype but the product contract specifies a &lt;strong&gt;Rockchip NPU&lt;/strong&gt;, do not promise that llama.cpp will use that NPU merely because it has several general backends. Verify the actual board's backend; if the official Rockchip chain is required, assess &lt;strong&gt;RKLLM&lt;/strong&gt; separately. In the opposite situation — hardware still uncertain, models changing frequently, and no capacity to maintain conversion matrices — binding to RKLLM early can turn model exploration into a firmware compatibility project.&lt;/p&gt;

&lt;p&gt;ExecuTorch is a concrete candidate for a mobile team with a PyTorch export and native-app workflow. If the target model cannot export reliably or important operators have no suitable delegate coverage, "mobile-friendly" is not a reason to keep investing. MLC LLM's multi-target compilation can be attractive, but &lt;strong&gt;without ownership of compiler, model-library, and weight-package versions it is not a low-maintenance shortcut&lt;/strong&gt;. The team can validate the product task with a simpler route while hardware and update frequency are still fluid.&lt;/p&gt;

&lt;p&gt;The output of this selection should be a short &lt;strong&gt;responsibility record&lt;/strong&gt;: target device, shippable model artifact, intended backend, rollback version set, and owner of conversion and app integration. If a field remains unknown, run a minimal test on one target device and record the unsatisfied condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources and scope
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;llama.cpp official README&lt;/li&gt;
&lt;li&gt;Rockchip RKLLM repository&lt;/li&gt;
&lt;li&gt;ExecuTorch LLM and backend documentation&lt;/li&gt;
&lt;li&gt;MLC LLM compilation and packaging&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These sources support claims about documented interfaces and delivery paths. They do not establish target-device benchmark results. Before a production decision, recheck exact project versions, model licenses, target OS and backend constraints, and keep failed test cases and rollback outcomes with the release record.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>performance</category>
    </item>
    <item>
      <title>How to Choose an RK3588, RK3576, RK3568, or RK3566 Core Board</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 03 Nov 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/how-to-choose-an-rk3588-rk3576-rk3568-or-rk3566-core-board-16l1</link>
      <guid>https://dev.to/zediot/how-to-choose-an-rk3588-rk3576-rk3568-or-rk3566-core-board-16l1</guid>
      <description>&lt;h1&gt;
  
  
  How to Choose an RK3588, RK3576, RK3568, or RK3566 Core Board
&lt;/h1&gt;

&lt;p&gt;Suppose a device needs two cameras, two wired network connections, and a display. A supplier sends back a one-page RK3588 or RK3576 specification headed "6 TOPS, eight cores." Neither number answers the first design question: &lt;strong&gt;can the particular core board and carrier board run those interfaces together?&lt;/strong&gt; A SoC may expose a controller that the module does not bring to its connector, or the carrier may route a high-speed lane to a different peripheral. For a single-display controller with one Ethernet port and modest local inference, starting with RK3588 by default may buy capability the product cannot use.&lt;/p&gt;

&lt;p&gt;The useful first pass is &lt;strong&gt;elimination, not a four-chip performance ladder&lt;/strong&gt;. List the interfaces and software constraints that cannot be traded away. Use Rockchip's public SoC documentation to narrow the field. Then request evidence for the exact module revision and carrier design, and test sustained operation in the product enclosure. This article supports that documentation-stage shortlist. It is not a measured comparison of frame rate, power, temperature, unit price, or availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with interfaces that must operate at the same time
&lt;/h2&gt;

&lt;p&gt;Write a &lt;strong&gt;simultaneous-use requirement&lt;/strong&gt;, such as "two camera inputs + two physical Ethernet ports + NVMe storage + one touch display," rather than four independent checkboxes. The camera path still has to coexist with display, video processing, storage, and network traffic at the required resolution and format. A controller on the SoC block diagram is not proof that the module exposes it; a signal on the module connector is not proof that the carrier provides a usable port. Extra NPU capacity cannot create a lane already assigned elsewhere.&lt;/p&gt;

&lt;p&gt;The distinction is especially important for &lt;strong&gt;shared high-speed resources&lt;/strong&gt;. Rockchip's RK3576 product page lists USB 3.0, PCIe 2.1, and SATA among combo interface options. Those labels should not be counted as independent ports in the same configuration. The RK3566 brief datasheet likewise describes shared high-speed resources. Ask the board supplier to map the exact target peripherals to pins and mux selections before freezing a design.&lt;/p&gt;

&lt;p&gt;Software can eliminate a candidate even when the wiring works. "Boots Linux" is weaker than "the supplier's current BSP supports this camera sensor, display panel, network PHY, and NPU runtime together." Record the module and carrier revisions, kernel branch, device tree, image version, driver ownership, and patch path. A boot demo proves only the first step. Products with field updates and component substitutions need a maintainable software combination, not an isolated demonstration.&lt;/p&gt;

&lt;p&gt;The decision path separates documentation screening from product testing. Failure at either hardware gate ends the current board proposal; passing them only qualifies a module-and-carrier combination for a reproducible software check and sample test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where each SoC belongs on an initial shortlist
&lt;/h2&gt;

&lt;p&gt;The following rows identify plausible evaluation tasks and the first board-level question for each chip. They do not rank four tested products under one workload.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Candidate&lt;/th&gt;
&lt;th&gt;Reason to evaluate it&lt;/th&gt;
&lt;th&gt;First question for the module vendor&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RK3588&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multiple high-resolution vision inputs, complex displays, or substantial high-speed expansion&lt;/td&gt;
&lt;td&gt;Which camera, display, PCIe/storage, and Ethernet paths are exposed concurrently, and how is the enclosure cooled?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RK3576&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A display-and-vision terminal with industrial connections&lt;/td&gt;
&lt;td&gt;How are combo lanes assigned, are both network paths and CAN FD exposed on this board revision, and which BSP is supported?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RK3568&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A gateway, HMI, or lighter vision device that still needs networking and expansion&lt;/td&gt;
&lt;td&gt;What do the module connector and carrier actually provide for Ethernet, PCIe/SATA, image support, and temperature range?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;RK3566&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A single-screen or lighter edge-control device where limited expansion is acceptable&lt;/td&gt;
&lt;td&gt;Are its exposed peripherals, shared lanes, memory, and runtime headroom sufficient for the target application?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  RK3588 and RK3576 share a headline NPU figure, not a system profile
&lt;/h3&gt;

&lt;p&gt;The RK3588 product page describes &lt;strong&gt;four Cortex-A76 and four A55 cores&lt;/strong&gt;, multiple camera inputs, high-resolution media capabilities, and a &lt;strong&gt;6 TOPS NPU&lt;/strong&gt;. Rockchip describes RK3576 with &lt;strong&gt;four A72 and four A53 cores&lt;/strong&gt;, a 6 TOPS NPU, multiple display options, CAN FD, and two RGMII interfaces. Equal advertised NPU figures do not establish equal operator coverage, CPU preprocessing time, memory behavior, video throughput, or sustained performance.&lt;/p&gt;

&lt;p&gt;For a product dominated by several camera streams, complex display output, and fast storage, include an RK3588 board in the test set. For a display-focused industrial terminal that also needs network and field-bus connections, an RK3576 board deserves evaluation. These are reasons to &lt;strong&gt;request pinout and BSP evidence&lt;/strong&gt;, not promises about which finished device will perform better.&lt;/p&gt;

&lt;p&gt;Do not transfer a carrier's connector list to every board using the same SoC. Firefly, for example, describes Core-3588JD4 together with the MB-JD4-RK3588 carrier in its AIO development board; HDMI, serial, camera, and other accessible connectors belong to that defined combination. Another RK3588 module can have a different board-to-board connector, power design, image, or manufacturing revision.&lt;/p&gt;

&lt;h3&gt;
  
  
  RK3568 and RK3566 need separate network and expansion checks
&lt;/h3&gt;

&lt;p&gt;The RK3568 brief datasheet and RK3566 brief datasheet both describe &lt;strong&gt;quad-core A55&lt;/strong&gt; devices with media and edge-compute resources. That common ground puts them in the same early screening exercise, but does not make their boards interchangeable. If a gateway needs two independent wired networks plus high-speed storage and expansion, ask an RK3568 supplier for the exact port and lane map. If one physical network and modest peripherals meet the requirement, an RK3566 module may remain in scope. Neither conclusion establishes price or power savings; those need like-for-like quotations and measurements.&lt;/p&gt;

&lt;p&gt;Firefly's Core-3568J and Core-3566JD4 documentation shows how a specific module is paired with a carrier to make a usable development system. It is a useful prompt for supplier questions, not a universal specification for all RK3568 or RK3566 boards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three pieces of evidence turn a chip shortlist into a board shortlist
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;First, request an interface and concurrency map for the exact core-board revision.&lt;/strong&gt; A pinout, board-to-board connector definition, carrier schematic, or supplier-signed interface matrix should show camera lanes, display outputs, PHYs, PCIe, SATA, USB, CAN, serial, and debug paths in one place. Mark mux alternatives explicitly. A design supported only by a SoC block diagram, without evidence that the board exposes the required combination, is not ready for board freeze.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, request a reproducible software set&lt;/strong&gt;: module and carrier revisions, bootloader, kernel and device tree, Linux or Android image, NPU runtime, relevant camera and display drivers, and the supplier's update channel. Ask for a minimal image and test steps for the functions the product will actually ship. For "two cameras, local inference, and network upload," a camera preview and an unrelated NPU demo are not an end-to-end validation. Acquisition, preprocessing, inference, output, and error recovery need to run in one versioned setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third, define the sustained-operation boundary.&lt;/strong&gt; Published operating-temperature ranges and heatsink recommendations do not predict temperature inside the final enclosure. At the intended ambient temperature, record frequency, power, dropped frames, restart behavior, and component temperatures while the actual peripherals run together. A gateway also needs tests for network loss, power loss, storage wear, and recovery. Until those records exist, the honest conclusion is &lt;strong&gt;"eligible for evaluation," not "production-ready."&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Apply the evidence to the product, not to a chip hierarchy
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Multi-camera industrial vision device.&lt;/strong&gt; Give RK3588 and RK3576 board suppliers the same sensor, resolution, encoding, display, network, and storage workload. Compare their pinout and lane allocation first. Then run the same model and runtime version on candidate hardware inside a representative thermal setup. Decide whether RK3568 or RK3566 should leave the list based on the target chain, not a presumed market tier. Both six-TOPS labels leave end-to-end frame rate and cooling unresolved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dual-network gateway with a local HMI.&lt;/strong&gt; Establish whether the networks must be physically independent and whether cellular, CAN, isolated serial, or maintainable storage is also required. RK3568 and RK3576 are reasonable documentation-stage candidates; a single-network, single-screen product may also retain RK3566. Require a board-specific PHY and connector map, then test the actual protocols and recovery behavior. CPU or NPU peaks are poor substitutes for wiring, power, and update evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single-display controller.&lt;/strong&gt; Ask whether multiple video streams, fast storage, or complex inference are genuine requirements. If not, begin with specific RK3566 or RK3568 modules and add RK3576 or RK3588 only when an identified display, vision, or industrial interface exceeds their board-level resources. Do not infer lower price or power from the chip name. Quotations become comparable only after memory, storage, carrier, cooling, quantity, and support terms are held constant.&lt;/p&gt;

&lt;h2&gt;
  
  
  When none of the four is the right starting point
&lt;/h2&gt;

&lt;p&gt;A product doing &lt;strong&gt;simple sensing and control&lt;/strong&gt;, without Linux-class applications or media processing, may be better served by an MCU or a simpler platform. If the hard constraint is &lt;strong&gt;cellular certification, electrical isolation, deterministic control, or long-term supply&lt;/strong&gt;, select around that system boundary first. Familiarity with Rockchip is not a reason to force one of these application processors into the design. Conversely, if a specific peripheral driver or NPU operator is mandatory and the available BSP cannot establish support, a generic "Linux supported" statement should not keep a board on the shortlist.&lt;/p&gt;

&lt;p&gt;The useful output of this phase is a &lt;strong&gt;record of rejected candidates and why they failed&lt;/strong&gt;, plus no more than two module-and-carrier combinations for sample testing. Attach each combination's interface map, software versions, power and cooling proposal, and the workload that must be measured. The next discussion can then be about a reproducible product configuration rather than an abstract claim that one chip is "stronger."&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources and scope
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Rockchip RK3588 product specifications&lt;/li&gt;
&lt;li&gt;Rockchip RK3576 product specifications&lt;/li&gt;
&lt;li&gt;Rockchip RK3568 brief datasheet&lt;/li&gt;
&lt;li&gt;Rockchip RK3566 brief datasheet&lt;/li&gt;
&lt;li&gt;Firefly Core-3588JD4, Core-3576JD4, Core-3568J, and Core-3566JD4&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The conclusions above are limited to public SoC and board documentation. They do not cover the target module's complete connector definition, current BSP release notes, orderable part number, or a like-for-like workload measurement. The product scenarios are selection exercises, not results from a deployment.&lt;/p&gt;

</description>
      <category>iot</category>
      <category>architecture</category>
      <category>performance</category>
      <category>linux</category>
    </item>
    <item>
      <title>ESP32-P4 Has No Wi-Fi: Choosing a C6 Co-Processor, Transport, and Dual-Firmware Boundary</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Thu, 29 Oct 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/esp32-p4-has-no-wi-fi-choosing-a-c6-co-processor-transport-and-dual-firmware-boundary-3imj</link>
      <guid>https://dev.to/zediot/esp32-p4-has-no-wi-fi-choosing-a-c6-co-processor-transport-and-dual-firmware-boundary-3imj</guid>
      <description>&lt;h1&gt;
  
  
  ESP32-P4 Has No Wi-Fi: Choosing a C6 Co-Processor, Transport, and Dual-Firmware Boundary
&lt;/h1&gt;

&lt;p&gt;ESP32-P4 does not integrate Wi-Fi or Bluetooth. When a product needs P4's display, camera, or multimedia capabilities &lt;strong&gt;and&lt;/strong&gt; wireless connectivity, one officially supported architecture is to use an &lt;strong&gt;ESP32-C6 as a wireless co-processor&lt;/strong&gt;. P4 keeps running the application, UI, and TCP/IP stack; C6 does the actual Wi-Fi and Bluetooth work; SDIO, SPI, or UART connects the two chips.&lt;/p&gt;

&lt;p&gt;That is more than attaching a serial Wi-Fi module. Control calls and network data cross the chip boundary. P4 and C6 each run firmware, must establish reset and handshake state during startup, and need a version and update policy that covers &lt;strong&gt;both&lt;/strong&gt; images. A poorly chosen transport can constrain the network path. A demo that connects once, without a dual-firmware lifecycle, merely postpones the hardest failures until system integration or field upgrades.&lt;/p&gt;

&lt;p&gt;This article uses Espressif's public documentation to define the architecture and a validation order. It contains no measurements from a target board, so it makes no project-specific claim about throughput, latency, power, recovery time, or production readiness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the responsibility boundary between P4 and C6
&lt;/h2&gt;

&lt;p&gt;Espressif's ESP32-P4 Function EV Board guide describes the onboard ESP32-C6-MINI-1 as the Wi-Fi and Bluetooth communication module. That reference design makes the basic split concrete: &lt;strong&gt;P4 provides the high-performance MCU, display, imaging, and multimedia side; C6 provides the radios.&lt;/strong&gt; C6 is neither a standby P4 nor the place where the whole product application must move.&lt;/p&gt;

&lt;p&gt;ESP-Hosted divides the inter-chip traffic into two logical paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Control path&lt;/strong&gt; — carries calls such as scanning, joining an access point, and starting SoftAP from P4 to C6, where the real radio operation happens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data path&lt;/strong&gt; — bridges network frames from C6 to a network interface on P4. The P4-side lwIP, DHCP, sockets, and application protocols continue to work through that interface.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This split gives debugging a useful order. If the product cannot get online, do not begin with MQTT, HTTP, or certificates:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First prove that the &lt;strong&gt;P4-C6 transport is established&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Then prove that &lt;strong&gt;control calls can associate&lt;/strong&gt; with an access point.&lt;/li&gt;
&lt;li&gt;Only after that diagnose &lt;strong&gt;DHCP and application traffic&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the INIT and capability exchange never completes, cloud-side changes only add noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  SDIO, SPI, or UART: choose for the product, not the demo
&lt;/h2&gt;

&lt;p&gt;The ESP-Hosted-MCU guide supports SDIO, SPI Full-Duplex, SPI Half-Duplex, and UART between an MCU host and an Espressif co-processor. All can establish a hosted link between P4 and C6, but they differ in wiring, board requirements, and the amount of traffic they are meant to carry. Public documentation can support a first elimination round; it cannot supply a throughput promise for a board and workload that have not been tested.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Transport&lt;/th&gt;
&lt;th&gt;What the official guide establishes&lt;/th&gt;
&lt;th&gt;A sensible first validation use&lt;/th&gt;
&lt;th&gt;Cost to account for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SDIO&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Highest-throughput option in the guide; C6 supports it&lt;/td&gt;
&lt;td&gt;Products with image, audio/video, larger file, or sustained network traffic, where the PCB can support the bus&lt;/td&gt;
&lt;td&gt;More signals, mandatory pull-ups, and a proper PCB for four-bit operation; signal and power integrity require validation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SPI Full-Duplex&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Called the easiest and most robust bring-up path; C6 supports it&lt;/td&gt;
&lt;td&gt;A first ESP-Hosted design with moderate traffic, where the team wants an observable baseline quickly&lt;/td&gt;
&lt;td&gt;Handshake, data-ready, and reset signals still required; target-load throughput must still be measured&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SPI Half-Duplex&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One-, dual-, and quad-line modes available, but not simply interchangeable with a generic SPI peripheral&lt;/td&gt;
&lt;td&gt;Teams that understand the ESP-Hosted SPI-HD implementation and need a more specialized path&lt;/td&gt;
&lt;td&gt;Host and co-processor implementations must match; high-speed quad operation belongs on a PCB, not jumper wires&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;UART&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fewest signals; marked as the lowest-throughput choice and &lt;strong&gt;not for more than 1 Mbit/s&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Basic control, low-data prototypes, or a quick proof of the control path&lt;/td&gt;
&lt;td&gt;A design can pass a light demo and still fail under real traffic; hosted Wi-Fi and Bluetooth share the link&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Do not copy the development-board pinout blindly
&lt;/h3&gt;

&lt;p&gt;The official guide publishes example mappings for the P4 Function EV Board and C6. A custom board still needs its own pin-mux, power, pull-up, reset, and debug review. SDIO in particular requires &lt;strong&gt;external pull-ups on CMD and data lines&lt;/strong&gt;; the guide also recommends length matching, controlled routing, and power-integrity work for a production PCB. A reference board proves that an architecture exists, not that arbitrary routing will behave the same way.&lt;/p&gt;

&lt;p&gt;Both firmware images must also select the &lt;strong&gt;same transport, bus width, and pins&lt;/strong&gt;. A C6 image built for SPI will not negotiate automatically with a P4 image built for SDIO. Store the configuration, board revision, and firmware commit for both sides in one release record — far easier to reason about than reconstructing the combination from logs after a field failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  A practical order for choosing the first bus
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If the product clearly carries &lt;strong&gt;video, large images, or sustained downloads&lt;/strong&gt;, evaluate &lt;strong&gt;SDIO early&lt;/strong&gt; and budget its signal, reset, and power work in the schematic.&lt;/li&gt;
&lt;li&gt;If this is the team's &lt;strong&gt;first ESP-Hosted integration&lt;/strong&gt; and the immediate goal is to prove control, data, and dual-firmware workflows, &lt;strong&gt;SPI Full-Duplex&lt;/strong&gt; provides a lower-friction baseline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UART&lt;/strong&gt; is suitable for concept proof or genuinely small traffic. It is not a good starting point when the requirement already exceeds the public UART boundary.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The final decision must come from the target workload. Record transport settings, Wi-Fi mode, packet sizes, direction, concurrent UI or camera work, retries, and error counters. A successful ping or DHCP lease proves that basic control and data paths work — it does not prove sustained throughput or acceptable interaction latency for the complete device.&lt;/p&gt;

&lt;h2&gt;
  
  
  Startup, reset, and two firmware images are the real system boundary
&lt;/h2&gt;

&lt;p&gt;A dual-chip design turns "firmware version" into a &lt;strong&gt;tested combination&lt;/strong&gt;. The P4 host and C6 co-processor use corresponding ESP-Hosted code and configuration. Updating only one side may leave message formats, capabilities, or transport settings incompatible before the business application even starts. A support record should identify the P4 firmware, C6 firmware, ESP-IDF, ESP-Hosted revision, and the combinations that have passed acceptance.&lt;/p&gt;

&lt;h3&gt;
  
  
  P4 must be able to return C6 to a known state
&lt;/h3&gt;

&lt;p&gt;The official guide requires a &lt;strong&gt;host-controlled signal to the co-processor's EN/RST pin&lt;/strong&gt; and uses it to synchronize startup state. A product cannot assume both chips always power up or reset together. Watchdogs, wake from sleep, brownouts, and partial resets can leave one side holding state from an earlier session. The startup state machine therefore needs an owner for reset, an INIT timeout, a limited retry policy, and a clear degraded state when the wireless co-processor is unavailable.&lt;/p&gt;

&lt;p&gt;During bring-up, stop at the first missing checkpoint. Confirm matching transport and GPIO settings, then the INIT and capability exchange, then AP association and an IP address, and only then the real application. If base transport is absent, inspect wiring, pull-ups, power, clocking, and configuration before blaming the access point or backend.&lt;/p&gt;

&lt;h3&gt;
  
  
  Updating C6 must be part of the product release, not a bench procedure
&lt;/h3&gt;

&lt;p&gt;ESP-Hosted-MCU includes an example in which the &lt;strong&gt;host updates the co-processor through the existing transport&lt;/strong&gt;. The official material also points to a separate UART and serial-flasher path for some designs. Those examples establish that update mechanisms exist — a product still has to define image origin, integrity checks, failure recovery, and version compatibility, and verify that an &lt;strong&gt;interrupted C6 update leaves a recoverable device&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A practical release can treat P4 and C6 firmware as &lt;strong&gt;two artifacts in one bundle&lt;/strong&gt;. Record both hashes and the compatible pair. Check preconditions, update the selected side, wait for the transport and network checks to recover, and commit the pair only when the critical application path passes. If the product requires A/B images, rollback, or secure boot, verify those properties on &lt;strong&gt;each chip separately&lt;/strong&gt; — P4-side OTA does not automatically provide equivalent protection for C6.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where P4 + C6 is a good fit — and where it is unnecessary
&lt;/h2&gt;

&lt;p&gt;P4 + C6 is a strong candidate when the product genuinely needs P4 peripherals or compute: a local vision terminal with MIPI camera and display, a complex LVGL HMI, a multimedia control panel, or a device that benefits from separating UI and imaging work from the radio stack. In those cases, the extra co-processor, bus, and firmware lifecycle purchase a useful combination of capabilities.&lt;/p&gt;

&lt;p&gt;If the product is primarily sensing, relay control, or ordinary connectivity and does not need P4's camera, display, or multimedia interfaces, start by evaluating a &lt;strong&gt;wireless ESP32-S3, C6, or another single-chip option&lt;/strong&gt;. One chip removes an inter-chip bus, a co-processor image, and a recovery path. "Newer" or "faster" is not a sufficient reason to select P4 — the design should name a local task that a simpler device cannot meet.&lt;/p&gt;

&lt;p&gt;The architecture is also a poor fit when the PCB cannot support a reliable SDIO or SPI implementation for the required traffic, or when the team cannot maintain two firmware images. Forcing excessive traffic through UART or relying on manual C6 flashing is a reason to revisit the host or network architecture rather than a workaround to normalize.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bring these inputs to the schematic review
&lt;/h2&gt;

&lt;p&gt;Before choosing a bus, gather:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the UI, camera, audio, or local-inference tasks that run concurrently on P4;&lt;/li&gt;
&lt;li&gt;the peak and sustained Wi-Fi traffic, plus whether Bluetooth runs at the same time;&lt;/li&gt;
&lt;li&gt;GPIOs, reset, debug ports, and PCB resources available for the P4-C6 link;&lt;/li&gt;
&lt;li&gt;startup-time, reconnect, offline, and field-update requirements;&lt;/li&gt;
&lt;li&gt;the release relationship between P4 and C6 images, including signing, rollback, and factory traceability requirements.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That input is enough to choose a useful first SDIO, SPI, or UART validation and to expose whether dual-firmware ownership exceeds the team's support capacity. When the requirement is still only "add Wi-Fi to P4," the missing design work is usually not an API call — it is &lt;strong&gt;bus allocation, reset control, and lifecycle ownership&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  References and validation boundary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;ESP32-P4 Series Datasheet&lt;/li&gt;
&lt;li&gt;ESP32-P4 Function EV Board User Guide&lt;/li&gt;
&lt;li&gt;ESP-Hosted-MCU: Getting Started for MCU Host&lt;/li&gt;
&lt;li&gt;ESP-Hosted-MCU: Troubleshooting&lt;/li&gt;
&lt;li&gt;ESP-Hosted-MCU: Host Performs Slave OTA&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article validates only public contracts and examples. It does not measure target-board throughput, latency, power, reconnect behavior, or interrupted updates, and it does not validate a particular antenna, RF, EMC, or factory-flashing design. "Good fit" here means eligible for engineering validation, not production-proven.&lt;/p&gt;

</description>
      <category>esp32</category>
      <category>iot</category>
      <category>performance</category>
      <category>tinyml</category>
    </item>
    <item>
      <title>Building a Multi-I2C Sensor Gateway with ESP32 and ESPHome</title>
      <dc:creator>ZedIoT</dc:creator>
      <pubDate>Tue, 27 Oct 2026 12:20:00 +0000</pubDate>
      <link>https://dev.to/zediot/building-a-multi-i2c-sensor-gateway-with-esp32-and-esphome-4pb0</link>
      <guid>https://dev.to/zediot/building-a-multi-i2c-sensor-gateway-with-esp32-and-esphome-4pb0</guid>
      <description>&lt;h1&gt;
  
  
  Building a Multi-I2C Sensor Gateway with ESP32 and ESPHome
&lt;/h1&gt;

&lt;p&gt;Connecting an SCD41, a BME680, a light sensor, and an electrochemical gas sensor to the same ESP32 can look like a simple ESPHome exercise. In real deployments, the hard part is usually not whether the first readings appear. It's whether the I2C bus, sensor warm-up behavior, power noise, deep sleep schedule, and Home Assistant entities are designed as &lt;strong&gt;one system&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The core conclusion is simple: a multi-I2C environmental gateway is not an ESP32 with more sensors attached. It's a constrained data chain from power and bus design to sampling, diagnostics, and publication. If every sensor is treated as an independent YAML block, the project is likely to fail on address conflicts, unstable first readings, drift after sleep, or unclear failure diagnosis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope note.&lt;/strong&gt; A multi-I2C environmental gateway here means an ESP32 running ESPHome that reads several environmental sensors and publishes temperature, humidity, CO2, VOC, light, or gas trend data to Home Assistant or another platform. It's useful for trend monitoring, automation triggers, and device-side diagnostics. It should not be treated as a lab-grade calibrated instrument or a safety interlock.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why a multi-sensor gateway is more than a component list
&lt;/h2&gt;

&lt;p&gt;ESPHome provides an I2C bus component and common environmental sensor integrations such as SCD4x and BME680. That makes prototyping fast, but a working example for one component is not the same thing as a production-ready gateway design.&lt;/p&gt;

&lt;p&gt;A real multi-sensor node has to handle five constraints at once:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Addressing and topology:&lt;/strong&gt; fixed sensor addresses can collide, and cable length affects bus reliability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Warm-up and measurement cadence:&lt;/strong&gt; CO2, VOC, and electrochemical sensors may not be trustworthy immediately after power-up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power and noise:&lt;/strong&gt; sensor heaters, Wi-Fi transmission, long wires, and weak regulators can affect both analog front ends and I2C stability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep sleep:&lt;/strong&gt; saving ESP32 power changes the meaning of continuous measurement, baselines, and first readings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platform semantics:&lt;/strong&gt; Home Assistant needs reliable entities and diagnostic signals, not every raw register.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When one ESP32 handles multiple I2C sensors, Wi-Fi publication, and low-power wake cycles, reliability depends more on sampling cadence and fault isolation than on the number of sensors the board can physically connect.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Recommended layering: separate bus, sampling, and publication
&lt;/h2&gt;

&lt;p&gt;The important point is the boundary.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hardware&lt;/strong&gt; should solve power and bus risks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firmware&lt;/strong&gt; should control sampling, filtering, and failure marking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The platform&lt;/strong&gt; should receive entities that already have operational meaning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If these responsibilities are mixed together, every strange reading becomes a long argument about whether the sensor, the bus, or the automation rule failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. I2C bus design: resolve conflicts before tuning sampling
&lt;/h2&gt;

&lt;p&gt;ESPHome's I2C &lt;code&gt;scan&lt;/code&gt; option is useful during development, but it should not be the main operational diagnostic. A deployable gateway should answer these questions before the enclosure is closed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do any sensors have fixed addresses that collide with other modules?&lt;/li&gt;
&lt;li&gt;Will cable length, connectors, or enclosure placement weaken the I2C signal edge?&lt;/li&gt;
&lt;li&gt;Are pull-up resistors duplicated across breakout boards?&lt;/li&gt;
&lt;li&gt;Is an I2C multiplexer such as TCA9548A needed for same-address devices?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If every sensor is on the same small PCB and addresses do not collide, a single bus is usually enough. If sensors are distributed inside an enclosure, use long wires, or include same-address modules, bus segmentation or a multiplexer is more reliable than hoping a lower I2C clock will solve everything.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Better approach&lt;/th&gt;
&lt;th&gt;Avoid&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Short traces, no address conflict&lt;/td&gt;
&lt;td&gt;One I2C bus with fixed SDA/SCL and known pull-ups&lt;/td&gt;
&lt;td&gt;Depending on boot-time scans as topology control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Same-address sensors&lt;/td&gt;
&lt;td&gt;TCA9548A or separate buses&lt;/td&gt;
&lt;td&gt;Parallel wiring and hoping software can distinguish them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long or removable sensor cables&lt;/td&gt;
&lt;td&gt;Reduce bus risk and add diagnostics&lt;/td&gt;
&lt;td&gt;Treating I2C as a long-distance fieldbus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low-power wake node&lt;/td&gt;
&lt;td&gt;Fixed warm-up and measurement window&lt;/td&gt;
&lt;td&gt;Publishing the first value immediately after power-up&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I2C is a good board-level or short-distance module bus. It is &lt;strong&gt;not&lt;/strong&gt; a replacement for an industrial fieldbus. If the sensors are remote, noisy, or frequently reconnected, evaluate RS485, CAN, Ethernet, or dedicated acquisition modules instead of adding more I2C devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Warm-up and deep sleep: power saving changes data meaning
&lt;/h2&gt;

&lt;p&gt;SCD41-style CO2 sensors, BME680-style environmental sensors with gas estimation, and electrochemical gas sensors may need stable measurement windows or warm-up time. ESP32 deep sleep can reduce average power, but it also introduces three costs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first values after power-up may not be suitable for automation.&lt;/li&gt;
&lt;li&gt;Continuous measurement or baseline algorithms can be disrupted.&lt;/li&gt;
&lt;li&gt;Electrochemical sensors may need bias current and stabilization time that is much longer than the ESP32 wake window.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A practical design should separate sensor classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temperature, humidity, and light:&lt;/strong&gt; often acceptable with shorter wake windows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CO2 trend:&lt;/strong&gt; needs enough measurement time before publication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VOC or gas trend:&lt;/strong&gt; benefits from continuity and baseline stability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety-related gas detection:&lt;/strong&gt; should not rely only on a low-cost ESPHome node.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the sensor needs warm-up or a continuous baseline, deep sleep must be evaluated against data trustworthiness. Saving power is not worth publishing unreliable readings.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. ESPHome modeling: separate diagnostics from business entities
&lt;/h2&gt;

&lt;p&gt;This is a structure example, not a complete production configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;i2c&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bus_a&lt;/span&gt;
  &lt;span class="na"&gt;sda&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GPIO21&lt;/span&gt;
  &lt;span class="na"&gt;scl&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GPIO22&lt;/span&gt;
  &lt;span class="na"&gt;scan&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="na"&gt;sensor&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;platform&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;scd4x&lt;/span&gt;
    &lt;span class="na"&gt;co2&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Room&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;CO2"&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Room&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;CO2&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Sensor&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Temperature"&lt;/span&gt;
    &lt;span class="na"&gt;humidity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Room&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;CO2&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Sensor&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Humidity"&lt;/span&gt;
    &lt;span class="na"&gt;update_interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;60s&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;platform&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bme680&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cabinet&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Temperature"&lt;/span&gt;
    &lt;span class="na"&gt;humidity&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cabinet&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Humidity"&lt;/span&gt;
    &lt;span class="na"&gt;pressure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cabinet&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Pressure"&lt;/span&gt;
    &lt;span class="na"&gt;gas_resistance&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cabinet&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Gas&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Resistance"&lt;/span&gt;
    &lt;span class="na"&gt;update_interval&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;60s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before shipping, add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wi-Fi signal, uptime, reset reason, last valid reading time, and sensor timeout diagnostics.&lt;/li&gt;
&lt;li&gt;Rules that mark first, impossible, or stale values instead of triggering automation immediately.&lt;/li&gt;
&lt;li&gt;Home Assistant recorder retention decisions to avoid storing high-frequency noise.&lt;/li&gt;
&lt;li&gt;Installation position, power design, and firmware configuration version for each sensor group.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. When ESP32 and ESPHome are the wrong fit
&lt;/h2&gt;

&lt;p&gt;Do not force this architecture into these situations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compliance monitoring, life safety, or hard interlock requirements.&lt;/li&gt;
&lt;li&gt;Long sensor distances, strong interference, or frequently disconnected modules where I2C is the wrong link layer.&lt;/li&gt;
&lt;li&gt;Battery life targets measured in months while the sensor itself needs long warm-up or continuous baselines.&lt;/li&gt;
&lt;li&gt;Large industrial deployments that need calibration traceability and field maintenance workflows.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The realistic boundary is clear: ESP32 + ESPHome is a good fit for home, lab, small server room, cabinet, and device-adjacent environmental trend gateways. If the goal becomes compliant monitoring, industrial-scale acquisition, or safety action, move to industrial acquisition hardware, distributed buses, or dedicated sensor gateways.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;ESPHome I2C Bus&lt;/li&gt;
&lt;li&gt;ESPHome SCD4X CO2 Sensor&lt;/li&gt;
&lt;li&gt;ESPHome BME680 Sensor&lt;/li&gt;
&lt;li&gt;ESPHome TCA9548A I2C Multiplexer&lt;/li&gt;
&lt;li&gt;ESPHome Deep Sleep Component&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>esp32</category>
      <category>esphome</category>
      <category>homeassistant</category>
      <category>iot</category>
    </item>
  </channel>
</rss>
