Seeed-Jetson-DevelopTool / ethercat-setup
AGENTS.md57 starsChanged 4 months agoMITView on GitHub
Establish EtherCAT communication between Jetson and EtherCAT slave devices using the EtherLab EtherCAT Master driver. Covers driver installation, configuration, slave scanning, and motor control example (MyActuator X4). Requires JetPack 6.2 (L4T 36.4.3).
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository297 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-nvrAGENTS.md
- allxon-ota-updateAGENTS.md
- allxon-setupAGENTS.md
- alwaysai-setupAGENTS.md
- backup-restoreAGENTS.md
- bsp-source-buildAGENTS.md
- clawdbot-developmentAGENTS.md
- cochl-sense-setupAGENTS.md
- cvedia-setupAGENTS.md
- dashcamnet-xavier-nx-multicameraAGENTS.md
- deciai-setupAGENTS.md
- deepseek-quick-deployAGENTS.md
- deploy-deepseek-mlcAGENTS.md
- deploy-depth-anything-v3AGENTS.md
- deploy-diaAGENTS.md
- deploy-efficient-vision-engineAGENTS.md
- deploy-frigateAGENTS.md
- deploy-live-vlm-webuiAGENTS.md
- deploy-nvbloxAGENTS.md
- deploy-ollama-anythingllmAGENTS.md
- deploy-riva-llama2AGENTS.md
- developtool-deviceAGENTS.md
- disk-encryptionAGENTS.md
- diy-bsp-buildAGENTS.md
- ethercat-communicationAGENTS.md
- finetune-llm-llama-factoryAGENTS.md
- fix-browser-snap-jetsonAGENTS.md
- gapi-setupAGENTS.md
- generative-ai-introAGENTS.md
- gpt-oss-liveAGENTS.md
- gr00t-n1-5-deploy-thorAGENTS.md
- gr00t-n1-6-deploy-agxAGENTS.md
- hardhat-setupAGENTS.md
- hybrid-bsp-dk-to-recomputerAGENTS.md
- imx477-a603-setupAGENTS.md
- j501-viola-fruit-sortingAGENTS.md
- jetpack5-ssd-boot-fixAGENTS.md
- jetpack-flash-wsl2AGENTS.md
- jetpack-jetson-overviewAGENTS.md
- jetpack-ota-updateAGENTS.md
- jetson-ai-toolsAGENTS.md
- jetson-docker-setupAGENTS.md
- jetson-faqAGENTS.md
- jetson-pc-wired-shareAGENTS.md
- jetson-project-galleryAGENTS.md
- jetson-resource-indexAGENTS.md
- jetson-tutorial-exercisesAGENTS.md
- ko-module-buildAGENTS.md
- l4t-differencesAGENTS.md
- langchain-output-formattingAGENTS.md
- lerobot-env-setupAGENTS.md
- llama-cpp-rpc-distributedAGENTS.md
- llm-interface-controlAGENTS.md
- local-chatbot-multimodalAGENTS.md
- local-chatbot-physicalAGENTS.md
- local-llm-text-to-imageAGENTS.md
- local-rag-llamaindexAGENTS.md
- lumeo-setupAGENTS.md
- maskcam-nanoAGENTS.md
- The first 60 shown.
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run one phase at a time. After each phase:
- Very specific: line 14
If output contains [STOP] → stop immediately, consult the failure decision tree below.
- Very specific: line 15
If output ends with [OK] → tell the user "Phase N complete" and proceed to the next phase.
- Distinctive: line 67
Verify the kernel modules are loaded:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
EtherCAT Setup on Jetson with EtherLab Master
Execution model
Run one phase at a time. After each phase:
- Relay all command output to the user.
- If output contains
[STOP]→ stop immediately, consult the failure decision tree below. - If output ends with
[OK]→ tell the user "Phase N complete" and proceed to the next phase.
Prerequisites
| Requirement | Details |
| Hardware | reComputer Robotics J401 (or compatible Jetson) as EtherCAT master |
| Slave device | EtherCAT slave (e.g. MyActuator X4) with external power |
| JetPack | 6.2 (L4T 36.4.3) |
| Cable | Ethernet cable + adapter if slave uses 4-pin interface (Tx+, Tx–, Rx+, Rx–) |
Most slave devices require additional external power after physical Ethernet connection.
Phase 1 — Hardware connection (~2 min)
Connect the Jetson Ethernet interface directly to the EtherCAT slave device. If the slave uses a 4-pin interface, use an Ethernet-to-4-pin adapter.
Identify the Ethernet interface name:
ifconfigNote the interface name (e.g. eno1). This will be used in subsequent configuration.
[OK] — proceed to Phase 2.
Phase 2 — Install EtherCAT driver (~5–10 min)
Install build dependencies and compile the EtherLab EtherCAT master:
sudo apt update
sudo apt install build-essential cmake libtool autoconf automakegit clone https://gitlab.com/etherlab.org/ethercat.git
cd ethercat
./bootstrap
./configure --sysconfdir=/etc
make all modules
sudo make modules_install install
sudo depmod -aVerify the kernel modules are loaded:
sudo lsmod | grep "ec_"Expected: ec_master and ec_generic modules listed.
[OK] — proceed to Phase 3. [STOP] if modules not found.
Phase 3 — Configure EtherCAT master (~2 min)
Edit the configuration file:
sudo vim /etc/ethercat.confSet these parameters (replace eno1 with your interface name):
MASTER0_DEVICE="eno1"
DEVICE_MODULES="generic"Restart the service and verify:
sudo systemctl restart ethercat
ls /dev/EtherCAT*Expected: /dev/EtherCAT0 appears.
(Optional) If /dev/EtherCAT is not found, try loading modules manually:
sudo modprobe ec_master devices="eno1"
sudo modprobe ec_generic
sudo systemctl restart ethercat(Optional) If the interface is occupied by NetworkManager:
sudo nmcli dev set eno1 managed no
sudo nmcli dev set eno1 managed on[OK] — proceed to Phase 4. [STOP] if /dev/EtherCAT0 does not appear.
Phase 4 — Test communication (~2 min)
Scan for EtherCAT devices and check packet loss:
sudo ethercat rescan
sudo ethercat masterList all slaves on the bus:
sudo ethercat rescan
sudo ethercat slaves -vView PDOs of slave at index 0:
sudo ethercat rescan
sudo ethercat pdos -p 0[OK] — slaves detected and communication verified. [STOP] if no slaves found.
Phase 5 — Motor control example (MyActuator X4, optional) (~5 min)
Clone and build the example motor control code:
git clone https://github.com/jjjadand/ethercat-myctor.git
cd ethercat-myctor/src/build
cmake ..
makeLock CPU frequency and run:
sudo jetson_clocks
sudo ./ethercat_masterExpected: after ~2 seconds, the motor begins to move in a loop.
[OK] — EtherCAT motor control working.
Each EtherCAT motor uses a different communication protocol. Adapt the example for your specific device.
Failure decision tree
| Symptom | Action |
./bootstrap fails | Ensure autoconf and automake are installed. |
ec_master / ec_generic not in lsmod | Re-run sudo depmod -a and sudo modprobe ec_master. Check kernel version compatibility. |
/dev/EtherCAT0 not found | Verify MASTER0_DEVICE in /etc/ethercat.conf matches your interface. Try manual modprobe. |
| Interface occupied by NetworkManager | Run sudo nmcli dev set <iface> managed no then restart ethercat service. |
ethercat slaves shows no slaves | Check physical cable connection. Ensure slave has external power. Try different Ethernet port. |
High packet loss in ethercat master | Check cable quality. Use Cat5e or better. Avoid switches between master and slave. |
| Motor example doesn't compile | Ensure EtherCAT master is installed. Check cmake can find EtherCAT headers. |
Reference files
references/source.body.md— full original Seeed tutorial with hardware diagrams, motor control flowchart, and CiA-402 state machine details (reference only)
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.

