Inappropriate ioctl for device

More
3 years 4 months ago #273502 by Transint
Good day!
Installed Linuxcnc 2.8.4, started configuring EtherCAT, everything went well, all devices were defined, installed the driver, rebooted, EtherCAT started, but when I enter the "ethercat master" command, I see an error
Code:
Failed to get master information: Inappropriate ioctl for device
Where to look for a problem?

Please Log in to join the conversation.

More
3 years 4 months ago #273544 by tommylight
What are you using to edit the files?
Only simple text editors should be used, be it xed, leafpad, geany, gedit. Never use office suite or word processors .

Please Log in to join the conversation.

More
3 years 4 months ago #273591 by Transint
Only Geany and Mousepad

Please Log in to join the conversation.

More
3 years 4 months ago #273841 by bt12g
Hello, Did you find any solution for this?
I'm stuck with same error for days..

If you find any info to get things fixed please share with me..

Thanks..

Please Log in to join the conversation.

More
3 years 4 months ago #273851 by rodw
Replied by rodw on topic Inappropriate ioctl for device
Can you type these commands?
Code:
cd /lib/modules/$(uname r) ls

Do you see an ethercat folder? If not, its broken

I found out today that the repository we have been using deploys broken deb files for  Bookworm. Not sure if the same applies for Buster.
I just posted some instructiosn in the sticky in this section with a solution.
 

Please Log in to join the conversation.

More
3 years 4 months ago #273865 by cncLab
I found today the same issue after Ethercat - Linuxcnc-ethercat installation on existing Bullseye rip. The response to the command ethercat master and/or ethercat slaves is : 'Failed to get master information: Inappropriate ioctl for device'

Thanks in advance for any help on this
Note : for Bullseye and in older (one month ago) successful installation, the commandscd /lib/modules/$(uname -r)
ls

indicate no existence of any ethercat folder, although the response to the command 'ethercat master' is OK and the whole system seems operational.



 

Please Log in to join the conversation.

More
3 years 4 months ago #273874 by rodw
Replied by rodw on topic Inappropriate ioctl for device
I think the problem is the debs did not install correctly and EtherCAT is unable to find a driver which should be under
/lib/modules/<your kernel>/ethercat/master (and other folders under the ethercat folder mentioned)
I think the solution is to build EtherCAT master from source. I documented how to do this last night and roughly documented it  here.
forum.linuxcnc.org/ethercat/45336-etherc...step?start=80#273846

Please try this and let me know how you go. Note these instructions do not cover how to install the hal driver described in the first post of the thread I linked to.

Please Log in to join the conversation.

More
3 years 4 months ago #274004 by jjdege
Hi rodw
I followed your procedure. forum.linuxcnc.org/ethercat/45336-etherc...step?start=80#273846
From the terminal the master is displayed, but the slave is not seen.
I tried the procedure used in the past with Bullseye and it works: from the terminal you can see the EtherCAT master and slave.

Note: For Bullseye I installed the dependencies before building the master from source.
I didn't do it here because I think the dependencies already installed with yesterday's .deb, and it's correct because it works
This is the procedure I followed.
I hope it can be useful.
Code:
apt-get install git autoconf libtool linux-headers-$(uname -r)     git clone https://gitlab.com/etherlab.org/ethercat.git     cd ethercat     git checkout stable-1.5     ./bootstrap     ./configure --help     ./configure --enable-generic --disable-8139too     make     make all modules     make modules_install install     depmod       #Copy ethercat launcher :     cp -f /git/ethercat/script/init.d/ethercat /etc/init.d/ #Make ethercat launcher executable :     chmod +x /git/ethercat/script/init.d/ethercat #copy ethercat mac and driver config sheet to system :     mkdir -p /etc/sysconfig/     cp -f /git/ethercat/script/sysconfig/ethercat /etc/sysconfig/      #Retrieve mac adres :     echo MASTER0_DEVICE="$(cat /sys/class/net/enp1s0/address)" > /etc/sysconfig/ethercat #We choose the generic driver to activate :     echo DEVICE_MODULES="generic" >> /etc/sysconfig/ethercat #From etherlab orginal :          echo "KERNEL=="\"EtherCAT[0-9]*\"", MODE="\"777\"", GROUP=""\"ethercat\"" > /etc/udev/rules.d/99-ethercat.rules          chmod go+rwx /etc/udev/rules.d/99-ethercat.rules              sudo systemctl enable ethercat.service     sudo systemctl start ethercat.service     sudo systemctl status ethercat.service     sudo chmod 666 /dev/EtherCAT0     /etc/init.d/ethercat start  

Please Log in to join the conversation.

More
3 years 4 months ago #274026 by rodw
Replied by rodw on topic Inappropriate ioctl for device
I got an update on this. Etherlabmaster have been able to replicate the issue and have told me they will share a new .deb file via their repo in due course.  Compiling from source seems to solve the problem if you can't wait for them.

Please Log in to join the conversation.

More
3 years 4 months ago #274087 by jjdege
HI,
I installed the .deb packages that Etherlab made available today. Work!
I started with a fresh install of Bookworm.
Thank You very much

Please Log in to join the conversation.

Time to create page: 0.100 seconds
Powered by Kunena Forum