Skip to content
Development
Skill

/freemodbus-integration

Use when integrating, porting, configuring, or debugging FreeModbus RTU, ASCII, TCP, serial ports, timers, events, register callbacks, or Modbus protocol issues

From plugin
aix-skills
3976 skills

Claude Code

$ npx -y skills add easyzoom/aix-skills --skill freemodbus-integration --agent claude-code

SKILL.md

freemodbus-integration.SKILL.md
name: freemodbus-integration
description: Use when integrating, porting, configuring, or debugging FreeModbus RTU, ASCII, TCP, serial ports, timers, events, register callbacks, or Modbus protocol issues

FreeModbus Integration

Overview

Use this skill to integrate FreeModbus by proving the port layer first: serial/TCP transport, timing, event dispatch, and register callbacks. Modbus bugs are often timing, endian, addressing, or task-context problems rather than protocol logic.

When To Use

Use this skill when:

  • The user wants to add or debug FreeModbus RTU, ASCII, or TCP.
  • The issue involves `portserial.c`, `porttimer.c`, `portevent.c`, register callbacks, CRC errors, timeouts, slave ID, function codes, or Modbus TCP/lwIP integration.
  • A device does not respond, responds with exception codes, or has wrong register values.

Do not use this skill when the UART or network transport is not verified. Use serial or lwIP skills first if the lower layer is unknown.

First Questions

Ask for:

  • Mode: RTU, ASCII, TCP, master, slave, or gateway.
  • MCU/RTOS/compiler and FreeModbus fork/version.
  • Transport: UART/RS-485, TCP/lwIP, or custom.
  • Baud, parity, stop bits, DE/RE control, slave ID, and timeout settings.
  • Register map and callback code.
  • Logic analyzer, serial capture, Modbus poll output, or exception codes.

Integration Checklist

1. Prove transport timing. For RTU, verify baud, parity, stop bits, inter-frame gap, and RS-485 direction control.

1. Implement port files. Serial, timer, and event callbacks must match the target scheduler and ISR rules.

1. Confirm protocol mode. RTU, ASCII, and TCP have different framing, timing, and porting requirements.

1. Validate register callbacks. Holding/input/coils/discrete callbacks must map Modbus addresses to internal storage correctly.

1. Check address and endian assumptions. Modbus register numbering, zero-based offsets, word order, and byte order must be explicit.

1. Test one function at a time. Start with a simple read holding register before adding writes, coils, or TCP gateway logic.

Common Failures

  • RS-485 transmit enable timing cuts off the last byte.
  • Timer tick is wrong, breaking RTU frame gap detection.
  • Register addresses are off by one.
  • Callback returns the wrong exception code or byte count.
  • Modbus TCP works but RTU fails due to serial timing.
  • Event handling blocks inside ISR or wrong task context.

Verification

Before claiming FreeModbus works:

  • State mode, role, slave ID, baud/network settings, and register map.
  • Confirm one read and one write if writes are in scope.
  • Confirm CRC or TCP framing is valid using capture/tool evidence.
  • Confirm timeout and exception behavior.
  • State RS-485 direction control and timer source when RTU is used.

Example

User:

FreeModbus RTU 能收到包但主站一直超时。

Agent:

1. Asks for UART settings, RS-485 DE/RE control, timer port, slave ID, and bus capture. 1. Checks frame gap timer and direction timing before register callbacks. 1. Verifies a single read holding register with known data.

Read more
@easyzoom
Ships withaix-skills

AIX Skills is a public collection of Agent Skills, templates, and references for building repeatable AI workflows.

Stars on GitHub

Momentum

stars in total
39
Star history of easyzoom/aix-skills on GitHub, a chart by star-history.com

Other skills on aix-skills.

8051-mcu-debug

8051-mcu-debug

Use when debugging 8051-compatible microcontrollers, 51 MCU firmware, STC download issues, Keil C51 projects, interrupts, timers,…

@easyzoom@easyzoomInstall Skill
avem-integration

avem-integration

Use when integrating, evaluating, configuring, or debugging Avem embedded C framework modules, event-driven components, drivers,…

@easyzoom@easyzoomInstall Skill
ble-gatt-integration

ble-gatt-integration

Use when integrating, designing, or debugging BLE GATT services, characteristics, descriptors, MTU, notifications, indications,…

@easyzoom@easyzoomInstall Skill
bootloader-debug

bootloader-debug

Use when debugging embedded bootloaders, application jumps, vector table offsets, firmware upgrade flow, OTA state, image…

@easyzoom@easyzoomInstall Skill
canbus-integration

canbus-integration

Use when integrating, porting, configuring, or debugging CAN bus libraries, CANBus-Triple, MCP2515, CAN frames, bit timing,…

@easyzoom@easyzoomInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about freemodbus-integration.

Which coding agents can use freemodbus-integration?
freemodbus-integration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.