There are three key components in Etherlab:

1. The kernel modules
2. The userspace library
3. The userspace tool ("ethercat")

You need to ensure that the version of all three is identical, and also that 
any of your own code (kernel module or userspace application) is linked to that 
same version.  Mixing versions will give you a lot of grief.

At https://sourceforge.net/u/uecasm/etherlab-patches/ci/default/tree/#readme 
there is some example code (see "realtime API / ioctl compatibility") which 
lets you check on app startup that the system components match the version that 
your application is expecting, and give a friendlier error if not.

You can use this (or similar) code even if you're not using the unofficial 
patchset.

As Wilhelm said, if you're having problems with this, then verify that you're 
compiling / distributing the correct versions and that you don't have stray 
include/library paths or stray versions in other paths.


Gavin Lambert
Senior Software Developer

 


COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New 
Zealand
Switchboard: +49 2630 96520 | https://www.tomra.com

The information contained in this communication and any attachment is 
confidential and may be legally privileged. It should only be read by the 
person(s) to whom it is addressed. If you have received this communication in 
error, please notify the sender and delete the communication.
> -----Original Message-----
> From Dr.-Ing. Wilhelm Hagemeister
> Sent: Friday, 15 March 2019 23:33
> To: etherlab-users@etherlab.org
> Subject: Re: [etherlab-users] Inappropriate ioctl for device
> 
> Hallo Daniel,
> 
> that sounds like the ethercat library does not fit to the kernel module.
> 
> If you have installed the two ethercat installations to different locations 
> e.g.
> /usr/lib or /usr/local/lib it is depending on your search path settings what
> gets found first.
> 
> So it might be helpful to clean up first and do a fresh ethercat install.
> 
> Regards Wilhelm
> 
> Am 15.03.19 um 10:42 schrieb Daniel Lemus:
> > Hi
> >
> > Im having trouble starting the build application from Matlab. Ethercat
> > recognizes all the slaves and the master seems operational. However
> > when I try to run the built executable I get the following error.
> >
> > /Failed to request master 0: Inappropriate ioctl for device/
> >
> > This started happening after I updated my Ethercat installation (I
> > went from downloading the tar file to clone it using hg).
> >
> > I see there is an old post discussing this topic
> > (https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flist
> > s.etherlab.org%2Fpipermail%2Fetherlab-
> users%2F2009%2F000437.html&d
> >
> ata=02%7C01%7Cgavin.lambert%40tomra.com%7C09fc63f557db4639056508d
> 6a931
> >
> a6c7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1%7C6368824280493
> 91319&a
> >
> mp;sdata=Rc%2FjnPRS3pmq%2FOvuCgQcVUxvh%2BU3eJRBgz5Pt3IEZZk%3D
> &rese
> > rved=0) but there is no clear solution (Or at least not clear to me)
> > on how this issue could be solved. In this post It is suggested that
> > the problem is caused by an old master module loaded when a new
> > library version is used. To be honest I don’t know how to solve this.
> >
> > I appreciate the help you guys could give me
> >
> > Daniel Lemus
> >
> > _______________________________________________
> > etherlab-users mailing list
> > etherlab-users@etherlab.org
> > https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> > .etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-
> users&data=02%7C01%7
> >
> Cgavin.lambert%40tomra.com%7C09fc63f557db4639056508d6a931a6c7%7C4
> 308d1
> >
> 18edd143008a37cfeba8ad5898%7C0%7C1%7C636882428049391319&sdat
> a=f0bL
> > YC5xHYbwvgsX9JSY7yIZeY3JHyiRVAAf32RDdv0%3D&reserved=0
> >
> _______________________________________________
> etherlab-users mailing list
> etherlab-users@etherlab.org
> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.et
> herlab.org%2Fmailman%2Flistinfo%2Fetherlab-
> users&data=02%7C01%7Cgavin.lambert%40tomra.com%7C09fc63f557d
> b4639056508d6a931a6c7%7C4308d118edd143008a37cfeba8ad5898%7C0%7C1
> %7C636882428049401332&sdata=ZXI3EX22S0S2FEWDY363zuCBtmLcndo
> %2FEAnFsWX5oxE%3D&reserved=0
_______________________________________________
etherlab-users mailing list
etherlab-users@etherlab.org
http://lists.etherlab.org/mailman/listinfo/etherlab-users

Reply via email to