[etherlab-users] Xenomai 3 and RTDM's Net drivers.

Per Oberg pero at wolfram.com
Fri Nov 16 17:20:15 CET 2018


I just wanted to report that I now have successfully compiled everything and managed so connect to my device using the examples/xenomai and examples/xenomai_posix

I am currently using 

X86-64 PC with Yocto/Poky + Xenomai

Modules:
rt_e1000e
rtpacket
ec_master (with main_devices=ff:ff:ff:ff:ff:ff)
ec_rtdmnet.

It definitely manages to send some packets and during initialization it correctly reports a slave error and manages to reset the slave. Then during the looping there seems to be some timeouts and it complains about things I don't understand. This may well be because of my lack of understanding of the workings of the etherlab master. 

So, for now I will treat this as  success story. 

TTFN, and have a great weekend!

Thanks
Per Öberg 

----- Den 14 nov 2018, på kl 20:26, Edouard Tisserant edouard.tisserant at gmail.com skrev:

> Hi Per

> I should have documented this : rtdmnet.ko use RAW packet socket.

> Don't forget to build and load rtpacket module to make it available.

> Hereafter are commands I use to run a test with rt-FEC driver:

> modprobe rt_fec
> modprobe rtpacket
> rtifconfig rteth0 up

> cat > /etc/sysconfig/ethercat <<EOF
> MASTER0_DEVICE="ff:ff:ff:ff:ff:ff"
> DEVICE_MODULES="rtdmnet"
> EOF

> /etc/init.d/ethercat start

> ethercat slaves

> Cheers,

> Edouard

> On 14/11/2018 17:03, Per Oberg wrote:
> > Hi

>> I tried this today, but I ran into some troubles. Most of my troubles are
> > probably due to me being new to etherlab/ethercat.

> > However, this is what happened:

>> In lack of a valid ethernet-card on the right computer running the right kernel
> > I tried using the xenomai rt_loopback device and got

> > [ 82.574576] EtherCAT: 1 master waiting for devices.
>> [ 104.779742] ec_rtdmnet: EtherCAT master RTnet Ethernet device module 1.5.2
> > 32c9a2dea9ed
> > [ 104.779750] EtherCAT: Accepting 00:00:00:00:00:00 as main device for master 0.
> > [ 104.779751] rtdm_socket() = -97!
> > [ 104.779752] EtherCAT 0: Releasing main device 00:00:00:00:00:00.

> > -97 usually means EAFNOSUPPORT or "Address family not supported by protocol"

>> Is that to be expected when using the loopback-device or am I doing something
> > else wrong?

> > B.t.w., this is the commands that I used:

> >> sudo modprobe rt_loopback
> >> sudo insmod ./master/ec_master.ko main_devices=ff:ff:ff:ff:ff:ff debug_level=1
> >> sudo insmod ./devices/ec_rtdmnet.ko
> > My build is setup using :
>>> ./configure --enable-rtdm --with-xenomai-dir=/opt/xenomai
>>> --with-linux-dir=/.../xenomai-kernel-ipipe.git --disable-r8169
> >> --disable-8139too
> > Kernel is 4.9.38

> > Xenomai is 3.0.7

> > Per Öberg

> > ----- Den 13 nov 2018, på kl 19:05, Per Öberg pero at wolfram.com skrev:

> >>> EtherLab master over real-time Ethernet drivers from Xenomai 3 just works !
> >> This is great news!
> >> I was just looking for Xenomai / EtherCat for x86_64 so I will definitely take
> >> this out for a spin.
> >> Best Regards
> >> Per Öberg
> >>>> I also added a new device : devices/rtdmnet.c. It is really similar to
> >>>> devices/generic.c, but it uses RTDM's Net drivers instead of Linux
> >>>> drivers. This new device still needs fixing, and only works in idle mode
> >>>> for now - working on a fix right now.
> >>> Now fixed.

> >>> For the record, and in case anyone would want to reproduce the
> >>> experiment on I.mx6 with real-time FEC driver, patches for Xenomai
> >>> 3.0.7 to enable and fix FEC driver are attached. Tested with Linux
> >>> 4.9.51.
> >>> Best regards
> >>> Edouard Tisserant
> >>> -------------- next part --------------
> >>> A non-text attachment was scrubbed...
> >>> Name: 0003-xenomai_adjust_RTSKB_SIZE_for_FEC.patch
> >>> Type: text/x-patch
> >>> Size: 839 bytes
> >>> Desc: not available
> >>> URL:
> >>> <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181008/776c6159/attachment.bin>
> >>> -------------- next part --------------
> >>> A non-text attachment was scrubbed...
> >>> Name: 0002-xenomai_fix_FEC.patch
> >>> Type: text/x-patch
> >>> Size: 3498 bytes
> >>> Desc: not available
> >>> URL:
> >>> <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181008/776c6159/attachment-0001.bin>
> >>> -------------- next part --------------
> >>> A non-text attachment was scrubbed...
> >>> Name: 0001-xenomai-enable-FEC.patch
> >>> Type: text/x-patch
> >>> Size: 575 bytes
> >>> Desc: not available
> >>> URL:
> >>> <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181008/776c6159/attachment-0002.bin>
> > _______________________________________________
> > etherlab-users mailing list
> > etherlab-users at etherlab.org
> > http://lists.etherlab.org/mailman/listinfo/etherlab-users



More information about the Etherlab-users mailing list