Skip to content
Back to skills

Esp32 Serial Field Diagnostics

ASecurity

Use when diagnosing UART framing errors, RS485 timeouts, serial corruption, boot-log interference, FIFO overruns or intermittent field communication.

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
ai-agentsnode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add Esmail-sarhadi/esp32-agent-skills --skill esp32-serial-field-diagnostics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Esp32 Serial Field Diagnostics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Esp32 Serial Field Diagnostics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/esmail-sarhadi-esp32-serial-field-diagnostics/badge)](https://www.skillsdirectory.com/skills/esmail-sarhadi-esp32-serial-field-diagnostics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: esp32-serial-field-diagnostics
description: Use when diagnosing UART framing errors, RS485 timeouts, serial corruption, boot-log interference, FIFO overruns or intermittent field communication.
license: MIT
---

# Serial Field Diagnostics

Serial failures often appear as application protocol bugs even when the root cause is electrical timing, buffer sizing, pin routing or task starvation. Diagnose from the wire inward.

## Capture before changing code

Record baud, data bits, parity, stop bits, flow control, UART instance, GPIO mapping and driver version. Capture TX, RX, DE/RE and reference ground with a logic analyzer or oscilloscope. Preserve raw bytes and timestamps; formatted logs can hide framing and timing errors. Separate bootloader console from production protocol traffic.

## Buffer and scheduling

Size RX buffers for the largest burst plus scheduler latency, not average packet size. Check FIFO overflow, ring-buffer exhaustion and event-queue drops separately. Do not parse, allocate heap or print verbose logs inside UART ISR context. Use a single owner task or explicit synchronization for each UART driver.

## Protocol parsing

Treat UART as a byte stream. Frames may be split or coalesced across reads. Validate length, address, checksum/CRC and legal state transitions before using payload fields. Add inter-byte and whole-frame timeouts appropriate to the protocol. Resynchronize after malformed input without reading beyond buffer boundaries.

## Physical-layer isolation

Verify logic-level voltage and transceiver type before connecting external equipment. For RS485, verify direction control and bus termination; for RS232, use a level translator. Check ground reference, shield and isolation against installation topology. Swap A/B only as a controlled test after confirming vendor pin definitions.

## Verification

| Symptom | Capture |
|---|---|
| Garbled bytes | TX/RX waveform and UART decode |
| Missing final byte | TX completion vs DE transition |
| Burst loss | FIFO/ring-buffer high-water marks |
| Random protocol errors | CRC failures with timestamps |
| Works on USB, fails in field | Cable, transceiver, grounding and EMI |

## Agent rules

Do not patch the parser until physical waveform and framing are verified. Include bounded buffers and explicit lengths in examples. Never use unsafe string concatenation on raw serial data. Log counters and state transitions without flooding the protocol channel.


## Recovery validation

Verify that a malformed frame, UART overflow and remote-node reset each return the parser to a known idle state without rebooting the device.

Files in this skill

  • LICENSE.txt823 B
  • SKILL.md2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.