freemodbus-integration
Skill36 starsChanged 5 months agoMITView on GitHub
Use when integrating, porting, configuring, or debugging FreeModbus RTU, ASCII, TCP, serial ports, timers, events, register callbacks, or Modbus protocol issues
In this repository75 other files it gives its agents.
- 8051-mcu-debugSkill
- avem-integrationSkill
- battery-charger-fuel-gauge-integrationSkill
- ble-gatt-integrationSkill
- bootloader-debugSkill
- canbus-integrationSkill
- canopen-integrationSkill
- cellular-at-modem-integrationSkill
- cmbacktrace-integrationSkill
- cmsis-dsp-integrationSkill
- cortex-m-debugSkill
- cortex-r5-debugSkill
- crc-checksum-integrationSkill
- easylogger-integrationSkill
- embedded-app-example-libsSkill
- embedded-buffer-queue-libsSkill
- embedded-data-parsing-libsSkill
- embedded-debug-entrySkill
- embedded-fault-debugSkill
- embedded-framework-libsSkill
- embedded-input-libsSkill
- embedded-library-entrySkill
- embedded-linux-login-debugSkill
- embedded-peripheral-bringupSkill
- embedded-serial-log-debugSkill
- embedded-state-machine-libsSkill
- embedded-timing-libsSkill
- epd-integrationSkill
- esp-idf-integrationSkill
- fatfs-integrationSkill
- flashdb-integrationSkill
- freertos-kernel-debugSkill
- freertos-plus-tcp-integrationSkill
- gnss-gps-integrationSkill
- hardware-interface-debugSkill
- heatshrink-integrationSkill
- letter-shell-integrationSkill
- littlefs-integrationSkill
- low-power-debugSkill
- lvgl-integrationSkill
- lwip-integrationSkill
- mbedtls-integrationSkill
- mcuboot-integrationSkill
- mcu-flashing-debugSkill
- micro-ecc-integrationSkill
- miniz-integrationSkill
- mqtt-embedded-integrationSkill
- nanopb-integrationSkill
- nrf-connect-sdk-integrationSkill
- nr-micro-shell-integrationSkill
- openocd-jlink-stlink-debugSkill
- openthread-integrationSkill
- ota-update-integrationSkill
- plooc-integrationSkill
- power-management-integrationSkill
- qspi-xip-flash-debugSkill
- readme-writingSkill
- riscv-mcu-debugSkill
- rtos-debugSkill
- rt-thread-integrationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill to integrate FreeModbus by proving the port layer first: serial/TCP transport, timing, event dispatch, and register …
- Distinctive: line 14
Use this skill when:
- Distinctive: line 20
Do not use this skill when the UART or network transport is not verified.
- Distinctive: line 47
Check address and endian assumptions.
- Distinctive: line 50
Test one function at a time.
- Distinctive: line 51
Start with a simple read holding register before adding writes, coils, or TCP gateway logic.
- Distinctive: line 64
Before claiming FreeModbus works:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Prove transport timing. For RTU, verify baud, parity, stop bits, inter-frame gap, and RS-485 direction control.
- Implement port files. Serial, timer, and event callbacks must match the target scheduler and ISR rules.
- Confirm protocol mode. RTU, ASCII, and TCP have different framing, timing, and porting requirements.
- Validate register callbacks. Holding/input/coils/discrete callbacks must map Modbus addresses to internal storage correctly.
- Check address and endian assumptions. Modbus register numbering, zero-based offsets, word order, and byte order must be explicit.
- 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:
- Asks for UART settings, RS-485 DE/RE control, timer port, slave ID, and bus capture.
- Checks frame gap timer and direction timing before register callbacks.
- Verifies a single read holding register with known data.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

