arXiv(opens in a new tab)cs.NIOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.24231

LoopHIL: Looping Hardware into LLM-assisted Agents for Wireless Embedded Systems

Dhairya Shah, Spanddhana Sara, Savitha Viswanadh Kandala, Ambuj Varshney

ABSTRACT

LLM agents are widely used for software development and debugging, but their adoption in embedded systems, especially for wireless tasks, remains limited. This is because embedded development requires hardware-in-the-loop testing. Agents cannot directly observe the spectrum, probe pins, or measure power, so they cannot verify wireless link functionality; currently, human engineers perform this verification. We systematically evaluate whether LLM agents can establish wireless links when provided with hardware access. We introduce LoopHIL, a framework that lets agents control a multi-device RF bench, monitor it with a spectrum analyzer, logic analyzer, and energy meter, and validate links against a verification ladder, all within code-enforced safety limits. Across four increasingly complex tasks, from generating a carrier to backscatter decoding by a commercial receiver, and using six models from two vendors, hardware-in-the-loop increases task completion rates from 54% to 79% and from 17% to 83% on the most challenging task. It also halves task time and output tokens. With debugging tools, agents decrease tag power consumption by up to 96%. However, small models often report unverified claims, so independent hardware checks remain necessary.

1 INTRODUCTION

LLM agents now write, build and debug software with minimal human intervention, and are increasingly applied to embedded systems. Recent agents compile firmware, flash a board and read its serial output on their own [5, 9], and expert notes further improve them on real hardware [13]. In these settings, the board under test gives the agent feedback through compiler errors, serial logs or measured current [15].

Wireless embedded systems disrupt this feedback loop. A wireless link works only when the devices agree on transmit frequency and power, firmware timing and modulation, and receiver settings and packet format. Backscatter makes this harder. The tag only switches its antenna, so its signal appears only under an external carrier, and only a separate receiver can verify the packets. A timer that is off by half a percent compiles and runs without error, yet the receiver rejects its packets, and no single device detects the problem.

Today, a human closes this loop. An engineer watches a spectrum analyzer to see whether the carrier and the tag's

Figure

Figure 1: LoopHIL overview. The agent reaches the physical layer only through LoopHIL: typed tools with safety limits in code drive the RF bench, and the instruments return features to a verification ladder that blames the faulty device.

sidebands appear, probes the tag’s pin with a logic analyzer to check its timing, and measures its power with an energy meter. They then tell the developer, or an LLM, what to fix. This is slow, requires RF expertise and the bench at hand, and does not scale to the many radios, tags and receivers that low-power systems combine.

LLM agents, by contrast, have no access to physical layer. They see only their code and the text tools return, so they cannot tell whether a link works. We study whether agents can close this loop themselves when given the hardware and the instruments an engineer uses. This raises three problems. First, the agent must reach a multi-device bench through reliable tools, and see measurements it can reason about rather than raw samples. Second, an agent that controls an SDR is a transmitter, so its actions must stay within regulatory limits whatever it decides. Third, agent must not grade itself, because models that cannot finish a task often report success.

We develop LoopHIL (Figure 1), a harness for LLM agents that build RF links on real hardware. The agent turns user intent into a specification, writes firmware for the tag and the receiver, and drives the bench only through typed tools. Instruments (an SDR as spectrum analyzer, a logic analyzer and an energy meter) return measured features rather than samples. A verification ladder takes its own measurements and names the failing device and layer. Safety limits in code gate commands, and expert skills supply domain knowledge.

We compare agents with and without the LoopHIL harness and hardware in loop on four tasks of increasing difficulty, from a single carrier to 2-FSK backscatter decoded by a commercial CC1310, with six models from two vendors. Each model runs each task once in its vendor's coding agent with the hardware attached, and once through LoopHIL. An independent check against the hardware grades every run. With LoopHIL, models complete 79% of runs instead of 54%, and 83% on the hardest task instead of 17%. Where both complete a task, LoopHIL is 2× faster and uses 2× fewer output tokens. When asked to reduce tag power, most agents cut it by 19 to 96% while the tag still sends valid frames. Small models often report unsupported claims, which only an independent check against the hardware reveals.

In summary, this paper makes three contributions:

  • LoopHIL, a harness that gives LLM agents typed access to a multi-device RF bench, feature-level instruments, a verification ladder that blames the faulty device, and safety limits enforced in code.

  • A benchmark of RF tasks on real hardware, from a carrier to backscatter to a commercial receiver, with independent grading that exposes unsupported claims.

  • A systematic study of six models from two vendors with and without hardware in the loop, showing where it helps, where it does not, and what debugging tools add.

References (19)