Giter Club home page Giter Club logo

ethercat-drivers's Introduction

EtherCAT drivers

This package contains EtherCAT drivers to integrate with IgH EtherCAT Master for Linux.

For now this only contains r8169 driver, for kernel 3.8.x, 3.10.x and 3.14.x. They are used to control the Meka robot at Ensta ParisTech at 1Khz with rtai 4.0.

Installation

Download EtherCAT 1.5.2

wget http://etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2
tar xfvj ethercat-1.5.2.tar.bz2

Get the drivers

cd ethercat-1.5.2
wget https://raw.githubusercontent.com/ahoarau/ethercat-drivers/master/r8169-3.8-3.10.patch
## Apply patch
patch -p1 < ethercat-drivers/r8169-3.8-3.10.patch

Build the EtherCAT master modules

Example with kernel 3.10 and driver r8169 (Meka robot).

./configure --enable-cycles --enable-r8169  --with-rtai-dir=/usr/realtime/ --disable-8139too --with-r8169-kernel=3.10
make -j$[$(nproc)+1] all modules
sudo make modules_install install
sudo depmod

Configure your environnement

sudo -s
echo KERNEL==\"EtherCAT[0-9]*\", MODE=\"0664\" > /etc/udev/rules.d/99-EtherCAT.rules
cp etc/init.d/ethercat /etc/init.d/ethercat # to start the master
cp etc/sysconfig/ethercat /etc/sysconfig/ethercat # the config file
exit

Then copy the mac address of the ethernet card you'd like to use (use ifconfig, on meka-mob it's 00:01:2e:49:9c:a0) to MASTER0_DEVICE and set the driver your card should use to DEVICE_MODULES ( meka-mob uses r8169):

sudo nano /etc/sysconfig/ethercat

In Meka's RTPC, the file looks like this:

MASTER0_DEVICE="00:01:2e:49:9c:a0"
DEVICE_MODULES="r8169"

Start EtherCAT master

Then when you have configured your environnement (see the install note on ethercat-1.5.2), you can start the driver:

sudo service ethercat restart

See output messages with dmesg:

dmesg

Start EtherCAT master at startup

cd /opt/etherlab
sudo cp etc/init.d/ethercat /etc/init.d/
sudo chmod a+x /etc/init.d/ethercat
sudo update-rc.d ethercat start 51 S .

Contact : Antoine Hoarau [email protected]

ethercat-drivers's People

Contributors

ahoarau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.