[etherlab-users] Inappropriate ioctl for device
gavin.lambert at tomra.com
Mon Mar 18 00:58:43 CET 2019
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.
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 at 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-
> > 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 at etherlab.org
> > https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists
> > .etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-
> > YC5xHYbwvgsX9JSY7yIZeY3JHyiRVAAf32RDdv0%3D&reserved=0
> etherlab-users mailing list
> etherlab-users at etherlab.org
More information about the etherlab-users