Skip to content
Back to skills

Industrial

ASecurity

Industrial communication protocols for Zephyr RTOS. Covers Modbus RTU (serial), Modbus TCP (Ethernet/Wi-Fi), and CANopen basics. Trigger when building factory automation controllers, industrial sensors, or medical equipment interfaces.

  • 63 stars
  • 0 votes
  • 1 copy
  • 5 views
  • Added September 1, 2026
ai-agentsnode

Works with

  • cli

Security analysis

A100/100

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

Scanned September 1, 2026

npx -y skills add beriberikix/zephyr-agent-skills --skill industrial --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Industrial?

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

Security grade badge for Industrial
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/beriberikix-industrial/badge)](https://www.skillsdirectory.com/skills/beriberikix-industrial)

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: industrial
description: Industrial communication protocols for Zephyr RTOS. Covers Modbus RTU (serial), Modbus TCP (Ethernet/Wi-Fi), and CANopen basics. Trigger when building factory automation controllers, industrial sensors, or medical equipment interfaces.
---

# Zephyr Industrial Protocols

Build robust, industry-standard communication systems using Zephyr's modular industrial protocol stacks.

## Core Workflows

### 1. Modbus RTU (Serial)
Implement serial-based industrial communication for meters, PLCs, and sensors.
- **Reference**: **[modbus_rtu.md](references/modbus_rtu.md)**
- **Key Tools**: `CONFIG_MODBUS`, RS-485 DE/RE handling, Register Mapping.

### 2. Modbus TCP
Bridge industrial data over standard Ethernet or Wi-Fi networks.
- **Reference**: **[modbus_tcp.md](references/modbus_tcp.md)**
- **Key Tools**: Port 502, TCP/IP networking, Client/Server patterns.

### 3. CANopen Basics
Integrate with complex automation networks using the CANopenNode stack.
- **Reference**: **[canopen_basics.md](references/canopen_basics.md)**
- **Key Tools**: Object Dictionary (OD), PDO/SDO, Network Management (NMT).

## Quick Start (Modbus RTU Server)
```kconfig
# prj.conf
CONFIG_MODBUS=y
CONFIG_MODBUS_SERIAL=y
```
```c
// Initialize a server on a serial device
const struct device *dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_modbus_serial));
struct modbus_iface_param param = {
    .mode = MODBUS_MODE_RTU,
    .server = { .node_addr = 1, .cb = &my_callbacks },
    .serial = { .baud = 115200, .parity = UART_CFG_PARITY_NONE },
};
modbus_init_server(dev, param);
```

## Professional Patterns (Reliability & Safety)
- **RS-485 Hardware Handling**: Always use the devicetree `uart-rs485` property to handle transceiver direction signals automatically at the driver level.
- **Isolated Communication**: Use galvanically isolated transceivers for both serial and CAN lines in factory environments to prevent damage from ground loops.
- **Watchdog Integration**: In industrial control, always pair your communication loops with the **watchdog_reliability** pattern (see **specialized** skill) to ensure the system enters a fail-safe state on protocol lockup.

## Automation Tools
- **[modbus_register_lint.py](scripts/modbus_register_lint.py)**: Validate register map CSV files for duplicate addresses and overlaps.

## Examples & Templates
- **[modbus_register_map_template.csv](assets/modbus_register_map_template.csv)**: Starter register allocation sheet for Modbus projects.

## Validation Checklist
- [ ] Modbus RTU request/response exchange succeeds against a known test slave/master.
- [ ] Modbus TCP endpoint responds on port 502 with correct register mappings.
- [ ] CANopen node transitions through expected NMT states during startup.
- [ ] Communication faults trigger safe retry or watchdog-protected recovery behavior.

## Resources

- **[References](references/)**:
  - `modbus_rtu.md`: Serial Modbus master/slave setup.
  - `modbus_tcp.md`: Ethernet Modbus client/server patterns.
  - `canopen_basics.md`: Object Dictionary and PDO mapping.
- **[Scripts](scripts/)**:
  - `modbus_register_lint.py`: Register-map consistency checker.
- **[Assets](assets/)**:
  - `modbus_register_map_template.csv`: Register planning template.

Files in this skill

  • SKILL.md3.2 KB
  • assets/modbus_register_map_template.csv579 B
  • references/canopen_basics.md1.7 KB
  • references/modbus_rtu.md3.4 KB
  • references/modbus_tcp.md1.6 KB
  • scripts/modbus_register_lint.py4.8 KB
  • skill-meta.yaml391 B

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.